Constant for bandpass OregonDSP filter creation.

BAND_PASS

Type: string

Constant for lowpass OregonDSP filter creation.

LOW_PASS

Type: string

Constant for highpass OregonDSP filter creation.

HIGH_PASS

Type: string

amplitude(real: any, imag: any)
Parameters
real (any)
imag (any)

Remove the mean from a seismogram. Subtract the mean from each data point.

rMean(seis: any): any
Parameters
seis (any) input seismogram
Returns
any: seismogram with mean of zero

Calculate best fit line to seismogram. Limited to contiguous data currently. Code derived from scm/lifite.c in SAC. Original version from Steve Taylor.

lineFit(seis: any, referenceTime: any): any
Parameters
seis (any) [description]
referenceTime (any) [description]
Returns
any: best fit line

removeTrend

dist/filter.mjs

Returns a new Seismogram with the trend removed by subtracting the trend line from each data point.

removeTrend(seis: any, fitLine: any): any
Parameters
seis (any) input seismogram
fitLine (any) optional fit type
Returns
any: seismogram with mean of zero and best fit line horizontal

gainCorrect

dist/filter.mjs

Apply the frequency independent overall gain to a seismogram. This does not do a full transfer using poles and zero, this only applies the scalar conversion factor to convert counts back to original real world units and update the units.

gainCorrect(seis: any, instrumentSensitivity: any): any
Parameters
seis (any) the seismogram to correct
instrumentSensitivity (any) overall gain object, usually pulled from stationxml
Returns
any: new seismogram with original units, like m/s and gain applied.
mul(seis: any, factor: any)
Parameters
seis (any)
factor (any)
add(seis: any, factor: any)
Parameters
seis (any)
factor (any)

getPassband

dist/filter.mjs
getPassband(type: any)
Parameters
type (any)

createButterworth

dist/filter.mjs

Creates a Butterworth IIR filter using the OregonDSP library.

createButterworth(numPoles: any, passband: any, lowFreqCorner: any, highFreqCorner: any, delta: any): any
Parameters
numPoles (any) number of poles
passband (any) type, use constants of BAND_PASS, LOW_PASS, HIGH_PASS
lowFreqCorner (any) low corner frequency
highFreqCorner (any) high corner frequency
delta (any) delta, period, of timeseries
Returns
any: Butterworth IIR filter

createChebyshevI

dist/filter.mjs

Creates a Chebyshev I IIR filter using the OregonDSP library.

createChebyshevI(numPoles: any, epsilon: any, passband: any, lowFreqCorner: any, highFreqCorner: any, delta: any): any
Parameters
numPoles (any) number of poles
epsilon (any) Chebyshev epsilon value
passband (any) type, use constants of BAND_PASS, LOW_PASS, HIGH_PASS
lowFreqCorner (any) low corner frequency
highFreqCorner (any) high corner frequency
delta (any) delta, period, of timeseries
Returns
any: Chebyshev I IIR filter

createChebyshevII

dist/filter.mjs

Creates a Chebyshev II IIR filter using the OregonDSP library.

createChebyshevII(numPoles: any, epsilon: any, passband: any, lowFreqCorner: any, highFreqCorner: any, delta: any): any
Parameters
numPoles (any) number of poles
epsilon (any) Chebyshev epsilon value
passband (any) type, use constants of BAND_PASS, LOW_PASS, HIGH_PASS
lowFreqCorner (any) low corner frequency
highFreqCorner (any) high corner frequency
delta (any) delta, period, of timeseries
Returns
any: Chebyshev II IIR filter

applyFilter

dist/filter.mjs

Applies the filter to the given seismogram.

applyFilter(iirFilter: any, seis: any): any
Parameters
iirFilter (any) filter to apply
seis (any) seismogram to apply filter to
Returns
any: filtered seismogram

Calculates the envelope, y_i = sqrt( y_i * y_i + h_i * h_i) where h is the hilber transform of y. The default configuration for the hilbet transform is n=100, lowEdge=.05 and highEdge = 0.95

envelope(seis: any): any
Parameters
seis (any) seismogram to apply envelope to
Returns
any: seismogram cloned but with data as the envelope

Calculates the hilbert transform using the OregonDSP library with default number of points, n=10 (to yield a 21 pt FIR transform) and default low and high edge of 0.05 and 0.95. Low and high edge are given normalized 0 to 1.

Note this uses Float32Array, other array types will be converted, possibly losing precision.

hilbert(seis: any, n: any, lowEdge: any, highEdge: any): any
Parameters
seis (any) seismogram to calculate from
n (any) optional number of points in transform, default is 10
lowEdge (any) low edge of filter, normailized to 0-1, default is 0.05
highEdge (any) high edge of filter, normailized to 0-1, default is 0.95
Returns
any: hilbert transformed data

differentiate

dist/filter.mjs

Differentiate a seismogram.

differentiate(seis: any): any
Parameters
seis (any) input seismogram
Returns
any: differentiated seismogram

Integrate a seismogram.

integrate(seis: any, integrationConst: any): any
Parameters
seis (any) input seismogram
integrationConst (any = 0) integration constant, optional, defaults to 0
Returns
any: integrated seismogram