CWTSpectrum (FPScript)

21.09.2021

Computes the Continuous Wavelet Transform (CWT) time-frequency spectrum.

Syntax

CWTSpectrum(Signal, [ SpectrumType = SPECTRUM_CWT_DBNORM ], [ Wavelet = WAVELET_MORLET ], [ WaveletAdjustment ], [ FrequencyCount = 40 ], [ LogSpacing = FALSE ], [ StartingFrequency = 0 ], [ EndingFrequency = 0.5 ], [ ZeroPad = 0 ], [ dBLimit = 0 ] [ , MaxTimeValues = 0 ])

 

The syntax of the CWTSpectrum function consists of the following parts:

Part

Description

Signal

The data to be analyzed. The data must have a constant sampling rate and must not contain void values.

Permitted data structures are data series und signal. All real data types are permitted, except calendar time und time span.

Void values are not permitted in this argument.

For the X component additional restrictions do apply.The values must have a constant positive spacing. Void values are not permitted in this argument.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

SpectrumType

The wavelet spectral format to be computed.

The argument SpectrumType can have the following values:

Constant

Meaning

SPECTRUM_CWT_DB

dB (decibels)

SPECTRUM_CWT_DBNORM

dB (decibels) peak normalized to zero

SPECTRUM_CWT_TISA

Integral is TISA Power (Time Integral Amplitude2)

SPECTRUM_CWT_MSA

Integral is MSA Power (Mean Amplitude2)

SPECTRUM_CWT_SSA

Integral is SSA Power (Sum Amplitude2)

SPECTRUM_CWT_VARIANCE

Power variance normalized

SPECTRUM_CWT_MAGNITUDE2

Magnitude2

SPECTRUM_CWT_MAGNITUDE

Magnitude

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value SPECTRUM_CWT_DBNORM.

Wavelet

The mother wavelet for the analysis.

The argument Wavelet can have the following values:

Constant

Meaning

WAVELET_MORLET

Morlet

WAVELET_PAUL

Paul

WAVELET_GAUSSDERIV

Gaussian Derivative

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value WAVELET_MORLET.

WaveletAdjustment

The wavelet adjustment controlling the time-frequency resolution trade-off. The valid range is wavelet specific:

Wavelet

Valid Range

Default Value

Morlet

6 to 200

8

Paul

4 to 40

16

Gaussian Derivative

2 to 80

20

Permitted data structures are scalar value. All real data types are permitted.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

FrequencyCount

The number of the frequencies to compute with the CWT.

Permitted data structures are scalar value. All integral data types are permitted.

The value must be greater or equal to 5 and less or equal to 500.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value 40.

LogSpacing

Is TRUE if the frequency range uses logarithmic intervals and FALSE if linear intervals are used.

Permitted data structures are scalar value. Supported data types are Boolean value.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value FALSE.

StartingFrequency

The normalized starting frequency for the CWT.

Permitted data structures are scalar value. All real data types are permitted.

The value must be greater or equal to 0 and less or equal to 0.5.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value 0.

EndingFrequency

The normalized ending frequency for the CWT.

Permitted data structures are scalar value. All real data types are permitted.

The value must be greater or equal to 0 and less or equal to 0.5.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value 0.5.

ZeroPad

The number of zeros to be appended to the signal in order to avoid wraparound effects. If you omit the argument, there is no zero padding.

Permitted data structures are scalar value. All integral data types are permitted.

The value must be greater or equal to 0.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value 0.

dBLimit

The dB baseline to be applied to a dB spectrum. The valid range is 1.0 to 120.0 dB, or 0 for no baseline.

Permitted data structures are scalar value. All real data types are permitted. The argument is transformed to the unit dB.

The value must be greater or equal to 0 dB and less or equal to 120 dB.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value 0.

MaxTimeValues

The maximum number of time values in the CWT. The range is 10 to 10000, or 0 for no limit.

Permitted data structures are scalar value. All integral data types are permitted.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value 0.

Remarks

The result always has the data structure signal series with Z-component.

The X component contains the time and the Z component contains the frequency. If the argument Signal is a data series, then the Z component of the result contains index values and the X component contains Nyquist-normalized frequencies.

Available in

Option Spectral Analysis

Examples

CWTSpectrum(Signal, SPECTRUM_CWT_DBNORM, WAVELET_MORLET, 8, 40, 0, 0, 0.5, 1024, 20, 1024)

Calculates the CWT spectrum of a signal. The CWT is an excellent tool for mapping the changing properties of non-stationary signals. The CWT is also an ideal tool for determining whether or not a signal is stationary in a global sense. In this case, dB normalized is selected as the spectrum type. The wavelet type is Morlet, the adjustment is 8, the number of CWT time values is 1024 and the maximum dB range is 20. In addition, 1024 zeros are appended. This is an example from the Time-Frequency Spectral Analysis Tutorial.

See Also

STFTSpectrum Function

Spectral Analysis Option

Time-Frequency Spectral Analysis Object

Continuous Wavelet Transform (CWT)

Time-Frequency Spectral Analysis Tutorial

Share article or send as email:

You might be interested in these articles