simplemseed.steim1
Module Contents
Functions
Decode Steim1 compression |
|
Encode samples as Steim1 compression. |
|
Data
API
- simplemseed.steim1.ONE_BYTE = 'int32(...)'
- simplemseed.steim1.TWO_BITS = 'int32(...)'
- simplemseed.steim1.TWO_BYTE = 'int32(...)'
- simplemseed.steim1.decodeSteim1(dataBytes: bytearray, numSamples, bias=np.int32(0))
Decode Steim1 compression
Decode Steim1 compression format from the provided byte array, which contains numSamples number of samples. bias represents a previous value which acts as a starting constant for continuing differences integration. At the very start, bias is set to 0.
- simplemseed.steim1.encodeSteim1(samples: Union[numpy.ndarray, list[int]], frames: int = 0, bias: numpy.int32 = 0, offset: int = 0) bytearray
Encode samples as Steim1 compression.
Encode the array of integer values into a Steim 1 * compressed byte frame block. For miniseed2 you should not create a byte block any greater than 63 64-byte frames. maxFrames=0 implies unlimited number of frames, usually for miniseed3. <b>maxFrames</b> represents the number of frames to be written. This number should be determined from the desired logical record length <i>minus</i> the data offset from the record header (modulo 64) If <b>samples</b> is exhausted before all frames are filled, the remaining frames will be Nones. <b>bias</b> is a value carried over from a previous data record, representing X(-1)…set to 0 otherwise @param samples the data points represented as signed integers @param frames the number of Steim frames to use in the encoding @param bias offset for use as a constant for the first difference, otherwise set to 0 @return SteimFrameBlock containing encoded byte array @throws SteimException samples array is zero size @throws SteimException number of frames is a negative value