mne.simulation.simulate_evoked#
- mne.simulation.simulate_evoked(fwd, stc, info, cov=None, nave=30, iir_filter=None, random_state=None, use_cps=True, verbose=None)[source]#
Generate noisy evoked data.
Note
No projections from
info
will be present in the outputevoked
. You can use e.g.evoked.add_proj
orevoked.set_eeg_reference
to add them afterward as necessary.- Parameters:
- fwdinstance of
Forward
A forward solution.
- stc
SourceEstimate
object The source time courses.
- info
mne.Info
The
mne.Info
object with information about the sensors and methods of measurement. Used to generate the evoked.- cov
Covariance
object |None
The noise covariance. If None, no noise is added.
- nave
int
Number of averaged epochs (defaults to 30).
New in version 0.15.0.
- iir_filter
None
|array
IIR filter coefficients (denominator) e.g. [1, -1, 0.2].
- random_state
None
|int
| instance ofRandomState
A seed for the NumPy random number generator (RNG). If
None
(default), the seed will be obtained from the operating system (seeRandomState
for details), meaning it will most likely produce different output every time this function or method is run. To achieve reproducible results, pass a value here to explicitly initialize the RNG with a defined state.- use_cps
bool
Whether to use cortical patch statistics to define normal orientations for surfaces (default True).
New in version 0.15.
- verbose
bool
|str
|int
|None
Control verbosity of the logging output. If
None
, use the default verbosity level. See the logging documentation andmne.verbose()
for details. Should only be passed as a keyword argument.
- fwdinstance of
- Returns:
- evoked
Evoked
object The simulated evoked data.
- evoked
See also
Notes
To make the equivalence between snr and nave, when the snr is given instead of nave:
nave = (1 / 10 ** ((actual_snr - snr)) / 20) ** 2
where actual_snr is the snr to the generated noise before scaling.
New in version 0.10.0.
Examples using mne.simulation.simulate_evoked
#
Source localization with equivalent current dipole (ECD) fit
Corrupt known signal with point spread
Generate simulated evoked data
Cortical Signal Suppression (CSS) for removal of cortical signals