Applies response, poles and zeros along with overall gain to the seismogram. Should produce results similar to the sac command: transfer from polezero to none

transfer(seis: any, response: any, lowCut: any, lowPass: any, highPass: any, highCut: any): any
Parameters
seis (any) seismogram to instrument correct
response (any) response to apply
lowCut (any) low cut
lowPass (any) low pass
highPass (any) high pass
highCut (any) high cut
Returns
any: instrument corrected seismogram

transferSacPZ

dist/transfer.mjs
transferSacPZ(seis: any, sacPoleZero: any, lowCut: any, lowPass: any, highPass: any, highCut: any)
Parameters
seis (any)
sacPoleZero (any)
lowCut (any)
lowPass (any)
highPass (any)
highCut (any)

transferSacPZSegment

dist/transfer.mjs
transferSacPZSegment(seis: any, sacPoleZero: any, lowCut: any, lowPass: any, highPass: any, highCut: any)
Parameters
seis (any)
sacPoleZero (any)
lowCut (any)
lowPass (any)
highPass (any)
highCut (any)

calcResponse

dist/transfer.mjs
calcResponse(response: any, numPoints: any, sampleRate: any, unit: any)
Parameters
response (any)
numPoints (any)
sampleRate (any)
unit (any)

calcResponseFromSacPoleZero

dist/transfer.mjs

Caclulates the frequency response from the given poles and zeros.

calcResponseFromSacPoleZero(sacPoleZero: any, numPoints: any, sampleRate: any): any
Parameters
sacPoleZero (any) poles and zeros
numPoints (any) number of points in the output fft
sampleRate (any) sample rate to compute at
Returns
any: frequency response

Applies poles and zeros to the fft of a time series. Modifies the freqValues in place.

combine(freqValues: any, sampFreq: any, sacPoleZero: any, lowCut: any, lowPass: any, highPass: any, highCut: any): any
Parameters
freqValues (any) fft of a timeseries
sampFreq (any) sampling frequency
sacPoleZero (any) poles and zeros
lowCut (any) low cut
lowPass (any) low pass
highPass (any) high pass
highCut (any) high cut
Returns
any: input freq values, with poles and zeros applied

evalPoleZeroInverse

dist/transfer.mjs

Evaluates the poles and zeros at the given value. The return value is 1/(pz(s) to avoid divide by zero issues. If there is a divide by zero situation, then the response is set to be 0+0i.

evalPoleZeroInverse(sacPoleZero: any, freq: any): any
Parameters
sacPoleZero (any) SAC PoleZero response
freq (any) frequency to evaluate
Returns
any: complex frequency domain value for this frequency

calcFreqTaper

dist/transfer.mjs

Calculates the frequency taper for the given parameters.

calcFreqTaper(freq: any, lowCut: any, lowPass: any, highPass: any, highCut: any): any
Parameters
freq (any) frequency
lowCut (any) low cut
lowPass (any) low pass
highPass (any) high pass
highCut (any) high cut
Returns
any: taper value at the frequency

applyFreqTaper

dist/transfer.mjs

Applies the frequency taper to the fft of the time series.

applyFreqTaper(fftResult: any, sampleRate: any, lowCut: any, lowPass: any, highPass: any, highCut: any): any
Parameters
fftResult (any) fft of time series
sampleRate (any) sample rate
lowCut (any) low cut
lowPass (any) low pass
highPass (any) high pass
highCut (any) high cut
Returns
any: fft with taper applied

commonly used units

METER

METER_PER_SECOND

dist/transfer.mjs
METER_PER_SECOND

METER_PER_SECOND_PER_SECOND

dist/transfer.mjs
METER_PER_SECOND_PER_SECOND
calcGamma(unit: any)
Parameters
unit (any)

calcScaleUnit

dist/transfer.mjs
calcScaleUnit(unit: any)
Parameters
unit (any)

convertToSacPoleZero

dist/transfer.mjs

Converts a StationXML response to SAC PoleZero style. This converts the analog to digital stage (usually 0) along with the overall gain, but does not include later FIR stages. To maintain compatibility with SAC, this includes extra zeros if needed to convert to displacement. The number of extra zeros added is kept as gamma in the result.

convertToSacPoleZero(response: any): any
Parameters
response (any) stationxml Response to convert
Returns
any: SAC PoleZero style version of the response

convertPoleZeroToSacStyle

dist/transfer.mjs
convertPoleZeroToSacStyle(polesZeros: any, sensitivity: any, sensitivity_freq: any, gamma: any)
Parameters
polesZeros (any)
sensitivity (any)
sensitivity_freq (any)
gamma (any)
calc_A0(poles: any, zeros: any, ref_freq: any)
Parameters
poles (any)
zeros (any)
ref_freq (any)