Overview
SOIG datasets store a shared field schema, metadata and measurement records in binary .sg files. A record, called a column, can contain numeric scalars, fixed-width text and sampled vectors. Groups are consecutive columns with a shared group-key value.
Main capabilities
- Create datasets with explicit fields and sampling coordinates.
- Inspect metadata, values and grouping before processing.
- Select, sort, combine and reorganize columns, groups and vectors.
- Read and write scientific datasets through
libsoigandsoig.h.
Programs
Choose a Program
| Program | Purpose and design distinction |
|---|---|
sgcreate | Create or reshape datasets from field and sampling definitions; define units and grouping separately. |
sgattribute | Inspect or edit attributes. Plain invocation prints metadata; edit operations write a dataset. |
sgdump | Display scalar fields or vector values as diagnostic text, not a binary dataset. |
sgwindow | Select groups, columns, fields or samples; check retained sampling coordinates. |
sgsubvol | Partition coordinate ranges into subvolumes; review overlap and grouping. |
sgtruncate | Split vectors into segments or merge segments back; preserve segment metadata. |
sgsort | Sort columns using numerical keys; not categorical group-by aggregation. |
sgstack | Combine columns using existing groups; maximum mode selects magnitude, not the largest signed value. |
sgpad | Pad samples or duplicate boundary columns/groups; padding does not create new observations. |
sgcat | Merge datasets; group, subgroup and vector modes have different layout/sampling effects. |
sgfieldin | Import fields from an auxiliary dataset using matching conditions and declared mappings. |
sgfieldout | Collect scalar fields into vectors, producing one column per input group; not an external-format exporter. |
sgfieldtext | Supported 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.
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.
Run this synthetic example in a scratch directory with the required package and license.
Requirements and further reading
Keep binary outputs in files or pipes; use sgattribute and sgdump for inspection. Define physical units, group keys and sampling coordinates explicitly. SOIG grouping defines processing boundaries; it does not establish statistical independence or enable parallel execution automatically.
The dataset reference explains schemas, grouping rules, sampling metadata and portability. See Common Program options for shared runtime controls. Use the I/O package for supported external formats and the versioned Program manuals for individual operations.