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: Seismogram, response: Response, lowCut: number, lowPass: number, highPass: number, highCut: number): Seismogram
Parameters
seis (Seismogram) seismogram to instrument correct
response (Response) response to apply
lowCut (number) low cut
lowPass (number) low pass
highPass (number) high pass
highCut (number) high cut
Returns
Seismogram: instrument corrected seismogram

transferSacPZ

src/transfer.js
transferSacPZ(seis: Seismogram, sacPoleZero: SacPoleZero, lowCut: number, lowPass: number, highPass: number, highCut: number): Seismogram
Parameters
seis (Seismogram)
sacPoleZero (SacPoleZero)
lowCut (number)
lowPass (number)
highPass (number)
highCut (number)
Returns
Seismogram

transferSacPZSegment

src/transfer.js
transferSacPZSegment(seis: SeismogramSegment, sacPoleZero: SacPoleZero, lowCut: number, lowPass: number, highPass: number, highCut: number): SeismogramSegment
Parameters
seis (SeismogramSegment)
sacPoleZero (SacPoleZero)
lowCut (number)
lowPass (number)
highPass (number)
highCut (number)
Returns
SeismogramSegment

calcResponse

src/transfer.js
calcResponse(response: Response, numPoints: number, sampleRate: number, unit: (string | Qty)): FFTResult
Parameters
response (Response)
numPoints (number)
sampleRate (number)
unit ((string | Qty) = "m")
Returns
FFTResult

calcResponseFromSacPoleZero

src/transfer.js

Caclulates the frequency response from the given poles and zeros.

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

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

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

evalPoleZeroInverse

src/transfer.js

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: SacPoleZero, freq: number): any
Parameters
sacPoleZero (SacPoleZero) SAC PoleZero response
freq (number) frequency to evaluate
Returns
any: complex frequency domain value for this frequency

calcFreqTaper

src/transfer.js

Calculates the frequency taper for the given parameters.

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

applyFreqTaper

src/transfer.js

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

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

commonly used units as Qty

UNITS
Static Members
METER_PER_SECOND
METER_PER_SECOND_PER_SECOND

convertToSacPoleZero

src/transfer.js

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: Response): any
Parameters
response (Response) stationxml Response to convert
Returns
any: SAC PoleZero style version of the response
calc_A0(poles: Array<Complex>, zeros: Array<Complex>, ref_freq: number)
Parameters
poles (Array<Complex>)
zeros (Array<Complex>)
ref_freq (number)