The Mini-SEED library provides a framework for manipulation of SEED data records including the unpacking and packing of data records. Functionality is also included for managing waveform data as continuous traces. All structures of SEED 2.4 data records are supported with the following exceptions: Blockette 2000 opaque data which has an unknown data structure by definition and Blockette 405 which depends on full SEED (SEED including full ASCII headers) for a full data description.
The primary purpose of the library is to hide the details of Mini-SEED in order to allow rapid development of Mini-SEED reading/writing software. The framework allows everything from manipulation of Mini-SEED on a record-by-record basis to reading of Mini-SEED into continuous trace segments to packing of large continuous traces using a record template.
Certain common tasks have, through library design, been streamlined, for example: reading Mini-SEED records from a file, adding data from unpacked records to a group of traces or packing a group of continuous traces into Mini-SEED records.
The following data encoding formats are supported for both unpacking and packing: ASCII, INT16, INT32, FLOAT32, FLOAT64, STEIM1 and STEIM2. The INT and FLOAT encodings each have two versions for quantities with a different number of bits of representation. The STEIM decompression produces 32-bit integers; likewise the compression routines require 32-bit integers as input. The following data encoding formats are supported for unpacking only: GEOSCOPE (24-bit, 16/3 and 16/4 gain ranged), CDSN, SRO and DWWSSN.
Time series data¶
Time series data samples are managed by libmseed in a couple of different formats depending on how they are unpacked or will be packed. An array of samples is completely represented by an array of sample values, the number of samples and a sample type. The number of samples is always the actual number of sample values, not the number of bytes needed for storing the values. Samples can be either ASCII, 32-bit integer, 32-bit floats or 64-bit double precision floats.
Sample types are identified by a type character:
a - ASCII (8 bits)
i - integer (32 bits)
f - float (32 bits)
d - double (64 bits)
The size of each sample type in bytes is returned by the
get_samplesize(3) lookup routine.
Example programs using libmseed are provided in the examples directory of the source code distribution.
A common library usage is to read miniSEED data:
Example miniSEED reading program