[BUG] `mne.label.find_pos_in_annot` doesn't check `coord_frame`
See original GitHub issueIt doesn’t seem like a good idea to allow any position to be passed to find_pos_in_annot
without checking that it is in the mri
coordinate frame. If someone has the wrong coordinate frame, the error will be silent and they will get the wrong ROI which to me seems like a pretty good risk for incorrect results that could be avoided by enforcing the coordinate frame or maybe rather making this a class function of Dipole
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I don’t think
Dipole
would be the right subclass, in general the point you’re talking about could be anything (iEEG sensor, part of a mesh, an elementary current dipole, etc.). I think we should do two things:ndarray
or list-like is passed, these must be in the MRI coordinate frameFWIW
Dipole
always lives in the head coordinate frame, so if we wanted to add support for that in (2) then we’d have to have atrans
argument in that function, if we don’t already.But really I think we should do the doc update (1) first and then let actual use cases guide (2)
Dipole
is always in head coords and I don’t think it’s a common use case anyway. Let’s just start frommontage
(and not worry about Dipole) since it’s the use case we actually want to support for iEEG?