mne.simulation.add_noise#
- mne.simulation.add_noise(inst, cov, iir_filter=None, random_state=None, verbose=None)[source]#
Create noise as a multivariate Gaussian.
The spatial covariance of the noise is given from the cov matrix.
- Parameters
- instinstance of
Evoked
,Epochs
, orRaw
Instance to which to add noise.
- covinstance of
Covariance
The noise covariance.
- iir_filter
None
| array-like IIR filter coefficients (denominator).
- 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.- 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.
- instinstance of
- Returns
Notes
Only channels in both
inst.info['ch_names']
andcov['names']
will have noise added to them.This function operates inplace on
inst
.New in version 0.18.0.
Examples using mne.simulation.add_noise
#
Simulate raw data using subject anatomy
Generate simulated source data