I would like to perform sensor co-registration between EEG digitized sensor position from a subject and the headshape from fsaverage template, since I don’t have the MRI of the subject.
I’m using the GUI and I have an issue when I try to save the rescaled MRI as you can see here:
Basically, the output says that the procedure is done (bottom left), however no new folder containing the appropriate scaled files appear. I’ve tried both on Windows 11 and Linux.
Interestingly, when I use the scripted procedure with scale_mri function, speciftying the reference subject (fsaverage) and the target subject, the folder is succesfully created.
My questions are these:
Is the GUI issue a bug, or am I missing something? The function used is just this mne.gui.coregistration(subject="fsaverage",inst=func_fname, subjects_dir=subjects_dir)
Scripted way is fine, but I think that I have also to rescale BEMs as well (which probably the GUI computes under the hood). How much should I scale BEMs? Is it the same scaling applied to the MRI?
This looks like a GUI bug rather than something you’re doing wrong. There is a recently merged MNE fix specifically for saving a scaled subject from mne coreg (PR #13539). I’d first check mne.__version__ and try a release containing that fix, or the current development version. Until then, using mne.scale_mri() is a perfectly reasonable workaround
You do not need to scale the BEM separately after scale_mri(). According to the MNE documentation, scale_mri() automatically calls scale_bem(), along with the label and source-space scaling functions, for files matching MNE’s expected naming conventions. The BEM surfaces receive the same fitted scale factor(s) as the MRI: one value for uniform scaling, or the same three values for 3-axis scaling. Don’t estimate another BEM-specific factor.
I’d verify that the target subject’s bem/ directory actually contains the scaled files, since automatic discovery depends on standard filenames. Also save/use the transform for the scaled target subject: the -trans.fif transform itself contains rotation and translation, not the MRI scaling
One caveat: a scaled fsaverage is still a template anatomy, so it’s useful when no individual MRI exists, but source localization accuracy should be interpreted accordinly