mne.read_source_estimate#

mne.read_source_estimate(fname, subject=None)[source]#

Read a source estimate object.

Parameters:
fnamepath-like

Path to (a) source-estimate file(s).

subjectstr | None

Name of the subject the source estimate(s) is (are) from. It is good practice to set this attribute to avoid combining incompatible labels and SourceEstimates (e.g., ones from other subjects). Note that due to file specification limitations, the subject name isn’t saved to or loaded from files written to disk.

Returns:
stcSourceEstimate | VectorSourceEstimate | VolSourceEstimate | MixedSourceEstimate

The source estimate object loaded from file.

Notes

  • for volume source estimates, fname should provide the path to a single file named '*-vl.stc` or '*-vol.stc'

  • for surface source estimates, fname should either provide the path to the file corresponding to a single hemisphere ('*-lh.stc', '*-rh.stc') or only specify the asterisk part in these patterns. In any case, the function expects files for both hemisphere with names following this pattern.

  • for vector surface source estimates, only HDF5 files are supported.

  • for mixed source estimates, only HDF5 files are supported.

  • for single time point .w files, fname should follow the same pattern as for surface estimates, except that files are named '*-lh.w' and '*-rh.w'.

Examples using mne.read_source_estimate#

The SourceEstimate data structure

The SourceEstimate data structure

Visualize source time courses (stcs)

Visualize source time courses (stcs)

2 samples permutation test on source data with spatio-temporal clustering

2 samples permutation test on source data with spatio-temporal clustering

Make figures more publication ready

Make figures more publication ready

Using the event system to link figures

Using the event system to link figures

Plotting with mne.viz.Brain

Plotting with mne.viz.Brain

Cross-hemisphere comparison

Cross-hemisphere comparison

Extracting time course from source_estimate object

Extracting time course from source_estimate object

Morph surface source estimate

Morph surface source estimate

Reading an STC file

Reading an STC file