Skip to content

Conversation

@alexrockhill
Copy link
Contributor

Fixes #9627.

@alexrockhill
Copy link
Contributor Author

Look okay to you @rob-luke?

@rob-luke
Copy link
Member

Does this require that a user converts their montage to head frame in advance? Or is this done in the upstream function before this internal function is called?

I'm imagining the use case where your optode positions have been specified in MRI frame. How should a user load that montage?

Perhaps we should make it an option for users to specify the frame? Or if not, we should make it clear in the documentation that you must use head frame.

But I'm still learning about coordinatede frames. And I would defer to @larsoner and @agramfort opinions here.

@alexrockhill
Copy link
Contributor Author

alexrockhill commented Jul 30, 2021

Does this require that a user converts their montage to head frame in advance? Or is this done in the upstream function before this internal function is called?

I'm imagining the use case where your optode positions have been specified in MRI frame. How should a user load that montage?

Perhaps we should make it an option for users to specify the frame? Or if not, we should make it clear in the documentation that you must use head frame.

But I'm still learning about coordinatede frames. And I would defer to @larsoner and @agramfort opinions here.

They are converted to head in mne.channels.montage._set_montage.

Line 800: mnt_head = _get_montage_in_head(montage)
Then later passed in Line 966: _set_montage_fnirs(info, mnt_head)

@rob-luke
Copy link
Member

Thanks for clarifying. The fNIRS IO page isn't rendering with the example usage of set montage, but i assume it looks identical to before?

@alexrockhill
Copy link
Contributor Author

Yes, should be identical

@larsoner larsoner merged commit 8d8609a into mne-tools:main Jul 31, 2021
@larsoner
Copy link
Member

Thanks @alexrockhill

@alexrockhill alexrockhill deleted the fnirs branch August 2, 2021 15:43
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

Successfully merging this pull request may close these issues.

[BUG] mne.viz.plot_alignment silently assumes unknown coordinate frame is in head

4 participants