mne_bids.get_head_mri_trans¶
- mne_bids.get_head_mri_trans(bids_path, extra_params=None, t1_bids_path=None, fs_subject=None, fs_subjects_dir=None)[source]¶
 Produce transformation matrix from MEG and MRI landmark points.
Will attempt to read the landmarks of Nasion, LPA, and RPA from the sidecar files of (i) the MEG and (ii) the T1-weighted MRI data. The two sets of points will then be used to calculate a transformation matrix from head coordinates to MRI coordinates.
Note
The MEG and MRI data need not necessarily be stored in the same session or even in the same BIDS dataset. See the
t1_bids_pathparameter for details.- Parameters
 - bids_path
mne_bids.BIDSPath The path of the electrophysiology recording.
- extra_params
None|dict Extra parameters to be passed to
mne.io.read_raw()when reading the MEG file.- t1_bids_path
mne_bids.BIDSPath|None If
None(default), will try to discover the T1-weighted MRI file based on the name and location of the MEG recording specified via thebids_pathparameter. Alternatively, you explicitly specify which T1-weighted MRI scan to use for extraction of MRI landmarks. To do that, pass amne_bids.BIDSPathpointing to the scan. Use this parameter e.g. if the T1 scan was recorded during a different session than the MEG. It is even possible to point to a T1 image stored in an entirely different BIDS dataset than the MEG data.- fs_subject
str|None The subject identifier used for FreeSurfer. If
None, defaults to thesubjectentity inbids_path.- fs_subjects_dir
str|pathlib.Path|None The FreeSurfer subjects directory. If
None, defaults to theSUBJECTS_DIRenvironment variable.New in version 0.8.
- bids_path
 - Returns
 - trans
mne.transforms.Transform The data transformation matrix from head to MRI coordinates.
- trans