mne_bids.get_head_mri_trans

mne_bids.get_head_mri_trans(bids_fname, bids_root)[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_fnamestr

Full name of the MEG data file

bids_rootstr | pathlib.Path

Path to root of the BIDS folder

Returns
transinstance of mne.transforms.Transform

The data transformation matrix from head to MRI coordinates