mne.write_head_bem#

mne.write_head_bem(fname, rr, tris, on_defects='raise', overwrite=False, *, verbose=None)[source]#

Write a head surface to a fiff file.

Parameters:
fnamestr

Filename to write.

rrarray, shape (n_vertices, 3)

Coordinate points in the MRI coordinate system.

trisndarray of int, shape (n_tris, 3)

Triangulation (each line contains indices for three points which together form a face).

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.

overwritebool

If True (default False), overwrite the destination file if it exists.

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.

Examples using mne.write_head_bem#

Fixing BEM and head surfaces

Fixing BEM and head surfaces