seisplotjs.seismograph

3.0.0-alpha.0
BBoxType

Type: {height: number, width: number}

Properties
height (number)
width (number)

MarkerHolderType

src/seismograph.ts
MarkerHolderType

Type: {marker: MarkerType, sdd: SeismogramDisplayData, xscale: any, bbox: BBoxType?}

Properties
marker (MarkerType)
sdd (SeismogramDisplayData)
xscale (any)
bbox (BBoxType?)

SEISMOGRAPH_ELEMENT

src/seismograph.ts
SEISMOGRAPH_ELEMENT

Type: string

seismograph_css

src/seismograph.ts
seismograph_css
COLOR_CSS_ID

Type: string

new Seismograph(seisData: Array<SeismogramDisplayData>?, seisConfig: SeismographConfig?)

Extends SeisPlotElement

Parameters
seisData (Array<SeismogramDisplayData>?)
seisConfig (SeismographConfig?)
Instance Members
plotId
beforeFirstDraw
width
height
outerWidth
outerHeight
svg
canvasHolder
canvas
throttleRescale
throttleResize
throttleRedraw
time_scalable
amp_scalable
seisData
seisData
seismographConfig
seismographConfig
connectedCallback()
disconnectedCallback()
attributeChangedCallback(name, oldValue, newValue)
checkResize()
enableZoom()
redraw()
draw()
printSizes()
drawSeismograms()
isVisible()
drawSeismogramsCanvas()
calcScaleAndZoom()
ampScaleForSeisDisplayData(sdd)
timeScaleForSeisDisplayData(sdd)
drawSeismogramsSvg()
calcSecondsPerPixel(xScale)
segmentDrawLine(seg, timeScale, ampScale)
drawAxis()
ampScaleForAxis()
timeScaleForAxis()
drawTopBottomAxis()
drawLeftRightAxis()
createLeftRightAxis()
rescaleYAxis()
createHandlebarsInput()
drawAxisLabels()
resetZoom()
zoomed(e)
redrawWithXScale()
drawMarkers()
calcWidthHeight(nOuterWidth, nOuterHeight)
throttle(func, delay)
resizeNeeded()
drawTitle()
drawXLabel()
drawXSublabel()
drawYLabel()
drawYSublabel()
calcTimeScaleDomain()
calcAmpScaleDomain()
recheckAmpScaleDomain()
redoDisplayYScale()
getSeismogramData()
appendSeisData(seismogram)
getDisplayDataForSeismogram(seis)
removeSeisData(seisData)
trim(timeRange)

SeismographAmplitudeScalable

src/seismograph.ts
new SeismographAmplitudeScalable(graph: Seismograph)

Extends AmplitudeScalable

Parameters
graph (Seismograph)
Instance Members
drawHalfWidth
drawMiddle
notifyAmplitudeChange(middle, halfWidth)

ZERO_DURATION

src/seismograph.ts
ZERO_DURATION

SeismographTimeScalable

src/seismograph.ts
new SeismographTimeScalable(graph: Seismograph, alignmentTimeOffset: Duration, duration: Duration)

Extends TimeScalable

Parameters
graph (Seismograph)
alignmentTimeOffset (Duration)
duration (Duration)
Instance Members
drawAlignmentTimeOffset
drawDuration
notifyTimeRangeChange(offset, duration)

createMarkersForTravelTimes

src/seismograph.ts

Creates Markers for all of the arrivals in ttime.arrivals, relative to the given Quake.

createMarkersForTravelTimes(quake: Quake, ttime: TraveltimeJsonType): Array<MarkerType>
Parameters
quake (Quake) quake the travel times are relative to
ttime (TraveltimeJsonType) travel times json object as returned from the IRIS traveltime web service, or the json output of TauP
Returns
Array<MarkerType>: array of Markers suitable for adding to a seismograph

createMarkerForOriginTime

src/seismograph.ts

Creates a Marker for the origin time in ttime.arrivals, for the given Quake.

createMarkerForOriginTime(quake: Quake): MarkerType
Parameters
quake (Quake) quake the travel times are relative to
Returns
MarkerType: Marker suitable for adding to a seismograph

createFullMarkersForQuakeAtStation

src/seismograph.ts
createFullMarkersForQuakeAtStation(quake: Quake, station: Station): Array<MarkerType>
Parameters
quake (Quake)
station (Station)
Returns
Array<MarkerType>

createFullMarkersForQuakeAtChannel

src/seismograph.ts
createFullMarkersForQuakeAtChannel(quake: Quake, channel: Channel): Array<MarkerType>
Parameters
quake (Quake)
channel (Channel)
Returns
Array<MarkerType>

createMarkerForPicks

src/seismograph.ts

Creates a Marker for the picked arrival times in quake.arrivals, for the given Quake.

createMarkerForPicks(origin: Origin, channel: Channel): Array<MarkerType>
Parameters
origin (Origin) quake the travel times are relative to
channel (Channel) channel picks made on
Returns
Array<MarkerType>: Marker suitable for adding to a seismograph

createNumberFormatWrapper

src/seismograph.ts

Creates a wrapper for d3 formatter for numbers for axis that keeps typescript happy.

createNumberFormatWrapper(formatter: function (value: number): string): function (nValue: d3.NumberValue): string
Parameters
formatter (function (value: number): string) simple formatter
Returns
function (nValue: d3.NumberValue): string: function that converts input types

createDateFormatWrapper

src/seismograph.ts

Creates a wrapper for d3 formatter for Dates for axis that keeps typescript happy.

createDateFormatWrapper(formatter: function (value: Date): string): function (nValue: (Date | d3.NumberValue), index: number): string
Parameters
formatter (function (value: Date): string) simple formatter
Returns
function (nValue: (Date | d3.NumberValue), index: number): string: function that converts input types