seisplotjs

3.1.4
QML_NS

Type: string

BED_NS

Type: string

IRIS_NS

Type: string

ANSS_NS

Type: string

ANSS_CATALOG_NS

src/quakeml.ts
ANSS_CATALOG_NS

Type: string

USGS_HOST

Type: string

UNKNOWN_MAG_TYPE

src/quakeml.ts
UNKNOWN_MAG_TYPE

Type: string

UNKNOWN_PUBLIC_ID

src/quakeml.ts
UNKNOWN_PUBLIC_ID

Type: string

FAKE_ORIGIN_TIME

src/quakeml.ts
FAKE_ORIGIN_TIME

FAKE_EMPTY_XML

src/quakeml.ts
FAKE_EMPTY_XML

Type: string

QUAKE_CLICK_EVENT

src/quakeml.ts
QUAKE_CLICK_EVENT

Type: string

createQuakeClickEvent

src/quakeml.ts

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

createQuakeClickEvent(q: Quake, mouseclick: Event): CustomEvent
Parameters
q (Quake) Quake clicked on
mouseclick (Event) original mouse click Event
Returns
CustomEvent: CustomEvent populated with quake field in detail.

EventParameters

src/quakeml.ts

Represent a QuakeML EventParameters.

new EventParameters()

Extends BaseElement

Static Members
createFromXml(eventParametersQML, host?)
Instance Members
eventList
description

Represent a QuakeML Event. Renamed to Quake as Event conflicts with other uses in javascript.

new Quake()

Extends BaseElement

Static Members
createFromXml(qml, host?)
extractEventId(qml, host?)
Instance Members
eventId
descriptionList
amplitudeList
stationMagnitudeList
magnitudeList
originList
pickList
focalMechanismList
preferredOrigin
preferredMagnitude
preferredFocalMechanism
type
typeCertainty
hasPreferredOrigin()
hasOrigin()
origin
hasPreferredMagnitude()
hasMagnitude()
magnitude
time
latitude
longitude
depth
depthKm
description
arrivals
picks
toString()

EventDescription

src/quakeml.ts

Represents a QuakeML EventDescription.

new EventDescription(text: string)
Parameters
text (string)
Static Members
createFromXml(descriptionQML)
Instance Members
text
type
toString()

Represents a QuakeML Amplitude.

new Amplitude(genericAmplitude: RealQuantity)

Extends BaseElement

Parameters
genericAmplitude (RealQuantity)
Static Members
createFromXml(amplitudeQML, allPicks)
Instance Members
genericAmplitude
type
category
unit
methodID
period
timeWindow
pick
waveformID
filterID
scalingTime
magnitudeHint
evaluationMode
evaluationStatus

StationMagnitude

src/quakeml.ts

Represents a QuakeML StationMagnitude.

new StationMagnitude(origin: Origin, mag: RealQuantity)

Extends BaseElement

Parameters
origin (Origin)
mag (RealQuantity)
Static Members
createFromXml(stationMagnitudeQML, allOrigins, allAmplitudes)
Instance Members
origin
type
amplitude
methodID
waveformID

TimeWindow

src/quakeml.ts

Represents a QuakeML TimeWindow.

new TimeWindow(begin: number, end: number, reference: DateTime)
Parameters
begin (number)
end (number)
reference (DateTime)
Static Members
createFromXml(timeWindowQML)
Instance Members
begin
reference

Represents a QuakeML Origin.

new Origin(time: (TimeQuantity | DateTime), latitude: (RealQuantity | number), longitude: (RealQuantity | number))

Extends BaseElement

Parameters
time ((TimeQuantity | DateTime))
latitude ((RealQuantity | number))
longitude ((RealQuantity | number))
Static Members
createFromXml(qml, allPicks)
Instance Members
compositeTimes
originUncertainty
arrivalList
timeQuantity
latitudeQuantity
longitudeQuantity
depthQuantity
depthType
timeFixed
epicenterFixed
referenceSystemID
methodID
earthModelID
quality
type
region
evaluationMode
evaluationStatus
toString()
time
time
latitude
latitude
longitude
longitude
depthKm
depth
depth
arrivals

CompositeTime

src/quakeml.ts

Represents a QuakeML CompositeTime.

new CompositeTime()
Static Members
createFromXml(qml)
Instance Members

OriginUncertainty

src/quakeml.ts

Represents a QuakeML OriginUncertainty.

new OriginUncertainty()
Static Members
createFromXml(qml)
Instance Members
horizontalUncertainty
minHorizontalUncertainty
maxHorizontalUncertainty
azimuthMaxHorizontalUncertainty
confidenceEllipsoid
preferredDescription
confidenceLevel

ConfidenceEllipsoid

src/quakeml.ts

Represents a QuakeML ConfidenceEllipsoid.

new ConfidenceEllipsoid(semiMajorAxisLength: number, semiMinorAxisLength: number, semiIntermediateAxisLength: number, majorAxisPlunge: number, majorAxisAzimuth: number, majorAxisRotation: number)
Parameters
semiMajorAxisLength (number)
semiMinorAxisLength (number)
semiIntermediateAxisLength (number)
majorAxisPlunge (number)
majorAxisAzimuth (number)
majorAxisRotation (number)
Static Members
createFromXml(qml)
Instance Members
semiMajorAxisLength
semiMinorAxisLength
semiIntermediateAxisLength
majorAxisPlunge
majorAxisAzimuth
majorAxisRotation

OriginQuality

src/quakeml.ts

Represents a QuakeML OriginQuality.

new OriginQuality()
Static Members
createFromXml(qml)
Instance Members
associatedPhaseCount
usedPhaseCount
associatedStationCount
usedStationCount
depthPhaseCount
standardError
azimuthalGap
secondaryAzimuthalGap
groundTruthLevel
maximumDistance
minimumDistance
medianDistance

Represents a QuakeML Magnitude.

new Magnitude(mag: (RealQuantity | number), type: string?)

Extends BaseElement

Parameters
mag ((RealQuantity | number))
type (string?)
Static Members
createFromXml(qml, allOrigins, allStationMagnitudes)
Instance Members
stationMagnitudeContributions
magQuantity
type
origin
methodID
stationCount
azimuthalGap
evaluationMode
evaluationStatus
toString()
mag
mag

StationMagnitudeContribution

src/quakeml.ts

Represents a QuakeML StationMagnitudeContribution.

new StationMagnitudeContribution(stationMagnitude: StationMagnitude)
Parameters
stationMagnitude (StationMagnitude)
Static Members
createFromXml(qml, allStationMagnitudes)
Instance Members
stationMagnitude
residual
weight

Represents a QuakeML Arrival, a combination of a Pick with a phase name.

new Arrival(phase: string, pick: Pick)

Extends BaseElement

Parameters
phase (string)
pick (Pick)
Static Members
createFromXml(arrivalQML, allPicks)
Instance Members
phase
pick
timeCorrection
azimuth
distance
takeoffAngle
timeResidual
horizontalSlownessResidual
backazimuthResidual
timeWeight
horizontalSlownessWeight
backazimuthWeight
earthModelID

Represents a QuakeML Pick.

new Pick(time: (TimeQuantity | DateTime), waveformID: WaveformID)

Extends BaseElement

Parameters
time ((TimeQuantity | DateTime))
waveformID (WaveformID)
Static Members
createFromXml(pickQML)
Instance Members
timeQuantity
waveformID
filterID
methodID
horizontalSlowness
backazimuth
slownessMethodID
onset
phaseHint
polarity
evaluationMode
evaluationStatus
time
time
networkCode
stationCode
locationCode
channelCode
isAtStation(station)
isOnChannel(channel)
toString()

FocalMechanism

src/quakeml.ts

Represents a QuakeML Focal Mechanism.

new FocalMechanism()

Extends BaseElement

Static Members
createFromXml(focalMechQML, allOrigins, allMagnitudes)
Instance Members
waveformIDList
momentTensorList
triggeringOrigin
nodalPlanes
principalAxes
azimuthalGap
stationPolarityCount
misfit
stationDistributionRatio
methodID
evaluationMode
evaluationStatus

NodalPlanes

src/quakeml.ts

Represents a QuakeML NodalPlanes.

new NodalPlanes()
Static Members
createFromXml(nodalPlanesQML)
Instance Members
nodalPlane1
nodalPlane2
preferredPlane

NodalPlane

src/quakeml.ts

Represents a QuakeML NodalPlane.

new NodalPlane(strike: RealQuantity, dip: RealQuantity, rake: RealQuantity)
Parameters
strike (RealQuantity)
dip (RealQuantity)
rake (RealQuantity)
Static Members
createFromXml(nodalPlaneQML)
Instance Members

PrincipalAxes

src/quakeml.ts

Represents a QuakeML PrincipalAxes.

new PrincipalAxes(tAxis: Axis, pAxis: Axis)
Parameters
tAxis (Axis)
pAxis (Axis)
Static Members
createFromXml(princpalAxesQML)
Instance Members
tAxis
pAxis
nAxis

Represents a QuakeML Axis.

new Axis(azimuth: RealQuantity, plunge: RealQuantity, length: RealQuantity)
Parameters
azimuth (RealQuantity)
plunge (RealQuantity)
length (RealQuantity)
Static Members
createFromXml(axisQML)
Instance Members
azimuth
plunge
length

MomentTensor

src/quakeml.ts

Represents a QuakeML MomentTensor.

new MomentTensor(derivedOrigin: Origin)

Extends BaseElement

Parameters
derivedOrigin (Origin)
Static Members
createFromXml(momentTensorQML, allOrigins, allMagnitudes)
Instance Members
dataUsedList
derivedOrigin
momentMagnitude
scalarMoment
tensor
variance
varianceReduction
doubleCouple
clvd
greensFunctionID
filterID
sourceTimeFunction
methodID
category
inversionType

Represents a QuakeML Tensor.

new Tensor(Mrr: RealQuantity, Mtt: RealQuantity, Mpp: RealQuantity, Mrt: RealQuantity, Mrp: RealQuantity, Mtp: RealQuantity)
Parameters
Static Members
createFromXml(tensorQML)
Instance Members

SourceTimeFunction

src/quakeml.ts

Represents a QuakeML SourceTimeFunction.

new SourceTimeFunction(type: string, duration: number)
Parameters
type (string)
duration (number)
Static Members
createFromXml(sourceTimeFunctionQML)
Instance Members
type
duration
riseTime
decayTime

Represents a QuakeML DataUsed.

new DataUsed(waveType: string)
Parameters
waveType (string)
Static Members
createFromXml(dataUsedQML)
Instance Members
waveType
stationCount
componentCount
shortestPeriod
longestPeriod

WaveformID

src/quakeml.ts

Represents a QuakeML WaveformID.

new WaveformID(networkCode: string, stationCode: string)
Parameters
networkCode (string)
stationCode (string)
Static Members
createFromXml(waveformQML)
Instance Members
networkCode
stationCode
channelCode
locationCode
toString()
new Quantity(value: T)
Parameters
value (T)
Static Members
_createFromXml(quantityQML, grab, grabUncertainty)
createRealQuantityFromXml(realQuantityQML)
createIntegerQuantityFromXml(integerQuantityQML)
createTimeQuantityFromXml(timeQuantityQML)
Instance Members
value
uncertainty
lowerUncertainty
upperUncertainty
confidenceLevel

IntegerQuantity

src/quakeml.ts
IntegerQuantity

Type: Quantity<number>

RealQuantity

src/quakeml.ts
RealQuantity

Type: Quantity<number>

TimeQuantity

src/quakeml.ts
TimeQuantity

Type: Quantity<DateTime>

Represents a QuakeML comment.

new Comment(text: string)
Parameters
text (string)
Static Members
createFromXml(commentQML)
Instance Members
text
creationInfo

CreationInfo

src/quakeml.ts
new CreationInfo()
Static Members
createFromXml(creationInfoQML)
Instance Members
agencyID
agencyURI
author
authorURI
creationTime
version

parseQuakeML

src/quakeml.ts

Parses a QuakeML xml document into seisplotjs objects

parseQuakeML(rawXml: Document, host: string?): EventParameters
Parameters
rawXml (Document) the xml Document to parse
host (string?) optional source of the xml, helpful for parsing the eventid
Returns
EventParameters: EventParameters object

createQuakeFromValues

src/quakeml.ts
createQuakeFromValues(publicId: string, time: DateTime, latitude: number, longitude: number, depth_meter: number): Quake
Parameters
publicId (string)
time (DateTime)
latitude (number)
longitude (number)
depth_meter (number)
Returns
Quake

fetchQuakeML

src/quakeml.ts

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

fetchQuakeML(url: (string | URL), timeoutSec: any, nodata: any): Promise<EventParameters>
Parameters
url ((string | URL)) the url to download from
timeoutSec (any = 10) timeout seconds in case of failed connection
nodata (any = 204) nodata http error code
Returns
Promise<EventParameters>: Promise to parsed quakeML as an EventParameters object
parseUtil
Static Members
_grabFirstEl
_grabFirstElNS
_grabFirstElText
_grabFirstElFloat
_grabFirstElInt
_grabAttribute
_requireAttribute
_grabAttributeNS