Validating correct fiducial coregistration

Hello, I am trying to do EEG source localization and I was wondering if the initial step of coregistration needs to be fixed since the fiducials are hovering over the head model like this:

I have a json file of the anatomical landmark coordinates (NAS, LPA, RPA), and a tsv file of 64 digitized EEG sensor locations.

# read electrodes.tsv
custom_montage = mne.channels.read_custom_montage(elec_dir)
info.set_montage(custom_montage)

# read fiducials
fiducial_dict = json.load(open(fname_fiducials))

# Coregistration
coreg = Coregistration(info, subject, subjects_dir, fiducials=fiducial_dict)
fig = mne.viz.plot_alignment(info, trans=coreg.trans, **plot_kwargs)

Is there something wrong with my data, or do I need to align the fiducials more?
Thank you in advance!

Hello, do you actually have measured electrode locations? Or is this a standard / template montage you’re loading? Do you have individual MRI scans?

Best wishes,
Richard

Hello Richard,

  1. Yes, the dataset (open source dataset) has the measured electrode locations (x, y, z) in a tsv file. That is why I read it directly with mne.channels.read_custom_montage
  2. Yes, each subject has individual T1 images.
  3. Fiducials locations were also recorded for each subject, and was directly read from the files

Thank you for your prompt response!

Thanks for the clarifications, @tbonesung! Unfortunately I currently don’t have time to provide further assistance; I’m pinging @larsoner and @wmvanvliet, maybe they can give you a hand!

Best of luck,
Richard

That the nasion point is floating can be attributed to the fact that the MRI has been de-faced. But that LPA and RPA are floating like that seems to indicate a scaling issue. You can use mne.gui.coregistration to launch a GUI that allows you to fix the coregistration, including scaling, rotating, etc.