Repository navigation
MRG: Actually do projection - #2734
Conversation
There was a problem hiding this comment.
We were silently always adding an EEG ref before but not applying it (whoops). So we could consider this a bug fix...?
There was a problem hiding this comment.
if we clearly document it in the what's new fine with me.
4e492f3 to
00df286
Compare
There was a problem hiding this comment.
This is a fix for deprecated use of indices in ravel, can split into a different PR if necessary, but both are needed for 0.11
There was a problem hiding this comment.
Ahh never mind I'll move it...
|
Ready for review/merge from my end. Once this is in, #2676 should work okay with |
|
@jasmainak how does this look to you? |
|
Looks like we have failing tests. I check carefully tomorrow .. |
|
Fixing now |
|
@jasmainak let me know if this is good for you. This and your PR are the only things holding up release I think. |
|
I rebased this onto my PR and it works like a charm @Eric89GXL :) |
There was a problem hiding this comment.
so, you shouldn't get an error here if preload was False?
There was a problem hiding this comment.
the preload state shouldn't matter
There was a problem hiding this comment.
do you want me to test that case, too?
There was a problem hiding this comment.
yeah maybe, I thought projs were applied during get_data() if preload was False ...
There was a problem hiding this comment.
It should be that projs are applied during get_data() if proj=True regardless of preload state. Preload state should never change what you get from get_data, if it does there is a bug with our preloading logic. I'll add a test though to be sure.
There was a problem hiding this comment.
So, if preload=True the proj is applied a second time during get_data()? I guess it doesn't matter? You can apply the same proj as many times, right?
There was a problem hiding this comment.
Oh wait, I guess you check if the proj is active before applying it ...
There was a problem hiding this comment.
So, if preload=True the proj is applied a second time during get_data()
I think now it only is done that way if add_eeg_ref=True and there wasn't one before. But yes reapplying shouldn't matter (as long as all channels are present, but that's a separate issue)
|
@jasmainak comments addressed, only last commit is new. Can you have one last look to make sure you're happy? If so I'll merge once the CIs come back happy. |
There was a problem hiding this comment.
so will this throw an error if proj has not been applied but is added and the user is trying to change the channel type?
There was a problem hiding this comment.
okay thanks for clarifying.
LGTM +1 for merge.
@agramfort it's probably good to take a look at this one now, esp. how
test_epochs.pyhad to be changed. Writing outEpochsArrayand reading it back by default will have avg ref added and applied.The least intrusive change might actually be to have
add_eeg_ref=Falseinread_epochs. If people have been using FIF, they've presumably already added the ref by that stage (duringEpochsconstruction), and it avoids breaking people'sEpochsArrayuse.