-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[MRG+1] fix elp reading #3690
[MRG+1] fix elp reading #3690
Conversation
@@ -266,7 +266,7 @@ def read_montage(kind, ch_names=None, path=None, unit='m', transform=False): | |||
az = np.deg2rad(np.array([90. - h if a >= 0. else -90. - h | |||
for h, a in zip(horiz, az)])) | |||
pol = radius * np.pi | |||
pos = _sph_to_cart(np.array([np.ones(len(az)) * 85., az, pol])).T | |||
pos = _sph_to_cart(np.array([np.ones(len(az)) * 85., az, pol]).T) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like the right change. Can you add a test? You're right that we need one...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised current tests didn't catch it ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the array was 3x3, and the output values (which would have been very broken) never checked. Or maybe the lines were never tested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all of these channel position readers are tested at the same time, so if it's a problem with one, it's possibly a problem with all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you look into it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call Eric:
'EEG\t F3\t -62.027\t -50.053\t 85\n'
'EEG\t Fz\t 45.608\t 90\t 85\n'
'EEG\t F4\t 62.01\t 50.103\t 85\n',
I'll go for it.
@Eric89GXL WDYT? Maybe a bit messy. |
LGTM, +1 for merge once the CIs come back happy |
Current coverage is 87.44% (diff: 100%)@@ master #3690 diff @@
==========================================
Files 343 343
Lines 60888 60989 +101
Methods 0 0
Messages 0 0
Branches 9307 9355 +48
==========================================
+ Hits 53220 53329 +109
+ Misses 4912 4909 -3
+ Partials 2756 2751 -5
|
Can I get another review? :) |
Thanks guys |
#3613 breaks .elp reading by doing a transpose at the wrong time. This fixes it.
@Eric89GXL
(sorry for the mess, I'm not used to having upstream push access ...)
Closes #3684