mne.preprocessing.ieeg.project_sensors_onto_brain(info, trans, subject, subjects_dir=None, picks=None, n_neighbors=10, copy=True, verbose=None)[source]

Project sensors onto the brain surface.


The mne.Info object with information about the sensors and methods of measurement.

transstr | dict | instance of Transform

If str, the path to the head<->MRI transform *-trans.fif file produced during coregistration. Can also be 'fsaverage' to use the built-in fsaverage transformation.


The FreeSurfer subject name.

subjects_dirpath-like | None

The path to the directory containing the FreeSurfer subjects reconstructions. If None, defaults to the SUBJECTS_DIR environment variable.

picksstr | list | slice | None

Channels to include. Slices and lists of integers will be interpreted as channel indices. In lists, channel type strings (e.g., ['meg', 'eeg']) will pick channels of those types, channel name strings (e.g., ['MEG0111', 'MEG2623'] will pick the given channels. Can also be the string values “all” to pick all channels, or “data” to pick data channels. None (default) will pick only ecog channels.


The number of neighbors to use to compute the normal vectors for the projection. Must be 2 or greater. More neighbors makes a normal vector with greater averaging which preserves the grid structure. Fewer neighbors has less averaging which better preserves contours in the grid.


If True, return a new instance of info, if False info is modified in place.

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.


The mne.Info object with information about the sensors and methods of measurement.


This is useful in ECoG analysis for compensating for “brain shift” or shrinking of the brain away from the skull due to changes in pressure during the craniotomy.

To use the brain surface, a BEM model must be created e.g. using mne watershed_bem using the T1 or mne flash_bem using a FLASH scan.

Examples using mne.preprocessing.ieeg.project_sensors_onto_brain