-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MRG, MAINT: deduplicate definition of FIFF constants #8537
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
agramfort
left a 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.
thx @drammock
|
Failures look real |
yep. ran out of steam last night. working on them now. |
4753223 to
cc2379b
Compare
|
|
||
| def get_channel_type_constants(): | ||
| """Return all known channel types. | ||
| def get_channel_type_constants(include_defaults=False): |
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.
@larsoner could you have a look at how I've altered this function? As I understand it: sometimes we want the returned dict to have minimal entries (values that should always be present in info['chs'] for a given channel type, regardless of the acquisition system used). Other times, we want additional values because we use the returned dict to pre-populate an info dict for synthetic data (e.g., in create_info). Does that understanding accurately reflect all of the relevant use cases for this kind of dictionary? If so, does the approach I've taken here seem optimal?
larsoner
left a 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.
Otherwise LGTM. Not 100% sure on the include_defaults stuff but what you did looks reasonable
mne/io/edf/tests/test_edf.py
Outdated
|
|
||
|
|
||
| FILE = inspect.getfile(inspect.currentframe()) | ||
| KIND_DICT = get_channel_type_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.
I'd rather nest this in test_edf_stim_ch_pick_up -- if we ever inadvertently break get_channel_type_constants, it will break tests during the collection rather than the running phase, which is not so nice.
|
CIs all green, ready for review/merge. |
|
Thanks @drammock |
* upstream/master: MRG, MAINT: Try conda-forge (mne-tools#8046) MRG, MAINT: deduplicate definition of FIFF constants (mne-tools#8537) ENH: Add realign_raw (mne-tools#8540) CI: Use 20.04 (mne-tools#8541) fix example (mne-tools#8539) MRG, VIZ, FIX: plot_sensors title and interactivity (mne-tools#8536) MRG, MAINT: Test 3.9 (mne-tools#8533)
expands the entries in
get_channel_type_constants()to include coil types and units, so they can be used increate_info.