mne_bids.get_head_mri_trans

mne_bids.get_head_mri_trans(bids_path)[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.

Parameters
bids_pathBIDSPath

The path of the recording for which to retrieve the transformation. The mne_bids.BIDSPath instance passed here must have the .root attribute set.

Returns
transinstance of mne.transforms.Transform

The data transformation matrix from head to MRI coordinates