clouddrift.wavelet.morse_freq

Contents

clouddrift.wavelet.morse_freq#

clouddrift.wavelet.morse_freq(gamma: ndarray | float, beta: ndarray | float) Tuple[ndarray] | Tuple[float][source]#

Frequency measures for generalized Morse wavelets. This functions calculates three different measures fm, fe, and fi of the frequency of the lowest-order generalized Morse wavelet specified by parameters gamma and beta.

Note that all frequency quantities here are in radian as in cos(f t) and not cyclic as in np.cos(2 np.pi f t).

For beta=0, the corresponding wavelet becomes an analytic lowpass filter, and fm is not defined in the usual way but as the point at which the filter has decayed to one-half of its peak power.

For details see Lilly and Olhede (2009), doi: 10.1109/TSP.2008.2007607.

Parameters#

gammanp.ndarray or float

Gamma parameter of the wavelets.

betanp.ndarray or float

Beta parameter of the wavelets.

Returns#

fmnp.ndarray

The modal or peak frequency.

fenp.ndarray

The energy frequency.

finp.ndarray

The instantaneous frequency at the wavelets’ centers.

Examples#

>>> fm, fe, fi = morse_freq(3, 4)
>>> morse_freq(3, 4)
(array(1.10064242), 1.1025129235952809, 1.1077321674324723)
>>> morse_freq(3, np.array([10, 20, 30]))
(array([1.49380158, 1.88207206, 2.15443469]),
array([1.49421505, 1.88220264, 2.15450116]),
array([1.49543843, 1.88259299, 2.15470024]))
>>> morse_freq(np.array([3, 4, 5]), np.array([10, 20, 30]))
(array([1.49380158, 1.49534878, 1.43096908]),
array([1.49421505, 1.49080278, 1.4262489 ]),
array([1.49543843, 1.48652036, 1.42163583]))
>>> morse_freq(np.array([3, 4, 5]), 10)
(array([1.49380158, 1.25743343, 1.14869835]),
array([1.49421505, 1.25000964, 1.13759731]),
array([1.49543843, 1.24350315, 1.12739747]))

See Also#

morse_wavelet(), morse_amplitude()