seisplotjs

3.1.4

xml namespace for stationxml

STAML_NS

Type: string

COUNT_UNIT_NAME

src/stationxml.ts
COUNT_UNIT_NAME

Type: string

FIX_INVALID_STAXML

src/stationxml.ts
FIX_INVALID_STAXML

Type: boolean

INVALID_NUMBER

src/stationxml.ts
INVALID_NUMBER

FAKE_START_DATE

src/stationxml.ts
FAKE_START_DATE

FAKE_EMPTY_XML

src/stationxml.ts

a fake, completely empty stationxml document in case of no data.

FAKE_EMPTY_XML

Type: string

CHANNEL_CLICK_EVENT

src/stationxml.ts
CHANNEL_CLICK_EVENT

Type: string

STATION_CLICK_EVENT

src/stationxml.ts
STATION_CLICK_EVENT

Type: string

createChannelClickEvent

src/stationxml.ts

Utility function to create CustomEvent for clicking on a Channel, for example in a map or table.

createChannelClickEvent(sta: Channel, mouseclick: Event): CustomEvent
Parameters
sta (Channel) Channel clicked on
mouseclick (Event) original mouse click Event
Returns
CustomEvent: CustomEvent populated with channel field in detail.

createStationClickEvent

src/stationxml.ts

Utility function to create CustomEvent for clicking on a Station, for example in a map or table.

createStationClickEvent(sta: Station, mouseclick: Event): CustomEvent
Parameters
sta (Station) Station clicked on
mouseclick (Event) original mouse click Event
Returns
CustomEvent: CustomEvent populated with station field in detail.
new Network(networkCode: string)
Parameters
networkCode (string)
Instance Members
networkCode
_startDate
_endDate
restrictedStatus
description
totalNumberStations
stations
sourceId
startDate
startDate
endDate
endDate
timeRange
codes()
isActiveAt(d?)
isTempNet()
new Station(network: Network, stationCode: string)
Parameters
network (Network)
stationCode (string)
Instance Members
network
stationCode
sourceID
restrictedStatus
latitude
longitude
elevation
waterLevel
comments
equipmentList
dataAvailability
identifierList
description
geology
vault
channels
sourceId
startDate
startDate
endDate
endDate
timeRange
networkCode
isActiveAt(d?)
codes(sep)
new Channel(station: Station, channelCode: string, locationCode: string)
Parameters
station (Station)
channelCode (string)
locationCode (string)
Instance Members
station
channelCode
restrictedStatus
latitude
longitude
elevation
depth
azimuth
sampleRate
waterLevel
comments
equipmentList
dataAvailability
identifierList
description
response
sensor
preamplifier
datalogger
sourceId
nslcId
startDate
startDate
endDate
endDate
timeRange
locationCode
locationCode
stationCode
networkCode
hasInstrumentSensitivity()
instrumentSensitivity
instrumentSensitivity
nslc
codes(sep)
isActiveAt(d?)

InstrumentSensitivity

src/stationxml.ts
new InstrumentSensitivity(sensitivity: number, frequency: number, inputUnits: string, outputUnits: string)
Parameters
sensitivity (number)
frequency (number)
inputUnits (string)
outputUnits (string)
Instance Members
sensitivity
frequency
inputUnits
outputUnits
new Equipment()
Instance Members
resourceId
description
manufacturer
vendor
model
serialNumber
installationDate
removalDate
calibrationDateList
new Response(instrumentSensitivity: InstrumentSensitivity?, stages: Array<Stage>?)
Parameters
instrumentSensitivity (InstrumentSensitivity?)
stages (Array<Stage>?)
Instance Members
instrumentSensitivity
stages
new Stage(filter: (AbstractFilterType | null), decimation: (Decimation | null), gain: Gain)
Parameters
filter ((AbstractFilterType | null))
decimation ((Decimation | null))
gain (Gain)
Instance Members
filter
decimation
gain

AbstractFilterType

src/stationxml.ts
new AbstractFilterType(inputUnits: string, outputUnits: string)
Parameters
inputUnits (string)
outputUnits (string)
Instance Members
inputUnits
outputUnits
description
new PolesZeros(inputUnits: string, outputUnits: string)

Extends AbstractFilterType

Parameters
inputUnits (string)
outputUnits (string)
Instance Members
pzTransferFunctionType
normalizationFactor
normalizationFrequency
zeros
poles
new FIR(inputUnits: string, outputUnits: string)

Extends AbstractFilterType

Parameters
inputUnits (string)
outputUnits (string)
Instance Members
symmetry
numerator

CoefficientsFilter

src/stationxml.ts
new CoefficientsFilter(inputUnits: string, outputUnits: string)

Extends AbstractFilterType

Parameters
inputUnits (string)
outputUnits (string)
Instance Members
cfTransferFunction
numerator
denominator
new Decimation(inputSampleRate: number, factor: number)
Parameters
inputSampleRate (number)
factor (number)
Instance Members
inputSampleRate
factor
offset
delay
correction
new Gain(value: number, frequency: number)
Parameters
value (number)
frequency (number)
Instance Members
value
frequency
new Span(interval: Interval)
Parameters
interval (Interval)
Instance Members
interval
numberSegments
maximumTimeTear

DataAvailability

src/stationxml.ts
new DataAvailability()
Instance Members
extent
spanList
new Comment(value: string)
Parameters
value (string)
Instance Members
subject
value
beginEffectiveTime
endEffectiveTime
authorList
new Author()
Instance Members

parseStationXml

src/stationxml.ts

Parses the FDSN StationXML returned from a query.

parseStationXml(rawXml: Document): Array<Network>
Parameters
rawXml (Document) parsed xml to extract objects from
Returns
Array<Network>: an Array of Network objects.

convertToNetwork

src/stationxml.ts

Parses a FDSNStationXML Network xml element into a Network object.

convertToNetwork(xml: Element): Network
Parameters
xml (Element) the network xml Element
Returns
Network: Network instance

convertToStation

src/stationxml.ts

Parses a FDSNStationXML Station xml element into a Station object.

convertToStation(network: Network, xml: Element): Station
Parameters
network (Network) the containing network
xml (Element) the station xml Element
Returns
Station: Station instance

convertToChannel

src/stationxml.ts

Parses a FDSNStationXML Channel xml element into a Channel object.

convertToChannel(station: Station, xml: Element): Channel
Parameters
station (Station) the containing staton
xml (Element) the channel xml Element
Returns
Channel: Channel instance

convertToDataAvailability

src/stationxml.ts
convertToDataAvailability(xml: Element): DataAvailability
Parameters
xml (Element)
Returns
DataAvailability

convertToComment

src/stationxml.ts
convertToComment(xml: Element): Comment
Parameters
xml (Element)
Returns
Comment

convertToAuthor

src/stationxml.ts
convertToAuthor(xml: Element): Author
Parameters
xml (Element)
Returns
Author

convertToEquipment

src/stationxml.ts
convertToEquipment(xml: Element): Equipment
Parameters
xml (Element)
Returns
Equipment

convertToResponse

src/stationxml.ts

Parses a FDSNStationXML Response xml element into a Response object.

convertToResponse(responseXml: Element): Response
Parameters
responseXml (Element) the response xml Element
Returns
Response: Response instance

convertToInstrumentSensitivity

src/stationxml.ts

Parses a FDSNStationXML InstrumentSensitivity xml element into a InstrumentSensitivity object.

convertToInstrumentSensitivity(xml: Element): InstrumentSensitivity
Parameters
xml (Element) the InstrumentSensitivity xml Element
Returns
InstrumentSensitivity: InstrumentSensitivity instance

convertToStage

src/stationxml.ts

Parses a FDSNStationXML Stage xml element into a Stage object.

convertToStage(stageXml: Element): Stage
Parameters
stageXml (Element) the Stage xml Element
Returns
Stage: Stage instance

convertToDecimation

src/stationxml.ts

Parses a FDSNStationXML Decimation xml element into a Decimation object.

convertToDecimation(decXml: Element): Decimation
Parameters
decXml (Element) the Decimation xml Element
Returns
Decimation: Decimation instance

convertToGain

src/stationxml.ts

Parses a FDSNStationXML Gain xml element into a Gain object.

convertToGain(gainXml: Element): Gain
Parameters
gainXml (Element) the Gain xml Element
Returns
Gain: Gain instance

createInterval

src/stationxml.ts
createInterval(start: DateTime, end: (null | DateTime)): Interval
Parameters
start (DateTime)
end ((null | DateTime))
Returns
Interval

extractComplex

src/stationxml.ts

Extracts a complex number from an stationxml element.

extractComplex(el: Element): InstanceType<any>
Parameters
el (Element) xml element
Returns
InstanceType<any>: Complex instance

Generator function to access all stations within all networks in the array.

allStations(networks: Array<Network>): Generator<Station, void, any>
Parameters
networks (Array<Network>) array of Networks
Returns
Generator<Station, void, any>

Generator function to access all channels within all stations within all networks in the array.

allChannels(networks: Array<Network>): Generator<Channel, void, any>
Parameters
networks (Array<Network>) array of Networks
Returns
Generator<Channel, void, any>

findChannels

src/stationxml.ts

Extract all channels from all stations from all networks in the input array. Regular expressions may be used instaed of exact code matchs.

findChannels(networks: Array<Network>, netCode: string, staCode: string, locCode: string, chanCode: string): Generator<Channel, void, any>
Parameters
networks (Array<Network>) Array of networks.
netCode (string) network code to match
staCode (string) station code to match
locCode (string) location code to match
chanCode (string) channel code to match
Returns
Generator<Channel, void, any>

uniqueSourceIds

src/stationxml.ts
uniqueSourceIds(channelList: Iterable<Channel>): Array<FDSNSourceId>
Parameters
channelList (Iterable<Channel>)
Returns
Array<FDSNSourceId>

uniqueStations

src/stationxml.ts
uniqueStations(channelList: Iterable<Channel>): Array<Station>
Parameters
channelList (Iterable<Channel>)
Returns
Array<Station>

uniqueNetworks

src/stationxml.ts
uniqueNetworks(channelList: Iterable<Channel>): Array<Network>
Parameters
channelList (Iterable<Channel>)
Returns
Array<Network>

fetchStationXml

src/stationxml.ts

Fetches and parses StationXML from a URL. This can be used in instances where a static stationXML file is available on a web site instead of via a web service with query paramters.

fetchStationXml(url: (string | URL), timeoutSec: any, nodata: any): Promise<Array<Network>>
Parameters
url ((string | URL)) the url to download from
timeoutSec (any = 10) timeout in case of failed connection
nodata (any = 204) http code for no data
Returns
Promise<Array<Network>>: Promise to parsed StationXML as an Network array
parseUtil
Static Members
_grabFirstEl
_grabFirstElText
_grabFirstElFloat
_grabFirstElInt
_grabAttribute
_requireAttribute
_grabAttributeNS