Closed larsoner closed 3 years ago
I can do this really quickly. This can then augment #9087
Does this function just call: mne.coreg.get_mni_fiducials
? Is there a unit-test in mind we can apply here?
Excellent!
Does this function just call: mne.coreg.get_mni_fiducials?
Yes, and adds it to the montage in the right way (whatever that is).
Is there a unit-test in mind we can apply here?
You can test it on fsaverage, it should match (to numerical precision) the built-in fsaverage trans .fif file we have. You can test it on sample, and it should match to some correlation limit (0.98+ I'm guesssing) the manually-created trans for sample
.
New method of
montage
that, if the montage is inMRI
/ FreeSurfer surface RAS coordinates, will estimate the fiducials (using mne.coreg.get_mni_fiducials) and add them to the montage. For example this docstring:It should help iEEG folks get their montages to be MNE/FIF compatible without requiring a bunch of changes in MNE. For example they would have:
Then when they
set_montage
, MNE internally converts to all electrode locations to head coords as usual (for now at least), and iEEG folks passtrans
to functions that need them (likeplot_alignment
) and now all coordinate frames are properly defined. Still future compatible with the dream of MNE supporting coordinate frames other than head for EEG electrodes (since it just allows us to properly define the Neuromag coordinate frame), but gives us a bit more leeway to punt on that for now.Discussed with @libertyh as a possible partial solution for iEEG folks.