-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ENH: add reader for NeuroElectrics .nedf files #8734
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
ce7c4a4 to
4818496
Compare
|
I'll went ahead and merged the testing dataset so that you can add tests -- if we need more data or documentation for the testing file we can always add it later |
|
0.113 hash when I downloaded it was ce114ad6d5e3dbed06119386e6b1ce0c |
269b555 to
0feb24f
Compare
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.
Looks good! See comments about STIM channels and potential preload support
76f8901 to
d64481d
Compare
|
Okay pushed commits to:
Feel free to take a look and see if it makes sense @tstenner ! Happy to talk through / explain any changes, or fix things that you see are wrong with what I did |
|
Also @tstenner can you add your name/URL to doc/changes/names.inc and update doc/changes/latest.inc ? Otherwise LGTM +1 for merge |
|
Much appreciated, it's been a while since I've seen the insides MNE-Python.
Ah, good to know. I saw a bunch of
I'm not sure if it's needed. Most of our in-house readers ignore the last nsamples%5 samples, because it's at most 4 samples, i.e. 8 ms and there's always more data at the end than needed because the recording has to be stopped manually. I'd rather have a somewhat simpler implementation (without allocating space for and copying the whole data in 4/5 cases), but that's just my opinion. |
Indeed it's probably overkill in most situations, but if we can read the data correctly rather than omitting some samples 80% of the time I think we might as well do it. This code's one job is to pull/convert the right set of samples from disk, it's a shame to do it for all but the last few :) And ultimately the code to handle it did not end up being too complex. If efficiency is a concern we can always make the code more efficient in the future, but I'd rather do that later if we find the copy/concatenate pattern to be a limiting factor in real use cases. |
|
Thanks @tstenner ! |
* upstream/master: (66 commits) MRG, ENH: Add infant template downloader (mne-tools#8738) ENH: add reader for NeuroElectrics .nedf files (mne-tools#8734) DOC: improve glossary entry about fiducials (mne-tools#8763) MRG, ENH: Add Report.add_custom_css (mne-tools#8762) BUG, DOC: read_raw_egi didn't support pathlib.Path; update read_raw() docstring (mne-tools#8759) Add "dbs" as new channel type (mne-tools#8739) MRG, VIZ: Fix title position in plot_sensors (mne-tools#8752) MRG: Support for non-FIFF files in Report.parse_folder (mne-tools#8744) MRG, VIZ, FIX: sEEG picking in _prepare_topomap_plot() (mne-tools#8736) DOC: don't use single letter variable name in _compute_forward (mne-tools#8727) WIP: Fix search [skip github] [skip azp] (mne-tools#8742) WIP: Compare Beer-lambert to HOMER (mne-tools#8711) MRG: bump spyder version (mne-tools#8020) FIX anon with IO round trip (mne-tools#8731) fix set_bipolar_reference for Epochs (mne-tools#8728) WIP: Add width argument, reduce default (mne-tools#8725) ENH: Add toggle-all button to Report (mne-tools#8723) fix int/float conversion in nicolet header (mne-tools#8712) MRG, BUG: Fix Report.add_bem_to_section n_jobs != 1 (mne-tools#8713) MRG, DOC: Make "rank" options in docs more accessible (mne-tools#8707) ...
This PR adds a reader for the NeuroElectrics .nedf file format.
Compared to the NEPy package, it's about 70 times faster (due to vectorized reading with numpy.fromfile) and correctly handles (at least) the NEDF 1.3 and 1.4 files.
Once the sample data file (mne-tools/mne-testing-data#80) has been added, I'll add a unit test.