-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MRG FIX: Unifying raw reading #2127
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
Conversation
|
Alright, tests pass over here. Reading code has been unified quite a bit. Ready for review/merge from my end. We might want to delay release for a few days so we can all test this and make sure everything is working okay... |
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.
And what if you need to pass config and hs_file?
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.
See comments in code, but that would go in _raw_extras, which is supposed to be a list the same length as the number of underlying raw files if it's used. You can make whatever you want as entries in the list, RawFIF stores one FIF tag directory per file, EDF stores a dict and I think KIT does, too
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.
Not sure I get it. Would this work if you passed additional params like config and headshape for BTI?
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.
Yeah, it would work. Right now BTI doesn't support non-preloaded data, so it's a moot point currently. But in the future when someone wants to do it, they can put whatever they want in _raw_extras, one per loaded raw file. That could include whatever params and files need to be parsed in order to construct data in _read_segment_file. Actually the EDF reader already does it by storing things like annot, see below where this happens:
annot = self._raw_extras[fi]['annot']
It pulls the annot param from the given file number.
|
@Eric89GXL really 0.9? |
|
I'd slightly prefer 0.10 actually since it's a big change to get KIT and EDF working, but I think @agramfort wanted it. How about this:
? |
|
@dengemann see @agramfort's comments in the related issue #2121 (comment) |
|
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.
my understanding of mult in the info is that it is there but it is never used. this is the reason the data is being stored in V instead of uV. Also there is no corresponding unit for uV listed in the constants.
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.
mult is not in the info, at least not this incarnation of mult. If you look in _BaseRaw, you'll see that mult contains the compensation, projectors, plus cals, and it's constructed on the fly. But cals aren't used in these readers the same way they're used in the other readers. We can unify it at some point, but it would be easier just to "un-cal" the mult matrix and use it here if we want to support mult.
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.
ah, I was thinking this is unit_mul. it's what I was calling gain in EDF. got 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.
what I meant is that I think it has the same concept of the gain that is being used.
|
Okay I'll open another PR hopefully shortly. Then okay to push out release today? |
yes. |
|
|
Sounds good. I guess Martin set that up for 4 AM or so? Or can you manually do it again with the instructions he gave you? I can also ping Hari later today if you want. |
|
I can do it manually later. I am in a train...
|
|
And you don't have SSH working on your phone? Is this amateur hour? |
|
@Eric89GXL alex does not update his devices because auf backwards compatibility concerns. |
|
I live in the stone age :)
|
|
I am too old. I've learnt my lessons :)
|
|
Imagine users' wouldn't update MNE-Python for the same reasons, ..., what would all our efforts be good for? :) |
|
Maybe @agramfort is still using 0.7 and just helps us test newer versions out of the goodness in his heart |
you mean 0.1 stable ? |
|
Alright, rebased. @dengemann @agramfort okay with you for merge? This one is a prereq for @alexandrebarachant in #2136, but if you think we should do additional testing it could wait a week or two. (I wonder if it's possible for big screwups to escape our testing at this point...) |
|
how much can we factorize the tests by add a raw object test function in test_raw.py and rely on this to test all classes? diff my get ugly so let's probably wait for another PR especially if tests gets deleted. |
|
I would also try to build the doc on this branch to see if everything looks ok. I did not spot any obvious issue. |
|
ahh good call. I can do that Monday |
|
(the doc building I mean, I agree that the test refactoring should be a separate PR) |
|
Docs LGTM. Ready for final review/merge from my end. |
MRG FIX: Unifying raw reading
|
thanks @Eric89GXL ! |
Refactoring is only complete for
RawFIFso far. I have moved_read_segmentinto_BaseRaw, and it calls_read_segment_file, which is a more targeted function. Now I need to transform the reading functions for KIT and EDF to work the same way. Hopefully we'll end up with more red lines than green ones.Closes #2121.