emd.simulate.ar_oscillator#
- emd.simulate.ar_oscillator(freq, sample_rate, seconds, r=0.95, noise_std=None, random_seed=None)[source]#
Create a simulated oscillation using an autoregressive filter.
A simple filter is defined by direct pole placement and applied to white noise to generate a random signal with a defined oscillatory peak frequency that exhibits random variability frequency, amplitude and waveform.
- Parameters:
- freqfloat
Peak resonant frequency of the simulated filter.
- sample_ratefloat
Sampling frequency for the simulation
- secondsfloat
Number of seconds of data to simulate
- rfloat (0 < r < 1)
Pole magnitude of simulated autoregressive resonance.
- noise_stdfloat
Scaling of optional noise to add to simulation. Scaling is relative to standard-deviation of the simulated data.
- random_seedint
Optional random seed generation
- Returns:
- ndarray
A simulated time course.