3.1.4
Type: string
Type: number
Type: number
Type: number
Type: number
parse arrayBuffer into an array of DataRecords.
(ArrayBuffer)
bytes to parse
Array<DataRecord>
:
arry of data records
parse a single DataRecord starting at the beginning of the DataView. Currently only some blockettes are parsed, 100, 1000, 1001, others are separated, but left as just a DataView.
(DataView)
bytes as DataView
DataRecord
:
data record
parse the DataHeader from a single DataRecord starting at the beginning of the DataView.
(DataView)
bytes as DataView
DataHeader
:
data record header
parses a Blockette within the DataView.
(DataView)
containing the data
(number)
offset into the DataView to start
(number)
size in bytes of the Blockette
(boolean)
true if byte swapping is needed
Blockette
:
Blockette instance
Represents a SEED Data Record, with header, blockettes and data.
(DataHeader)
(DataView)
Type: DataHeader
Decompresses the data , if the compression type is known.
(Int32Array | Float32Array | Float64Array)
:
decompressed data
EncodedDataSegment
Represents the header part of the DataRecord, including all the actual fixed header plus fields pulled from a blockette 1000 if present.
Type: DateTime
Type: DateTime
Extends Blockette
Extends Blockette
Extends Blockette
BTime
Converts this BTime to a luxon utc DateTime. Note DateTime's precision is limited to milliseconds and leap seconds are not supported, ie 60 seconds returns DateTime.invalid.
DateTime
:
BTime as a DateTime
Sanity checks on a BTime to see if a record might be in the wrong byte order and so need to be byte swapped before parsing. Checks year betwee 1960 and 2055.
(BTime)
time
boolean
:
true is byte order appears to be wrong, false if it seems ok
Determines if two DataRecords are contiguous, ie if the second starts after the end of the first and the start time of the second is within 1.5 times the sample period of the end of the first.
(DataRecord)
first data record
(DataRecord)
seconds data record
boolean
:
true if contiguous
Concatentates a sequence of DataRecords into a single seismogram object. Assumes that they are all contiguous and in order. Header values from the first DataRecord are used.
((Array<DataRecord> | DataRecord))
array of data records
SeismogramSegment
:
SeismogramSegment instance
Merges data records into a Seismogram object, each of which consists of SeismogramSegment objects containing the data as EncodedDataSegment objects. DataRecords are sorted by startTime. This assumes all data records are from the same channel, byChannel can be used first if multiple channels may be present. It also assumes that new seismograms should not be created for gaps, for example when getting data from the same channel for multiple earthquakes.
(Array<DataRecord>)
array of data records
Seismogram
:
Seismogram instance
merges contiguous DataRecords into SeismogramSegments.
(Array<DataRecord>)
array of data records
Array<SeismogramSegment>
:
array of SeismogramSegments for contiguous data
Splits a list of data records by channel code, returning a Map with each NSLC string mapped to an array of data records.
(Array<DataRecord>)
array of data records
Map<string, Array<DataRecord>>
:
map of arrays of data records keyed by channel
splits the DataRecords by channel and creates a single SeismogramSegment for each contiguous window from each channel.
(Array<DataRecord>)
DataRecords array
Array<SeismogramSegment>
:
Array of SeismogramSegment
splits the DataRecords by channel and creates a single Seismogram for each channel.
(Array<DataRecord>)
DataRecords array
Array<Seismogram>
:
Array of Seismogram