Workflow Automation package reference

sigclear-soig

SOIG — Schema-Organized Independent Groups. A group-oriented scientific data format for measurements, sampled signals and numerical research workflows.

Overview

Scientific and engineering data management

sigclear-soig provides the dataset model, libsoig APIs and Programs for creating, inspecting and reorganizing scientific data within Workflow Automation.

A binary dataset, not a spreadsheet

.sg is the conventional extension for a binary SOIG dataset. Renaming a CSV or other file does not convert it. Inspect it with sgattribute and sgdump, rather than opening its binary contents in a text editor or printing them with cat.

Dataset structure

One schema, many measurement records

The header stores processing history, dataset-level attributes and a field schema. Every column contains values described by that same schema. Groups are consecutive runs of columns, rather than separate field definitions for each group.

Components of a SOIG dataset
ComponentMeaning for experiment design
HistoryRecorded processing commands. Retain raw inputs and the experiment definition as well.
AttributesCommon metadata, such as sampling coordinates and references to grouping or indexing fields.
Field schemaEach field's name, type and element count, shared by all columns.
GroupA consecutive run of columns sharing a group-key value.
ColumnOne record or measurement, which may contain an entire sampled trace.
Field valuesNumeric scalars, fixed-width text or numeric vectors within a column.

A column is not necessarily one numerical sample or one CSV row. A scalar-only dataset may represent one observation per column; a trace dataset can contain hundreds of samples within each column. Different vector fields may have different lengths, but each field's declared length applies to every column. Text fields have a fixed byte width.

seed.sg
├── Header
│   ├── Attributes: data.ns=100, data.s0=0, data.ds=0.001
│   │               group key → group field; index key → index field
│   └── Field schema: group (integer scalar), index (integer scalar),
│                    data (100 floating-point samples)
└── Columns: one group with group-key value 0
    ├── Column 0: group=0, index=0, data=[0, ..., 0]
    └── Column 1: group=0, index=1, data=[0, ..., 0]
Logical structure of the example below: two columns, each with 100 samples. This is not the on-disk byte layout.

Grouping rules

Choose the processing boundary explicitly

The group attribute identifies the scalar field used as the group key. Values in that field determine membership; the field need not itself be named group. The subgroup and index attributes likewise identify fields used by Programs that need subdivisions or indexing.

Group reads follow adjacent columns, not a global SQL-style group-by:

Column key values:  1, 1, 2, 1
Consecutive groups: [1, 1] [2] [1]  → three groups, not two

Decide which measurements belong together, arrange their order, and inspect the key before group-wise processing such as sgstack. Sorting or concatenating can change group boundaries.

Independent is a processing concept

SOIG does not automatically cluster measurements or guarantee statistical independence between groups. Experimental units, repeated measurements and statistical assumptions remain part of the experiment design.

Sampling and units

Keep coordinates consistent with the vector

For a regularly sampled vector named data, these header attributes describe its sampling:

Sampling metadata in the example
AttributeMeaningValue
data.nsNumber of samples; must agree with the field schema.100
data.s0Coordinate of the first sample.0
data.dsInterval between successive samples.0.001

The coordinate at zero-based sample index i is data.s0 + i * data.ds, for i=0,...,data.ns-1. The example spans 0 through 0.099, not 0.100. If the coordinate is time in seconds, the interval is 1 ms.

Use the vector's own name for other sampling attributes, such as pressure.ns, pressure.s0 and pressure.ds. These are common metadata, not extra samples or per-column measurements.

Record physical units, field meanings and missing-value conventions explicitly. Field names do not establish units, and a zero-filled vector is not automatically missing data. Check required types, lengths and spacing in each Program's manual; recheck sampling metadata after windowing, resampling or concatenation.

Quick example

Create two columns containing sampled vectors

sgcreate nx=2 data.ns=100 data.s0=0 data.ds=0.001 </dev/null >seed.sg
sgattribute <seed.sg
sgdump fields=group,index ncol=2 <seed.sg
sgdump ncol=1 <seed.sg

With the current implementation, the creation command produces two columns in one group, each with a zero-filled, 100-sample data vector. Explicit </dev/null selects new-dataset creation rather than transformation of an input dataset.

sgattribute shows history, attributes and field definitions. The first sgdump prints the scalar keys; the second prints vector values from one column. Its itime column is a zero-based sample index, not a physical time coordinate.

Verify the example on your installed version

Run in a scratch directory with the required packages and valid entitlements. The expected structure is checked against the source, not a claim of execution with every released version. These synthetic zero values are not experimental observations.

Inspect and exchange

Validate the schema before processing

  • Use sgattribute to check field names, types, element counts, byte offsets and grouping/sampling attributes.
  • Use sgdump to inspect representative values and key sequences. Its diagnostic text is not a replacement binary dataset or a general-purpose interchange export.
  • Keep binary outputs redirected to a file or another Program; do not display them directly in the terminal.
  • Retain raw inputs, converter parameters, physical units and acceptance checks in the experiment definition.

SOIG uses a native binary representation. Do not assume byte-order or architecture/ABI independence when moving files between systems. For external tools, select the appropriate I/O conversion Program and verify the resulting types, shapes and coordinates on a small sample.

Use sgloadcsv/sgoutcsv for supported table layouts, sgloadmat/sgoutmat for MATLAB exchange, and sgloadbin for explicitly described fixed-size binary records. Choose conversion parameters from the matching manual; conversion does not establish units or correct grouping automatically.

Illustrative SOIG record with several physical-measurement vectors and associated metadata
A conceptual multiphysics layout, not a required set of field names or a binary-layout specification.

Processing considerations

Structure supports processing; the Program defines behavior

Group-wise access

Programs using group reads work on consecutive groups. Memory needs depend on the group size, buffering and algorithm; not every Program reads one group at a time.

Parallel processing

Parallel work depends on the Program and workflow implementation. Grouping alone does not enable automatic distributed execution; thread settings affect Programs that implement parallel work.

Quality control

Use grouping and field structure to design QC Figures. Plot layout and regeneration are controlled by the plotting Program and Experiment definitions.

Reusable APIs

Custom Programs use a consistent interface across different scientific fields and measurement types.

Conceptual illustration of group-oriented processing
Illustrative processing organization, not a guarantee of automatic parallel scheduling.

Programs

Choose a Program

Program roles — match availability and options to your installed package version
ProgramPurpose and design distinction
sgcreateCreate or reshape datasets from field and sampling definitions; define units and grouping separately.
sgattributeInspect or edit attributes. Plain invocation prints metadata; edit operations write a dataset.
sgdumpDisplay scalar fields or vector values as diagnostic text, not a binary dataset.
sgwindowSelect groups, columns, fields or samples; check retained sampling coordinates.
sgsubvolPartition coordinate ranges into subvolumes; review overlap and grouping.
sgtruncateSplit vectors into segments or merge segments back; preserve segment metadata.
sgsortSort columns using numerical keys; not categorical group-by aggregation.
sgstackCombine columns using existing groups; maximum mode selects magnitude, not the largest signed value.
sgpadPad samples or duplicate boundary columns/groups; padding does not create new observations.
sgcatMerge datasets; group, subgroup and vector modes have different layout/sampling effects.
sgfieldinImport fields from an auxiliary dataset using matching conditions and declared mappings.
sgfieldoutCollect scalar fields into vectors, producing one column per input group; not an external-format exporter.
sgfieldtextSupported text-to-identifier operations; not general text processing. Consult the manual for input-width requirements.

Open the installed reference with man PROGRAM, for example man sgcreate, or choose a version and Program from the menu when published. Choose the version matching the installed package; a manual alone does not establish released availability.

Libraries and APIs

Access datasets with libsoig

The Package installs libsoig and its public soig.h interface. Custom Programs use the API to read and write groups, columns, fields, attributes and processing history consistently.

Scope

Numerical research data, not business records

SOIG is designed for numerical arrays and measurements produced by sensors, simulations and scientific algorithms. A relational database remains more suitable for customers, orders and other transactional records.