neurodsp.sim.transients.sim_damped_erp¶
- neurodsp.sim.transients.sim_damped_erp(n_seconds, fs, amp, freq, decay=0.05, time_start=0.0)[source]¶
Simulate an ERP complex as a decaying (damped) sine wave.
- Parameters:
- n_secondsfloat
Length of simulated kernel in seconds.
- fsfloat
Sampling rate of simulated signal, in Hz.
- ampfloat
Amplitude of the ERP.
- freqfloat
Frequency of the ERP complex, in Hz.
- decayfloat, optional, default: 0.05
The exponential decay time of the ERP envelope.
- time_startfloat, optional, default: 0.
Start time, in seconds. Samples prior to start time are zero.
- Returns:
- erp1d array
Simulated ERP.
Notes
This approach simulates a simplified ERP complex as an exponentially decaying sine wave.
References
[1]van Diepen, R. M., & Mazaheri, A. (2018). The Caveats of observing Inter-Trial Phase-Coherence in Cognitive Neuroscience. Scientific Reports, 8(1). DOI: https://doi.org/10.1038/s41598-018-20423-z
Examples
Simulate an ERP complex with a frequency of 7 Hz and a 50 ms decay time:
>>> erp = sim_damped_erp(n_seconds=0.5, fs=500, amp=1, freq=7, decay=0.05)
Simulate an ERP complex with a frequency of 10 Hz and a 25 ms decay time:
>>> erp = sim_damped_erp(n_seconds=0.5, fs=500, amp=1, freq=10, decay=0.025)