TimeFrequencyWaveforms.code.utils module
- TimeFrequencyWaveforms.code.utils.Xn(wdm, n, m, f, fdot=0.0, fddot=0.0)[source]
Compute the phase term \(X_n(t)\) at the sample times stored in the wdm object.
(53)\[X_n(f, \dot{f}, \ldots) = 2\pi (t-n\Delta T) f + \ \pi (t-n\Delta T)^2 \dot{f} + \ (1/3) \pi (t-n\Delta T)^3 \ddot{f} .\]- Parameters:
wdm (WDM.WDM.WDM_transform) – An instance of the WDM wavelet transform class.
n (int) – Wavelet time index.
m (int) – Wavelet frequency index.
f (float) – Frequency at which to evaluate the phase term [Hz].
fdot (float) – Frequency derivative [Hz/s]. Optional.
fddot (float) – Second frequency derivative [Hz/s/s]. Optional.
- Returns:
Xn – The phase term, shape=(N,).
- Return type:
jnp.ndarray
- TimeFrequencyWaveforms.code.utils.cnm(wdm, n, m, f, fdot=0.0, fddot=0.0)[source]
Compute the coefficient \(c_{nm}(f,\dot{f},\ldots)\).
(54)\[c_{nm}(f,\dot{f},\ldots) = \int\mathrm{d}t\; \ \cos X_n(f,\dot{f},\ldots) g_{nm}(t).\]- Parameters:
wdm (WDM.WDM.WDM_transform) – An instance of the WDM wavelet transform class.
n (int) – Wavelet time index.
m (int) – Wavelet frequency index.
f (float) – Frequency at which to evaluate the phase term [Hz].
fdot (float) – Frequency derivative [Hz/s]. Optional.
fddot (float) – Second frequency derivative [Hz/s/s]. Optional.
- Returns:
c – The phase term, shape=(N,).
- Return type:
jnp.ndarray
- TimeFrequencyWaveforms.code.utils.snm(wdm, n, m, f, fdot=0.0, fddot=0.0)[source]
Compute the coefficient \(s_{nm}(f,\dot{f},\ldots)\).
(55)\[s_{nm}(f,\dot{f},\ldots) = \int\mathrm{d}t\; \ \sin X_n(f,\dot{f},\ldots) g_{nm}(t).\]- Parameters:
wdm (WDM.WDM.WDM_transform) – An instance of the WDM wavelet transform class.
n (int) – Wavelet time index.
m (int) – Wavelet frequency index.
f (float) – Frequency at which to evaluate the phase term [Hz].
fdot (float) – Frequency derivative [Hz/s]. Optional.
fddot (float) – Second frequency derivative [Hz/s/s]. Optional.
- Returns:
s – The phase term, shape=(N,).
- Return type:
jnp.ndarray
- TimeFrequencyWaveforms.code.utils.chatnm(wdm, n, m, f, fdot=0.0, fddot=0.0)[source]
Compute the coefficient \(\hat{c}_{nm}(f,\dot{f},\ldots)\).
(56)\[\hat{c}_{nm}(f,\dot{f},\ldots) = \int\mathrm{d}t\; \ \cos X_n(f,\dot{f},\ldots) \hat{g}_{nm}(t).\]- Parameters:
wdm (WDM.WDM.WDM_transform) – An instance of the WDM wavelet transform class.
n (int) – Wavelet time index.
m (int) – Wavelet frequency index.
f (float) – Frequency at which to evaluate the phase term [Hz].
fdot (float) – Frequency derivative [Hz/s]. Optional.
fddot (float) – Second frequency derivative [Hz/s/s]. Optional.
- Returns:
chat – The phase term, shape=(N,).
- Return type:
jnp.ndarray
- TimeFrequencyWaveforms.code.utils.shatnm(wdm, n, m, f, fdot=0.0, fddot=0.0)[source]
Compute the coefficient \(\hat{s}_{nm}(f,\dot{f},\ldots)\).
(57)\[\hat{s}_{nm}(f,\dot{f},\ldots) = \int\mathrm{d}t\; \ \sin X_n(f,\dot{f},\ldots) \hat{g}_{nm}(t).\]- Parameters:
wdm (WDM.WDM.WDM_transform) – An instance of the WDM wavelet transform class.
n (int) – Wavelet time index.
m (int) – Wavelet frequency index.
f (float) – Frequency at which to evaluate the phase term [Hz].
fdot (float) – Frequency derivative [Hz/s]. Optional.
fddot (float) – Second frequency derivative [Hz/s/s]. Optional.
- Returns:
shat – The phase term, shape=(N,).
- Return type:
jnp.ndarray
- TimeFrequencyWaveforms.code.utils.row_roll(A, shifts)[source]
Roll each row of a 2D array by a different integer amount along axis 1.
Given input array A of shape (N, M) and a vector of integer shifts of shape (N,), this function circularly shifts (or rolls) the elements of row i of A by shift[i] positions along the second axis.
- Parameters:
A (jnp.ndarray) – Input array, shape=(N, M).
shifts (jnp.ndarray) – Integer array of shifts, shape=(N,), dtype=int.
- Returns:
B – Output array, shape=(N, M).
- Return type:
jnp.ndarray