mne.read_evokeds#

mne.read_evokeds(fname, condition=None, baseline=None, kind='average', proj=True, allow_maxshield=False, verbose=None) list[Evoked] | Evoked[source]#

Read evoked dataset(s).

Parameters:
fnamepath-like

The filename, which should end with -ave.fif or -ave.fif.gz.

conditionint or str | list of int or str | None

The index or list of indices of the evoked dataset to read. FIF files can contain multiple datasets. If None, all datasets are returned as a list.

baselineNone | tuple of length 2

The time interval to consider as “baseline” when applying baseline correction. If None, do not apply baseline correction. If a tuple (a, b), the interval is between a and b (in seconds), including the endpoints. If a is None, the beginning of the data is used; and if b is None, it is set to the end of the data. If (None, None), the entire time interval is used.

Note

The baseline (a, b) includes both endpoints, i.e. all timepoints t such that a <= t <= b.

Correction is applied to each channel individually in the following way:

  1. Calculate the mean signal of the baseline period.

  2. Subtract this mean from the entire Evoked.

If None (default), do not apply baseline correction.

Note

Note that if the read Evoked objects have already been baseline-corrected, the data retrieved from disk will always be baseline-corrected (in fact, only the baseline-corrected version of the data will be saved, so there is no way to undo this procedure). Only after the data has been loaded, a custom (additional) baseline correction may be optionally applied by passing a tuple here. Passing None will not remove an existing baseline correction, but merely omit the optional, additional baseline correction.

kindstr

Either 'average' or 'standard_error', the type of data to read.

projbool

If False, available projectors won’t be applied to the data.

allow_maxshieldbool | str (default False)

If True, allow loading of data that has been recorded with internal active compensation (MaxShield). Data recorded with MaxShield should generally not be loaded directly, but should first be processed using SSS/tSSS to remove the compensation signals that may also affect brain activity. Can also be "yes" to load without eliciting a warning.

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

Returns:
evokedEvoked or list of Evoked

The evoked dataset(s); one Evoked if condition is an integer or string; or a list of Evoked if condition is None or a list.

See also

write_evokeds

Notes

Changed in version 0.23: If the read Evoked objects had been baseline-corrected before saving, this will be reflected in their baseline attribute after reading.

Examples using mne.read_evokeds#

Getting started with mne.Report

Getting started with mne.Report

The Evoked data structure: evoked/averaged data

The Evoked data structure: evoked/averaged data

Visualizing Evoked data

Visualizing Evoked data

Source localization with equivalent current dipole (ECD) fit

Source localization with equivalent current dipole (ECD) fit

The role of dipole orientations in distributed source localization

The role of dipole orientations in distributed source localization

Computing various MNE solutions

Computing various MNE solutions

Visualize source time courses (stcs)

Visualize source time courses (stcs)

Make figures more publication ready

Make figures more publication ready

Using the event system to link figures

Using the event system to link figures

Interpolate bad channels for MEG/EEG channels

Interpolate bad channels for MEG/EEG channels

Shifting time-scale in evoked data

Shifting time-scale in evoked data

Remap MEG channel types

Remap MEG channel types

Plotting with mne.viz.Brain

Plotting with mne.viz.Brain

Plotting topographic arrowmaps of evoked data

Plotting topographic arrowmaps of evoked data

Plotting topographic maps of evoked data

Plotting topographic maps of evoked data

Plot the MNE brain and helmet

Plot the MNE brain and helmet

Compute MNE-dSPM inverse solution on evoked data in volume source space

Compute MNE-dSPM inverse solution on evoked data in volume source space

Source localization with a custom inverse solver

Source localization with a custom inverse solver

Compute a sparse inverse solution using the Gamma-MAP empirical Bayesian method

Compute a sparse inverse solution using the Gamma-MAP empirical Bayesian method

Generate a functional label from source estimates

Generate a functional label from source estimates

Extracting the time series of activations in a label

Extracting the time series of activations in a label

Compute sparse inverse solution with mixed norm: MxNE and irMxNE

Compute sparse inverse solution with mixed norm: MxNE and irMxNE

Compute MNE inverse solution on evoked data with a mixed source space

Compute MNE inverse solution on evoked data with a mixed source space

Morph volumetric source estimate

Morph volumetric source estimate

Plot point-spread functions (PSFs) and cross-talk functions (CTFs)

Plot point-spread functions (PSFs) and cross-talk functions (CTFs)

Plot point-spread functions (PSFs) for a volume

Plot point-spread functions (PSFs) for a volume

Compute Rap-Music on evoked data

Compute Rap-Music on evoked data

Compute spatial resolution metrics in source space

Compute spatial resolution metrics in source space

Compute spatial resolution metrics to compare MEG with EEG+MEG

Compute spatial resolution metrics to compare MEG with EEG+MEG

Estimate data SNR using an inverse

Estimate data SNR using an inverse

Computing source space SNR

Computing source space SNR

Compute MxNE with time-frequency sparse prior

Compute MxNE with time-frequency sparse prior

Compute Trap-Music on evoked data

Compute Trap-Music on evoked data

Plotting the full vector-valued MNE solution

Plotting the full vector-valued MNE solution