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 simplified ERP complex as an exponentially decaying sine wave.
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)
Examples using neurodsp.sim.transients.sim_damped_erp
¶
Simulating Cycles & Transients
Simulating Cycles & Transients