MINISEED_MIME

dist/miniseed.mjs
MINISEED_MIME

Type: string

R_TYPECODE
D_TYPECODE
Q_TYPECODE
M_TYPECODE

parseDataRecords

dist/miniseed.mjs

parse arrayBuffer into an array of DataRecords.

parseDataRecords(arrayBuffer: any): any
Parameters
arrayBuffer (any) bytes to parse
Returns
any: arry of data records

parseSingleDataRecord

dist/miniseed.mjs

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.

parseSingleDataRecord(dataView: any): any
Parameters
dataView (any) bytes as DataView
Returns
any: data record

parseSingleDataRecordHeader

dist/miniseed.mjs

parse the DataHeader from a single DataRecord starting at the beginning of the DataView.

parseSingleDataRecordHeader(dataView: any): any
Parameters
dataView (any) bytes as DataView
Returns
any: data record header

parseBlockette

dist/miniseed.mjs

parses a Blockette within the DataView.

parseBlockette(dataView: any, offset: any, length: any, headerByteSwap: any): any
Parameters
dataView (any) containing the data
offset (any) offset into the DataView to start
length (any) size in bytes of the Blockette
headerByteSwap (any) true if byte swapping is needed
Returns
any: Blockette instance

Represents a SEED Data Record, with header, blockettes and data.

new DataRecord(header: any, data: any)
Parameters
header (any)
data (any)
Instance Members
decompress()
asEncodedDataSegment()
codes(sep)

Represents the header part of the DataRecord, including all the actual fixed header plus fields pulled from a blockette 1000 if present.

new DataHeader()
Instance Members
toString()
calcSampleRate()
timeOfSample(i)
new Blockette(type: any, body: any)
Parameters
type (any)
body (any)

Blockette1000

dist/miniseed.mjs
new Blockette1000(type: any, body: any, encoding: any, dataRecordLengthByte: any, wordOrder: any)

Extends Blockette

Parameters
type (any)
body (any)
encoding (any)
dataRecordLengthByte (any)
wordOrder (any)

Blockette1001

dist/miniseed.mjs
new Blockette1001(type: any, body: any, timeQual: any, microsecond: any, frameCount: any)

Extends Blockette

Parameters
type (any)
body (any)
timeQual (any)
microsecond (any)
frameCount (any)

Blockette100

dist/miniseed.mjs
new Blockette100(type: any, body: any, sampleRate: any, flags: any)

Extends Blockette

Parameters
type (any)
body (any)
sampleRate (any)
flags (any)
parseBTime(dataView: any, offset: any, byteSwap: any)
Parameters
dataView (any)
offset (any)
byteSwap (any)
new BTime(year: any, jday: any, hour: any, min: any, sec: any, tenthMilli: any)
Parameters
year (any)
jday (any)
hour (any)
min (any)
sec (any)
tenthMilli (any)
Instance Members
toString()
toDateTime()

checkByteSwap

dist/miniseed.mjs

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.

checkByteSwap(bTime: any): any
Parameters
bTime (any) time
Returns
any: true is byte order appears to be wrong, false if it seems ok

areContiguous

dist/miniseed.mjs

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.

areContiguous(dr1: any, dr2: any): any
Parameters
dr1 (any) first data record
dr2 (any) seconds data record
Returns
any: true if contiguous

createSeismogramSegment

dist/miniseed.mjs

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.

createSeismogramSegment(contig: any): any
Parameters
contig (any) array of data records
Returns
any: 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.

merge(drList: any): any
Parameters
drList (any) array of data records
Returns
any: Seismogram instance

mergeSegments

dist/miniseed.mjs

merges contiguous DataRecords into SeismogramSegments.

mergeSegments(drList: any): any
Parameters
drList (any) array of data records
Returns
any: 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.

byChannel(drList: any): any
Parameters
drList (any) array of data records
Returns
any: map of arrays of data records keyed by channel

seismogramSegmentPerChannel

dist/miniseed.mjs

splits the DataRecords by channel and creates a single SeismogramSegment for each contiguous window from each channel.

seismogramSegmentPerChannel(drList: any): any
Parameters
drList (any) DataRecords array
Returns
any: Array of SeismogramSegment

seismogramPerChannel

dist/miniseed.mjs

splits the DataRecords by channel and creates a single Seismogram for each channel.

seismogramPerChannel(drList: any): any
Parameters
drList (any) DataRecords array
Returns
any: Array of Seismogram