mne.cov.prepare_noise_cov

mne.cov.prepare_noise_cov(noise_cov, info, ch_names=None, rank=None, scalings=None, verbose=None)[source]

Prepare noise covariance matrix.

Parameters
noise_covinstance of Covariance

The noise covariance to process.

infodict

The measurement info (used to get channel types and bad channels).

ch_nameslist | None

The channel names to be considered. Can be None to use info['ch_names'].

rankNone | dict | ‘info’ | ‘full’

This controls the rank computation that can be read from the measurement info or estimated from the data. See Notes of mne.compute_rank() for details.The default is None.

New in version 0.18: Support for ‘info’ mode.

scalingsdict | None

Data will be rescaled before rank estimation to improve accuracy. If dict, it will override the following dict (default if None):

dict(mag=1e12, grad=1e11, eeg=1e5)
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
covinstance of Covariance

A copy of the covariance with the good channels subselected and parameters updated.

Examples using mne.cov.prepare_noise_cov