mne.read_bem_surfaces#

mne.read_bem_surfaces(fname, patch_stats=False, s_id=None, on_defects='raise', verbose=None)[source]#

Read the BEM surfaces from a FIF file.

Parameters:
fnamepath-like

The name of the file containing the surfaces.

patch_statsbool, optional (default False)

Calculate and add cortical patch statistics to the surfaces.

s_idint | None

If int, only read and return the surface with the given s_id. An error will be raised if it doesn’t exist. If None, all surfaces are read and returned.

on_defects‘raise’ | ‘warn’ | ‘ignore’

What to do if the surface is found to have topological defects. Can be 'raise' (default) to raise an error, 'warn' to emit a warning, or 'ignore' to ignore when one or more defects are found. Note that a lot of computations in MNE-Python assume the surfaces to be topologically correct, topological defects may still make other computations (e.g., mne.make_bem_model and mne.make_bem_solution) fail irrespective of this parameter.

New in v0.23.

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:
surf: list | dict

A list of dictionaries that each contain a surface. If s_id is not None, only the requested surface will be returned.

Examples using mne.read_bem_surfaces#

Fixing BEM and head surfaces

Fixing BEM and head surfaces