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.Info
object 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.tsv
file. If'auto'
, the coordinate frame is assumed to be'mri_voxel'
if the coordinates are strictly positive, and'ras'
("scanner RAS"
) otherwise.Warning
scanner RAS
andsurface RAS
coordinates 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-1
to1
, and'mm'
otherwise. If thecoord_frame
is'mri_voxel'
,unit
will 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.Info
object with information about the sensors and methods of measurement. The modifiedInfo
object.- trans
mne.transforms.Transform
The data transformation matrix from
'head'
to'mri'
coordinates.
- info
Examples using mne_bids.template_to_head
#
Convert iEEG data to BIDS format