MINISEED_MIME

src/miniseed.js
MINISEED_MIME

Type: string

parseDataRecords

src/miniseed.js

parse arrayBuffer into an array of DataRecords.

parseDataRecords(arrayBuffer: ArrayBuffer): Array<DataRecord>
Parameters
arrayBuffer (ArrayBuffer)
Returns
Array<DataRecord>

parseSingleDataRecord

src/miniseed.js

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

parseSingleDataRecord(dataView: DataView): DataRecord
Parameters
dataView (DataView)
Returns
DataRecord

parseSingleDataRecordHeader

src/miniseed.js

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

parseSingleDataRecordHeader(dataView: DataView): DataHeader
Parameters
dataView (DataView)
Returns
DataHeader

parseBlockette

src/miniseed.js

parses a Blockette within the DataView.

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

Represents a SEED Data Record, with header, blockettes and data. Currently only blockette 1000 is parsed, others are separated, but left as just a DataView.

new DataRecord(header: DataHeader, data: DataView)
Parameters
header (DataHeader)
data (DataView)
Instance Members
header
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
typeCode
continuationCode
staCode
locCode
chanCode
netCode
startBTime
numSamples
encoding
littleEndian
sampRateFac
sampRateMul
sampleRate
activityFlags
ioClockFlags
dataQualityFlags
numBlockettes
timeCorrection
dataOffset
blocketteOffset
recordSize
blocketteList
startTime
endTime
toString()
calcSampleRate()
timeOfSample(i)
new Blockette(type: number, body: DataView)
Parameters
type (number)
body (DataView)
Instance Members

Blockette1000

src/miniseed.js
new Blockette1000(type: number, body: DataView, encoding: number, dataRecordLengthByte: number, wordOrder: number)

Extends Blockette

Parameters
type (number)
body (DataView)
encoding (number)
dataRecordLengthByte (number)
wordOrder (number)
Instance Members
encoding
dataRecordLengthByte
wordOrder

Blockette1001

src/miniseed.js
new Blockette1001(type: number, body: DataView, timeQual: number, microsecond: number, frameCount: number)

Extends Blockette

Parameters
type (number)
body (DataView)
timeQual (number)
microsecond (number)
frameCount (number)
Instance Members
timeQual
microsecond
frameCount

Blockette100

src/miniseed.js
new Blockette100(type: number, body: DataView, sampleRate: number, flags: number)

Extends Blockette

Parameters
type (number)
body (DataView)
sampleRate (number)
flags (number)
Instance Members
sampleRate
flags
parseBTime(dataView: DataView, offset: number, byteSwap: boolean?): BTime
Parameters
dataView (DataView)
offset (number)
byteSwap (boolean?)
Returns
BTime
new BTime(year: number, jday: number, hour: number, min: number, sec: number, tenthMilli: number)
Parameters
year (number)
jday (number)
hour (number)
min (number)
sec (number)
tenthMilli (number)
Instance Members
year
jday
hour
tenthMilli
microsecond
length
toString()
toMoment()
toDate()

areContiguous

src/miniseed.js

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: DataRecord, dr2: DataRecord): boolean
Parameters
dr1 (DataRecord)
dr2 (DataRecord)
Returns
boolean

createSeismogramSegment

src/miniseed.js

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: Array<DataRecord>): SeismogramSegment
Parameters
contig (Array<DataRecord>)
Returns
SeismogramSegment

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.

merge(drList: Array<DataRecord>): Seismogram
Parameters
drList (Array<DataRecord>)
Returns
Seismogram

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: Array<DataRecord>): Map<string, Array<DataRecord>>
Parameters
drList (Array<DataRecord>)
Returns
Map<string, Array<DataRecord>>

seismogramPerChannel

src/miniseed.js

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

seismogramPerChannel(drList: Array<DataRecord>): Array<Seismogram>
Parameters
drList (Array<DataRecord>) DataRecords array
Returns
Array<Seismogram>: Array of Seismogram