clouddrift.wavelet.morse_wavelet#
- clouddrift.wavelet.morse_wavelet(length: int, gamma: float, beta: float, radian_frequency: ndarray, order: int = 1, normalization: str = 'bandpass') tuple[ndarray, ndarray][source]#
- Compute the generalized Morse wavelets of Olhede and Walden (2002), doi: 10.1109/TSP.2002.804066. - Parameters#- lengthint
- Length of the wavelets. 
- gammafloat
- Gamma parameter of the wavelets. 
- betafloat
- Beta parameter of the wavelets. 
- radian_frequencynp.ndarray
- The radian frequencies at which the Fourier transform of the wavelets reach their maximum amplitudes. radian_frequency is between 0 and 2 * np.pi * 0.5, the normalized Nyquist radian frequency. 
- orderint, optional
- Order of wavelets, default is 1. 
- normalizationstr, optional
- Normalization for the - waveletoutput. By default it is assumed to be- "bandpass"which uses a bandpass normalization, meaning that the FFT of the wavelets have peak value of 2 for all central frequencies- radian_frequency. The other option is- "energy"``which uses the unit energy normalization. In this last case, the time-domain wavelet energies ``np.sum(np.abs(wave)**2)are always unity.
 - Returns#- waveletnp.ndarray
- Time-domain wavelets with shape (order, radian_frequency, length). 
- wavelet_fft: np.ndarray
- Frequency-domain wavelets with shape (order, radian_frequency, length). 
 - Examples#- Compute a Morse wavelet with gamma parameter 3, beta parameter 4, at radian frequency 0.2 cycles per unit time: - >>> wavelet, wavelet_fft = morse_wavelet(1024, 3, 4, np.array([2*np.pi*0.2])) >>> np.shape(wavelet) (1, 1, 1024) - Compute a suite of Morse wavelets with gamma parameter 3, beta parameter 4, up to order 3, at radian frequencies 0.2 and 0.3 cycles per unit time: - >>> wavelet, wavelet_fft = morse_wavelet(1024, 3, 4, np.array([2*np.pi*0.2, 2*np.pi*0.3]), order=3) >>> np.shape(wavelet) (3, 2, 1024) - Compute a Morse wavelet specifying an energy normalization : >>> wavelet, wavelet_fft = morse_wavelet(1024, 3, 4, np.array([2*np.pi*0.2]), normalization=”energy”) - Raises#- ValueError
- If normalization optional argument is not in [“bandpass”, “energy”]``. 
 - See Also#- wavelet_transform(),- morse_wavelet_transform(),- morse_freq(),- morse_logspace_freq(),- morse_amplitude(),- morse_properties()
