mne_bids.get_head_mri_trans

mne_bids.get_head_mri_trans(bids_path, extra_params=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.

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.

extra_paramsNone | dict

Extra parameters to be passed to MNE read_raw_* functions when reading the lankmarks from the MEG file. If a dict, for example: extra_params=dict(allow_maxshield=True).

Returns
transinstance of mne.transforms.Transform

The data transformation matrix from head to MRI coordinates