import { FFTResult } from "./fft.mjs"; import { SeismogramSegment } from "./seismogramsegment.mjs"; import { Seismogram } from "./seismogram.mjs"; import { SacPoleZero } from "./sacpolezero.mjs"; import { Response, PolesZeros } from "./stationxml.mjs"; import { Complex } from "./oregondsputil.mjs"; import type { AllMeasures, AllMeasuresSystems, AllMeasuresUnits } from "convert-units/definitions/all"; /** * 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 * * @param seis seismogram to instrument correct * @param response response to apply * @param lowCut low cut * @param lowPass low pass * @param highPass high pass * @param highCut high cut * @returns instrument corrected seismogram */ export declare function transfer(seis: Seismogram, response: Response, lowCut: number, lowPass: number, highPass: number, highCut: number): Seismogram; export declare function transferSacPZ(seis: Seismogram, sacPoleZero: SacPoleZero, lowCut: number, lowPass: number, highPass: number, highCut: number): Seismogram; export declare function transferSacPZSegment(seis: SeismogramSegment, sacPoleZero: SacPoleZero, lowCut: number, lowPass: number, highPass: number, highCut: number): SeismogramSegment; export declare function calcResponse(response: Response, numPoints: number, sampleRate: number, unit: string): FFTResult; /** * Caclulates the frequency response from the given poles and zeros. * * @param sacPoleZero poles and zeros * @param numPoints number of points in the output fft * @param sampleRate sample rate to compute at * @returns frequency response */ export declare function calcResponseFromSacPoleZero(sacPoleZero: SacPoleZero, numPoints: number, sampleRate: number): FFTResult; /** * Applies poles and zeros to the fft of a time series. Modifies the freqValues * in place. * * @param freqValues fft of a timeseries * @param sampFreq sampling frequency * @param sacPoleZero poles and zeros * @param lowCut low cut * @param lowPass low pass * @param highPass high pass * @param highCut high cut * @returns input freq values, with poles and zeros applied */ export declare function combine(freqValues: Float32Array, sampFreq: number, sacPoleZero: SacPoleZero, lowCut: number, lowPass: number, highPass: number, highCut: number): Float32Array; /** * 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. * * @param sacPoleZero SAC PoleZero response * @param freq frequency to evaluate * @returns complex frequency domain value for this frequency */ export declare function evalPoleZeroInverse(sacPoleZero: SacPoleZero, freq: number): InstanceType; /** * Calculates the frequency taper for the given parameters. * * @param freq frequency * @param lowCut low cut * @param lowPass low pass * @param highPass high pass * @param highCut high cut * @returns taper value at the frequency */ export declare function calcFreqTaper(freq: number, lowCut: number, lowPass: number, highPass: number, highCut: number): number; /** * Applies the frequency taper to the fft of the time series. * * @param fftResult fft of time series * @param sampleRate sample rate * @param lowCut low cut * @param lowPass low pass * @param highPass high pass * @param highCut high cut * @returns fft with taper applied */ export declare function applyFreqTaper(fftResult: FFTResult, sampleRate: number, lowCut: number, lowPass: number, highPass: number, highCut: number): FFTResult; /** * commonly used units */ export declare const METER: import("convert-units").Conversion | null; export declare const METER_PER_SECOND: import("convert-units").Conversion | null; export declare const METER_PER_SECOND_PER_SECOND: import("convert-units").Conversion | null; export declare function calcGamma(unit: string): number; export declare function calcScaleUnit(unit: string): number; /** * 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. * * @param response stationxml Response to convert * @returns SAC PoleZero style version of the response */ export declare function convertToSacPoleZero(response: Response): SacPoleZero; export declare function convertPoleZeroToSacStyle(polesZeros: PolesZeros, sensitivity: number, sensitivity_freq: number, gamma: number): SacPoleZero; export declare function calc_A0(poles: Array>, zeros: Array>, ref_freq: number): number; //# sourceMappingURL=transfer.d.mts.map