Last updated

API / geotoolkit / seismic / analysis / transforms / SpectraCalculator / SpectraCalculator

Class: SpectraCalculator

transforms.SpectraCalculator.SpectraCalculator

This class has methods for calculating various frequency properties. Ported from the Saddleback Geosolution's Java implementation

Table of contents

Constructors
Methods

Contents

Constructors

new SpectraCalculator()

new SpectraCalculator()

Methods

getClassName

getClassName(): string

Returns

string


calcAmplitude

Static calcAmplitude(xre, xim, nonzero, nyquistLen?): Float32Array

Calculates the amplitude components of the complex signal

Parameters

Name Type Description
xreFloat32ArrayReal signal
ximFloat32ArrayImaginary signal
nonzeronumberLength of the signal
Optional nyquistLennumberThe nyquist length

Returns

Float32Array

amplitudes The amplitude components of the signal


calcAmplitudeSmoothed

Static calcAmplitudeSmoothed(xre, xim, sampleRate, nonzero, hzLength): Float32Array

Calculates the amplitude components of a complex signal and smoothes the result.

Parameters

Name Type Description
xreFloat32ArrayReal signal
ximFloat32ArrayImaginary signal
sampleRatenumberThe sample rate
nonzeronumberLength of the signal
hzLengthnumberThe length of each oscillation

Returns

Float32Array

smoothedAmplitudes The smoothed amplitude components of the signal


calcPhaseInDegrees

Static calcPhaseInDegrees(xre, xim, nyquistLen?): Float32Array

Calculates the phase components of a complex signal in degrees.

Parameters

Name Type Description
xreFloat32ArrayReal signal
ximFloat32ArrayImaginary signal
Optional nyquistLennumberThe nyquist length

Returns

Float32Array

phases The phase components of the signal


calcPhaseInRadians

Static calcPhaseInRadians(xre, xim, nyquistLen?): Float32Array

Calculates the phase components of a complex signal in radians.

Parameters

Name Type Description
xreFloat32ArrayReal signal
ximFloat32ArrayImaginary signal
Optional nyquistLennumberThe nyquist length

Returns

Float32Array

phases The phase components of the signal


calcPower

Static calcPower(xre, xim, nonzero, nyquistLen): Float32Array

Calculates the power components of the complex signal

Parameters

Name Type Description
xreFloat32ArrayReal signal
ximFloat32ArrayImaginary signal
nonzeronumberLength of the signal
nyquistLennumberThe nyquist length

Returns

Float32Array

powers The power components of the signal


calcPowerDb

Static calcPowerDb(xre, xim, nonzero, nyquistlen): Float32Array

Computes the power of the signal in decibels

Parameters

Name Type Description
xreFloat32ArrayReal signal
ximFloat32ArrayImaginary signal
nonzeronumberLength of the signal
nyquistlennumberThe nyquist length

Returns

Float32Array

powersDb The power components of the signal in decibels


calcPowerDbNormalized

Static calcPowerDbNormalized(xre, xim, nonzero, nyquistLen, nFactor): Float32Array

Computes the normalized power of the signal in decibels

Parameters

Name Type Description
xreFloat32ArrayReal signal
ximFloat32ArrayImaginary signal
nonzeronumberLength of the signal
nyquistLennumberThe nyquist length
nFactornumberthe normalization factor

Returns

Float32Array

powersDb The power components of the signal in decibels


calcUnWrappedPhaseInDegrees

Static calcUnWrappedPhaseInDegrees(xre, xim, nyquistLen?): Float32Array

Unwraps the phase components of a complex signal in degrees.

Parameters

Name Type Description
xreFloat32ArrayReal signal
ximFloat32ArrayImaginary signal
Optional nyquistLennumberThe nyquist length

Returns

Float32Array

phases The unwrapped phase components of the signal


getClassName

Static getClassName(): string

Returns

string


phaseUnwrapDegrees

Static phaseUnwrapDegrees(phaseSpec): Float32Array

Unwraps the degree phase components of the signal

Parameters

Name Type Description
phaseSpecFloat32ArrayThe phase spectrum

Returns

Float32Array

unwrapped The unwrapped phase spectrum


phaseUnwrapRadToDeg

Static phaseUnwrapRadToDeg(phaseSpec): Float32Array

Unwraps the radian phase components of the signal and then converts to degrees

Parameters

Name Type Description
phaseSpecFloat32ArrayThe phase spectrum

Returns

Float32Array

unwrapped The unwrapped phase spectrum


phaseUnwrapRadians

Static phaseUnwrapRadians(phaseSpec): Float32Array

Unwraps the radian phase components of the signal ( Makes phases take values between -PI and +PI )

Parameters

Name Type Description
phaseSpecFloat32ArrayThe phase spectrum

Returns

Float32Array

unwrapped The unwrapped phase spectrum


smoothSpectrum

Static smoothSpectrum(spectrum, windowWidth): Float32Array

Smoothes the spectrum components of the signal

Parameters

Name Type Description
spectrumFloat32ArrayThe signal
windowWidthnumberThe window width

Returns

Float32Array

smoothedSpectrum The smoothed spectrum