mne_bids.template_to_head#
- mne_bids.template_to_head(info, space, coord_frame='auto', unit='auto', verbose=None)[source]#
Transform a BIDS standard template montage to the head coordinate frame.
- Parameters:
- info
mne.Info The
mne.Infoobject with information about the sensors and methods of measurement. The info is modified in place.- space
str The name of the BIDS standard template. See https://bids-specification.readthedocs.io/en/latest/appendices/coordinate-systems.html#standard-template-identifiers for a list of acceptable spaces.
- coord_frame‘mri’ | ‘mri_voxel’ | ‘ras’
BIDS template coordinate systems do not specify a coordinate frame, so this must be determined by inspecting the documentation for the dataset or the
electrodes.tsvfile. If'auto', the coordinate frame is assumed to be'mri_voxel'if the coordinates are strictly positive, and'ras'("scanner RAS") otherwise.Warning
scanner RASandsurface RAScoordinates frames are similar so be very careful not to assume a BIDS dataset’s coordinates are in one when they are actually in the other. The only way to tell for template coordinate systems, currently, is if it is specified in the dataset documentation.- unit‘m’ | ‘mm’ | ‘auto’
The unit that was used in the coordinate system specification. If
'auto','m'will be inferred if the montage spans less than-1to1, and'mm'otherwise. If thecoord_frameis'mri_voxel',unitwill be ignored.- verbose
bool|str|int|None Control verbosity of the logging output. If
None, use the default verbosity level. See the logging documentation andmne.verbose()for details. Should only be passed as a keyword argument.
- info
- Returns:
- info
mne.Info The
mne.Infoobject with information about the sensors and methods of measurement. The modifiedInfoobject.- trans
mne.transforms.Transform The data transformation matrix from
'head'to'mri'coordinates.
- info