Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DigMontages: information on coordinate systems; and adding a simple rescaling method #12904

Open
sappelhoff opened this issue Oct 21, 2024 · 1 comment

Comments

@sappelhoff
Copy link
Member

sappelhoff commented Oct 21, 2024

I just got some sensor positions in a text file that are in the "CTF" coordinate system. Naturally, I wanted to turn this into a DigMontage. However, when trying to find an appropriate value for the coord_frame parameter, I was faced with two choices:

  1. ctf_meg
  2. ctf_head

I could not easily find any documentation on the differences between these two coordinate systems. Ideally we would have a page where each coordinate system that we support is described with mentioning at least the origin, and the direction of the three axes (x,y,z) with reference to fiducials/anatomical landmarks, wherever possible. What do you think?

Furthermore, I think mne.channels.DigMontage should get a method called .transform_to (or similar) that takes as input the string label of any supported coordinate system in mne. Alternatively (or additionally), this functionality could also become a parameter upon instantiation of the DigMontage. .apply_trans seems a bit tricky to use for that. Opinions on this?

@larsoner
Copy link
Member

I could not easily find any documentation on the differences between these two coordinate systems. Ideally we would have a page where each coordinate system that we support is described with mentioning at least the origin, and the direction of the three axes (x,y,z) with reference to fiducials/anatomical landmarks, wherever possible. What do you think?

Rather than add our own I'd prefer to point to this as it seems like an excellent reference

https://www.fieldtriptoolbox.org/faq/coordsys/

But adding a table with this minimal information for the coord frames we support plus a link to that FAQ would work, too!

Furthermore, I think mne.channels.DigMontage should get a method called .transform_to (or similar) that takes as input the string label of any supported coordinate system in mne. Alternatively (or additionally), this functionality could also become a parameter upon instantiation of the DigMontage. .apply_trans seems a bit tricky to use for that. Opinions on this?

Typically in MNE we have tried to just get sensor positions to the Neuromag head coordinate frame as much as possible. And it happens automatically when you do .set_montage(...) I think.

We could expand this, at least for (probably?) ctf_head. For other stuff like ctf_meg it would be more complicated because then you'd actually need the transformation between CTF head and device coordinate frames, like you'd have to do .transform_to("ctf_meg", transform=mne.transform.Transform("ctf_head", "ctf_meg", <some ndarray>) or similar. Or at least I think this would be the case without having reread all the coord frame definitions...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants