mne.simulation.simulate_evoked#
- mne.simulation.simulate_evoked(fwd, stc, info, cov=None, nave=30, iir_filter=None, use_cps=True, verbose=None, *, rng=None, random_state=None)[source]#
Generate noisy evoked data.
Note
No projections from
infowill be present in the outputevoked. You can use e.g.evoked.add_projorevoked.set_eeg_referenceto add them afterward as necessary.- Parameters:
- fwdinstance of
Forward A forward solution.
- stc
SourceEstimateobject The source time courses.
- info
mne.Info The
mne.Infoobject with information about the sensors and methods of measurement. Used to generate the evoked.- cov
Covarianceobject |None The noise covariance. If None, no noise is added.
- nave
int Number of averaged epochs (defaults to 30).
New in v0.15.0.
- iir_filter
None|array IIR filter coefficients (denominator) e.g. [1, -1, 0.2].
- use_cpsbool
Whether to use cortical patch statistics to define normal orientations for surfaces (default True).
New in v0.15.
- verbosebool |
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.- rng
None|int| instance ofGenerator|RandomState The random number generator (RNG). If
None(default), a newnumpy.random.Generatorseeded from entropy is used. Pass an int or anumpy.random.Generatorfor reproducible results, or a legacyRandomStateto control the random-number stream or for interoperability with third-party code such as scikit-learn that does not accept generators. An integer seed usesnumpy.random.default_rng()and therefore produces a different stream than the same integer passed to a legacyrandom_stateorseedparameter.New in v1.13.
- random_state
None|int| instance ofRandomState Supported for compatibility. New code should use
rng. IfNone, NumPy’s globalRandomStateis used.
- fwdinstance of
- Returns:
- evoked
Evokedobject 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 v0.10.0.
Examples using mne.simulation.simulate_evoked#
Cortical Signal Suppression (CSS) for removal of cortical signals
Source localization with equivalent current dipole (ECD) fit