Last updated

API / geotoolkit / seismic / analysis / transforms / AbstractFFT / AbstractFFT

Class: AbstractFFT

transforms.AbstractFFT.AbstractFFT

Defines a base class for various discrete fourier transforms Ported from the Saddleback Geosolution's Java implementation

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new AbstractFFT(real, imag, sampleRate, length)

new AbstractFFT(real?, imag?, sampleRate?, length?)

Parameters

Name Type Description
Optional realFloat32ArrayThe real component of the signal
Optional imagFloat32ArrayThe imaginary component of th signal
Optional sampleRatenumberThe data sampling rate in milliseconds
Optional lengthnumberThe desired length of the transform, must be a power of 2
Methods

getClassName

getClassName(): string

Returns

string


getFDSampleRate

getFDSampleRate(): number

Returns the Frequency Domain sample rate. This is the frequency domain sample spacing.

Returns

number

FrequencySampleRate Frequency Domain sampling rate in milliseconds (ms)


getHalfLength

getHalfLength(): number

Returns half of the length of the calculated FFT (power-of-2)

Returns

number

halfLength The half-length of the FFT


getImaginaryComponents

getImaginaryComponents(getReference): Float32Array

Gets the imaginary signal component

Parameters

Name Type Description
getReferencebooleanIf true then the reference to signal will be returned.

Returns

Float32Array

realComponent The real signal component


getLength

getLength(): number

Returns the length of the calculated FFT (power-of-2).

Returns

number

length The length of calculated FFT


getLog2Length

getLog2Length(): number

Returns the base 2 logarithm of the transform length

Returns

number

logLength Log base 2 of the transform length


getNumberNonZeroSamples

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);

Returns

number

nonZero The Number of non-zero samples for input signal


getNyquist

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

Returns

number

nyquist The nyquist frequency


getNyquistLength

getNyquistLength(): number

Returns the sample number of frequency that equals nyquist frequency.

Returns

number

frequency The Nyquist frequency


getRealComponents

getRealComponents(getReference): Float32Array

Gets the real signal component

Parameters

Name Type Description
getReferencebooleanIf true then the reference to signal will be returned.

Returns

Float32Array

realComponent The real signal component


getSampleRate

getSampleRate(): number

Returns the input sample rate of the signal in Milliseconds. This is the sample rate set before calculation.

Returns

number

sampleRate Sample rate of input signal in milliseconds (ms)


inverseTransform

inverseTransform(): void

Performs the inverse transform

Returns

void


setData

setData(real?, imag?, sampleRate?, length?): AbstractFFT

Sets the real and imaginary result array

Parameters

Name Type Description
Optional realnumber[] | Float32ArrayThe real component of the signal
Optional imagnumber[] | Float32ArrayThe imaginary component of the signal
Optional sampleRatestring | numberThe data sampling rate in milliseconds
Optional lengthstring | numberThe desired length of the transform, must be a power of 2

Returns

AbstractFFT


setDataUnsafe

setDataUnsafe(real, imag): AbstractFFT

Sets the real and imaginary arrays directly

Parameters

Name Type Description
realFloat32ArrayThe imaginary component of the signal
imagFloat32ArrayThe real component of the signal

Returns

AbstractFFT


setSampleRate

setSampleRate(sampleRate): AbstractFFT

Sets the input sample rate of the signal in Milliseconds.

Parameters

Name Type Description
sampleRatenumberSample rate of input signal in milliseconds (ms)

Returns

AbstractFFT

this


transform

transform(): void

Performs the transform

Returns

void


getClassName

Static getClassName(): string

Returns

string