3.0.0-alpha.0
Type: Record<string, any>
Type: string
const for unknown data version, 0
Type: number
const for offset to crc in record, 28
Type: number
const for size of fixed header part of record, 40
Type: number
const for fdsn prefix for extra headers, FDSN
Type: string
const for little endian, true
Type: boolean
const for big endian, false
Type: boolean
(Seismogram)
(Record<string, any>?)
Array<MSeed3Record>
parse arrayBuffer into an array of MSeed3Records.
(ArrayBuffer)
bytes to extract miniseed3 records from
Array<MSeed3Record>
:
array of all miniseed3 records contained in the buffer
Represents a MSEED3 Data Record, with header, extras and data.
(MSeed3Header)
miniseed3 fixed record header
(Record<string, any>)
json compatible object with extra headers
(DataView)
waveform data, in correct compression for value in header
Parses an miniseed3 data record from a DataView.
(DataView)
bytes to parse
MSeed3Record
:
parsed record
[createFromDataView description]
(DataView)
record bytes
MSeed3Record
:
record
Type: MSeed3Header
Decompresses the data , if the compression type is known
(Int32Array | Float32Array | Float64Array)
:
decompressed data as a typed array, usually Int32Array or Float32Array
Wraps data in an EncodedDataSegment for future decompression.
EncodedDataSegment
:
waveform data
Fixed header of an MSeed3 data record.
Parses an miniseed3 fixed header from a DataView.
(DataView)
bytes to parse
MSeed3Header
:
parsed header object
Type: json_object
sets start time headers from Moment.
(DateTime)
Converts header start time to DateTime
DateTime
:
start time as DateTime
Parses extra headers as json.
(DataView)
json bytes as DataView
Record<string, any>
:
json object
Creates a string version of a number with zero prefix padding. For example padZeros(5, 3) is 005.
string
:
zero padded string
creates a string from bytes in a DataView.
(DataView)
data bytes
(number)
offset to first byte to use
(number)
number of bytes to convert
string
:
string resulting from utf-8 conversion
Checks if two miniseed3 records are (nearly) contiguous.
(MSeed3Record)
first record
(MSeed3Record)
second record
(any
= 1.5
)
tolerence expressed as ratio of sample period, default 1.5
boolean
:
true if contiguous
Concatentates a sequence of MSeed3 Records into a single seismogram object. Assumes that they are all contiguous (no gaps or overlaps) and in order. Header values from the first MSeed3 Record are used.
(Array<MSeed3Record>)
array of miniseed3 records
SeismogramSegment
:
seismogram segment for the records
Merges miniseed3 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. Gaps may be present.
(Array<MSeed3Record>)
list of miniseed3 records to convert
Seismogram
:
the seismogram
merges contiguous MSeed3Record into SeismogramSegments.
(Array<MSeed3Record>)
array of data records
Array<SeismogramSegment>
:
array of SeismogramSegments for contiguous data
splits a list of data records by channel identifier, returning an object with each NSLC mapped to an array of data records.
(Array<MSeed3Record>)
array of miniseed3 records
Map<string, Array<MSeed3Record>>
:
map of channel id to array of miniseed3 records, possibly not contiguous
splits the records by channel and creates a single SeismogramSegment for each contiguous window from each channel.
(Array<MSeed3Record>)
MSeed3Records array
Array<SeismogramSegment>
:
Array of SeismogramSegment
splits the MSeed3Records by channel and creates a single Seismogram for each channel.
(Array<MSeed3Record>)
MSeed3Records array
Array<Seismogram>
:
Map of code to Seismogram
Convert array of Miniseed2 DataRecords into an array of MSeed3Records.
(Array<DataRecord>)
array of DataRecords
Array<MSeed3Record>
:
array of MSeed3Records
Converts a single miniseed2 DataRecord into a single MSeed3Record.
(DataRecord)
Miniseed2 DataRecord to convert
MSeed3Record
:
MSeed3Record
Copy from https://github.com/ashi009/node-fast-crc32c/blob/master/impls/js_crc32c.js and modify to use ArrayBuffer. Rename calculateCRC32C
This code is a manual javascript translation of c code generated by pycrc 0.7.1 (http://www.tty1.net/pycrc/). Command line used: './pycrc.py --model=crc-32c --generate c --algorithm=table-driven'
((ArrayBuffer | Uint8Array))
input data
(any
= 0
)
starting value, from earlier data
number
:
calculated crc32c value
Convert crc as a number into a hex string.
(number)
crc as a number
string
:
hex representation