-
Notifications
You must be signed in to change notification settings - Fork 88
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: Make kind=auto #105
MRG: Make kind=auto #105
Conversation
mne_bids/mne_bids.py
Outdated
@@ -570,6 +570,16 @@ def raw_to_bids(subject_id, task, raw_file, output_path, session_id=None, | |||
raise ValueError('raw_file must be an instance of str or BaseRaw, ' | |||
'got %s' % type(raw_file)) | |||
|
|||
if 'eeg' in raw and 'meg' in raw: |
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.
you could even reduce this logic to if 'meg' in raw
since any and meg sensor present makes it meg.
also this will fail because not all meg
files have eeg
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.
Was going to say "yep, this will fail for some KIT data", then looked at the tests and saw, yep, it failed for KIT data 😆
closes #73 |
Codecov Report
@@ Coverage Diff @@
## master #105 +/- ##
==========================================
- Coverage 93.14% 92.81% -0.33%
==========================================
Files 14 14
Lines 846 863 +17
==========================================
+ Hits 788 801 +13
- Misses 58 62 +4
Continue to review full report at Codecov.
|
and then add tests. change to MRG when you're ready for final review |
@jasmainak, any updates? |
@teonbrooks I think this PR is contingent on this comment and its resolution, hence I'm holding off on this. |
these seem independent from each other. the ability to introspect in the raw object doesn't depend on the filename. the code makes logical sense, it just needs test addendum: if you include @sappelhoff's suggestion for taking the explicit argument of |
4fb09de
to
0bc862f
Compare
okay good to go from my end. Fingers crossed for the CIs |
what's the deal with codecov? |
acquisition=acq, task=task, output_path=output_path, | ||
events_data=events_fname, event_id=event_id, overwrite=True) | ||
|
||
raw_to_bids(subject_id=subject_id, raw_file=raw_fname, **kwargs) |
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.
you should include an assertion on the type to make sure it's working properly for a given modality (e.g. 'fif' for meg
, '.edf' for eeg
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.
expand tests to validate auto
we already have |
looking through the |
kind : str, one of ('meg', 'eeg', 'ieeg') | ||
The kind of data being converted. Defaults to "meg". | ||
kind : str, one of ('auto', 'meg', 'eeg', 'ieeg') | ||
The kind of data being converted. Defaults to "auto". |
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 mention that kind = 'auto'
will determine the type of data automatically from the input raw data? Or is it obvious enough from the name?
cc @teonbrooks ...
now I need to run for beers though