3.0.0-alpha.0
A higher level function to calculate DFT. Returns a FFTResult for easier access to the result as complex, amp, phase arrays. Calls calcDFT internally. Inverse FFT is available as FFTResult.fftInverse().
((Seismogram | SeismogramDisplayData))
seismogram or SeismogramDisplayData to transform
FFTResult
:
fft of seismogram
Calculates the discrete fourier transform using the OregonDSP library.
This is a lower level function, fftForward is better for most uses.
((Int32Array | Float32Array | Float64Array))
timeseries array
Float32Array
:
DFT as packed array Float32Array
Calculates the inverse discrete fourier transform using the oregondsp library.
(Float32Array)
DFT as packed array Float32Array
(number)
number of points in original timeseries array.
Float32Array
:
inverse of DFT as a timeseries array
Finds smallest power of two >= input number.
(number)
input number
[number, number]
:
tuple of N and log2N, like [16,4]
Results of FFT calculation. Allows convertion of the packed real/imag array output from calcDFT into amplitude and phase.
Factory method to create FFTResult from packed array.
(Float32Array)
real and imag values in packed format
(number)
length of the original timeseries before padding.
(number)
sample rate of original data
FFTResult
:
FFTResult
Factory method to create from array of complex numbers.
(Array<InstanceType<any>>)
real and imag values as array of Complex objects.
(number)
length of the original timeseries before padding.
(number)
sample rate of original data
FFTResult
:
FFTResult
Factory method to create from amp and phase arrays
(Float32Array)
amplitude values
(Float32Array)
phase values
(number)
length of the original timeseries before padding.
(number)
sample rate of original data
FFTResult
:
FFTResult
number of points in the original timeseries, may be less than fft size.
Type: number
Type: Float32Array
number of points in the fft, usually power of 2 larger than origLength.
Type: number
optional units of the original data for display purposes.
optional reference to SeismogramDisplayData when calculated from a seismogram. Useful for creating title, etc.
Type: (SeismogramDisplayData | undefined)
[Float32Array, Float32Array]
calculates the inverse fft of this.packedFreq
Float32Array
:
time domain representation
Float32Array
Float32Array
Float32Array