mne.simulation.simulate_evoked

mne.simulation.simulate_evoked(fwd, stc, info, cov, 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 output evoked. You can use e.g. evoked.add_proj or evoked.set_eeg_reference to add them afterward as necessary.

Parameters
fwdinstance of Forward

A forward solution.

stcSourceEstimate object

The source time courses.

infodict

Measurement info to generate the evoked.

covCovariance object

The noise covariance.

naveint

Number of averaged epochs (defaults to 30).

New in version 0.15.0.

iir_filterNone | array

IIR filter coefficients (denominator) e.g. [1, -1, 0.2].

random_stateNone | int | instance of RandomState

If random_state is an int, it will be used as a seed for RandomState. If None, the seed will be obtained from the operating system (see RandomState for details). Default is None.

use_cpsbool

Whether to use cortical patch statistics to define normal orientations for surfaces (default True).

New in version 0.15.

verbosebool, str, int, or None

If not None, override default verbose level (see mne.verbose() and Logging documentation for more). If used, it should be passed as a keyword-argument only.

Returns
evokedEvoked object

The simulated evoked data.

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