API / geotoolkit / seismic / analysis / transforms / FFT / FFT
transforms.FFT.FFT
Defines a class capable of computing the forward and backward Fast Fourier Transform Ported from the Saddleback Geosolution's Java implementation of the FFT. This implementation uses radix 2, 4 and 8 butterflies.
↳
FFT↳↳
RealFFT
Constructors
Methods
Constructors
• new FFT(real?, imag?, sampleRate?, length?)
| Name | Type | Description |
|---|---|---|
Optional real | Float32Array | The real component of the signal |
Optional imag | Float32Array | The imaginary component of th signal |
Optional sampleRate | number | The data sampling rate in milliseconds |
Optional length | number | The desired length of the transform, must be a power of 2 |
AbstractFFTSpectra.constructor
Methods
▸ getClassName(): string
string
AbstractFFTSpectra.getClassName
▸ getFDSampleRate(): number
Returns the Frequency Domain sample rate. This is the frequency domain sample spacing.
number
FrequencySampleRate Frequency Domain sampling rate in milliseconds (ms)
AbstractFFTSpectra.getFDSampleRate
▸ getFFTAmplitude(): Float32Array
Computes the Amplitude spectrum of the input signal.*
Float32Array
amplitudes - array containing the amplitude spectrum
AbstractFFTSpectra.getFFTAmplitude
▸ getFFTAmplitudeSmooth(hzLength): Float32Array
Computes the Amplitude spectrum of the input signal and smoothes the output to hzLength (in frequency).
| Name | Type | Description |
|---|---|---|
hzLength | number | int operator length in hz/samples |
Float32Array
amplitudes - array containing the amplitude spectrum
AbstractFFTSpectra.getFFTAmplitudeSmooth
▸ getFFTPhaseDegrees(): Float32Array
Computes the phase spectrum of the input signal in degrees.
Float32Array
phases - array containing the phase spectrum of the input signal in degrees.
AbstractFFTSpectra.getFFTPhaseDegrees
▸ getFFTPhaseInDegreesUnWrapped(): Float32Array
Computes the phase spectrum in unwrapped degrees in the range(0->360).
Float32Array
phases - array containing the unwrapped phase spectrum in degrees
AbstractFFTSpectra.getFFTPhaseInDegreesUnWrapped
▸ getFFTPhaseInRadiansUnWrapped(): Float32Array
Computes the phase spectrum in unwrapped radians in the range(-pi to +pi).
Float32Array
phases - array containing the unwrapped phase spectrum in radians
AbstractFFTSpectra.getFFTPhaseInRadiansUnWrapped
▸ getFFTPhaseRadians(): Float32Array
Computes the phase spectrum in radians of the input signal.
This is the phase spectrum of the input signal in range of 0 to 2*pi.
Float32Array
phases - array containing the phase spectrum in radians
AbstractFFTSpectra.getFFTPhaseRadians
▸ getFFTPower(): Float32Array
Computes the power spectrum (amplitude squared) of the FFT.
Float32Array
powers - array containing the power spectrum
AbstractFFTSpectra.getFFTPower
▸ getFFTPowerInDb(): Float32Array
Computes the power spectrum (amplitude squared) of the FFT. This is the the power spectrum in dB-down, based on the maximum power value associated with (0(Zero) db down).
Float32Array
powersDb - array container the power spectrum in dB
AbstractFFTSpectra.getFFTPowerInDb
▸ getFFTPowerInDbNormalized(pReference): Float32Array
Computes the normalized power spectrum (amplitude squared) of the FFT.
This is the the power spectrum in dB-down, based on the reference power value supplied in the parameter nFactor.
| Name | Type | Description |
|---|---|---|
pReference | number | float reference value |
Float32Array
powersDbNorm - array containing the power spectrum in dB
AbstractFFTSpectra.getFFTPowerInDbNormalized
▸ getFFTPowerInDbSmoothed(hzLength): Float32Array
Computes the smoothed & normalized dB power spectrum (amplitude squared) of the FFT. This is the the power spectrum in dB-down, based on the maximum power value associated with (0(Zero) db down).
| Name | Type | Description |
|---|---|---|
hzLength | number | int operator length in hz/samples |
Float32Array
powersDbSmoothed - array containing the power specturm in db and smoothed.
AbstractFFTSpectra.getFFTPowerInDbSmoothed
▸ getFFTPowerSmoothed(hzLength): Float32Array
Computes the smoothed power spectrum (amplitude squared) of the FFT.
| Name | Type | Description |
|---|---|---|
hzLength | number | int operator length in hz/samples |
Float32Array
powerSmoothed - array containing the smoothed power spectrum
AbstractFFTSpectra.getFFTPowerSmoothed
▸ getHalfLength(): number
Returns half of the length of the calculated FFT (power-of-2)
number
halfLength The half-length of the FFT
AbstractFFTSpectra.getHalfLength
▸ getImaginaryComponents(getReference): Float32Array
Gets the imaginary signal component
| Name | Type | Description |
|---|---|---|
getReference | boolean | If true then the reference to signal will be returned. |
Float32Array
realComponent The real signal component
AbstractFFTSpectra.getImaginaryComponents
▸ getLength(): number
Returns the length of the calculated FFT (power-of-2).
number
length The length of calculated FFT
▸ getLog2Length(): number
Returns the base 2 logarithm of the transform length
number
logLength Log base 2 of the transform length
AbstractFFTSpectra.getLog2Length
▸ getNumberNonZeroSamples(): number
Returns the number of non zero samples that were input inot the last FFT. This is the number of live samples (less than or equal to a power-of-2);
number
nonZero The Number of non-zero samples for input signal
AbstractFFTSpectra.getNumberNonZeroSamples
▸ getNyquist(): number
Returns the nyquist frequency for the input signal. This is the calculated nyquist frequency based on the supplied sample rate. This is also known as the folding frequency
number
nyquist The nyquist frequency
▸ getNyquistLength(): number
Returns the sample number of frequency that equals nyquist frequency.
number
frequency The Nyquist frequency
AbstractFFTSpectra.getNyquistLength
▸ getRealComponents(getReference): Float32Array
Gets the real signal component
| Name | Type | Description |
|---|---|---|
getReference | boolean | If true then the reference to signal will be returned. |
Float32Array
realComponent The real signal component
AbstractFFTSpectra.getRealComponents
▸ getSampleRate(): number
Returns the input sample rate of the signal in Milliseconds. This is the sample rate set before calculation.
number
sampleRate Sample rate of input signal in milliseconds (ms)
AbstractFFTSpectra.getSampleRate
▸ inverseTransform(): void
Performs the inverse transform
void
AbstractFFTSpectra.inverseTransform
▸ setData(real?, imag?, sampleRate?, length?): FFT
Sets the real and imaginary result array
| Name | Type | Description |
|---|---|---|
Optional real | number[] | Float32Array | The real component of the signal |
Optional imag | number[] | Float32Array | The imaginary component of the signal |
Optional sampleRate | string | number | The data sampling rate in milliseconds |
Optional length | string | number | The desired length of the transform, must be a power of 2 |
▸ setDataUnsafe(real, imag): FFT
Sets the real and imaginary arrays directly
| Name | Type | Description |
|---|---|---|
real | Float32Array | The imaginary component of the signal |
imag | Float32Array | The real component of the signal |
AbstractFFTSpectra.setDataUnsafe
▸ setSampleRate(sampleRate): FFT
Sets the input sample rate of the signal in Milliseconds.
| Name | Type | Description |
|---|---|---|
sampleRate | number | Sample rate of input signal in milliseconds (ms) |
this
AbstractFFTSpectra.setSampleRate
▸ transform(): void
Performs the transform
void
▸ Static getClassName(): string
string