-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
FIX : EDF+ Annotation Timestamps missing sub-second accuracy #7875
FIX : EDF+ Annotation Timestamps missing sub-second accuracy #7875
Conversation
@greydongilmore the onsets are now as you expect them but I am wondering if I should not also update the info['meas_date'] as it can contain miliseconds wdyt? |
This information would be useful to have access to upon heading the EDF+ file header. However, the header block in the EDF+ file will not contain the millisecond value information, and adding it to the If implemented, a conditional statement could be added based on the EDF type (whether EDF or EDF+). A zero millisecond value could be added to the From the EDF spec documentation:
So the subsecond part of the starttime must be added to the onset time of the events |
ok then I guess what I did does what you expect.
with my branch my onsets are now:
[ 1.951172 3.492188 290.501953 583.572266]
… |
@agramfort I have tested on a few other files locally and it performs as expected now. |
A test would be nice. I've cropped the file linked by @greydongilmore to 5s (and removed most channels as well as downsampled to 256Hz). If @greydongilmore gives us permission to use this cropped file (17kB) I'd upload it to mne-testing-data so that @agramfort can add a test. There are only 2 annotations in it ( |
9239b9d
to
649b4d1
Compare
@cbrnr ok for you? |
Yes, perfect! Now let's wait for permission to use the small test file. |
the file shared with me is 30MB
do you have an edf file that makes you pass in the if block with an offset
different from 0?
none of our test files have this.
… |
cool for the tiny file. Can you share it with me?
… |
I cropped the file that @greydongilmore shared with you. It's 17kB and has the sub-second start time. |
where is the file?
|
I am putting this in the testing data. thanks
… |
@cbrnr merge if you're happy |
Thanks @agramfort! |
@cbrnr @agramfort thanks for quick action on this! 👍 |
great team effort !
… |
* upstream/master: (24 commits) WIP: Fix Travis (mne-tools#7906) WIP: Prototype of notebook viz (screencast) (mne-tools#7758) MRG, FIX: Speed up I/O tests, mark some slow (mne-tools#7904) Proper attribution for Blender tutorial (mne-tools#7900) MAINT: Check usage [ci skip] (mne-tools#7902) Allow find_bad_channels_maxwell() to return scores (mne-tools#7845) Warn if NIRx directory structure has been modified from original format (mne-tools#7898) Pin pvyista to 0.24.3 (mne-tools#7899) MRG: Add support for reading and writing sufaces to .obj (mne-tools#7824) Fix _auto_topomap_coords docstring. (mne-tools#7895) MRG, FIX: Ensure Info H5-writeable (mne-tools#7887) Website contents (mne-tools#7889) MRG, ENH: Add mri_resolution="sparse" (mne-tools#7888) MRG, ENH: Allow disabling FXAA (mne-tools#7877) remove "and and" [ci skip] (mne-tools#7882) fix evoked nave → inverse guidance (mne-tools#7881) ENH: Better error messages (mne-tools#7879) FIX : EDF+ Annotation Timestamps missing sub-second accuracy (mne-tools#7875) FIX: Fix get_channel_types (mne-tools#7878) MRG, BUG: Fix combine evokeds (mne-tools#7869) ...
closes #7872