emd.simulate.compute_joint_if#
- emd.simulate.compute_joint_if(freq, amp, phase, sample_rate=128, seconds=2)[source]#
Compute joint instantaneous frequency from a set of oscillations.
This function implements a signal simulator based on the methods in Fabus et al (2021) [1]. freq, amp and phase inputs should be tuples/lists of user defined values.
- Parameters:
- freq, amp, phase{tuple, list, np.ndarray}
Frequency, Amplitude and Phase values for each component.
These are lists or tuples containing a single value per component. sample_rate and seconds must then also be defined.
- sample_rate{None, float}
Sampling frequency of the data used if user defined harmonic values are passed in
- seconds{None, float}
Amount of seconds to generate if user defined harmonic values are passed in
- Returns:
- joint_ifndarray
Vector containing the joint instantaneous frequency signal
- joint_signdarray
Array containing the time-domain signal for each harmonic component
Notes
Example usage - compute joint instantaneous frequency from user defined harmonic values
>>> f = (5, 10, 15) >>> a = (1, 1/3, 1/9) >>> p = (0, 0, 0) >>> joint_if, joint_sig = compute_joint_if(f, a, p, 128, 10)
References
[1]Fabus, M., Woolrich, M., Warnaby, C. and Quinn, A., 2021. Understanding Harmonic Structures Through Instantaneous Frequency. BiorXiv https://doi.org/10.1101/2021.12.21.473676