-
Notifications
You must be signed in to change notification settings - Fork 92
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
follow up: allow copyfile_brainvision to work with .dat extension #1010
Conversation
hi @sappelhoff @hoechenberger if you prefer some other place let me know. I am not convinced though, that this will catch all cases. for example when writing the code i renamed a random ..and i didnt raise a warning so far, let me know if you want that |
Codecov Report
@@ Coverage Diff @@
## main #1010 +/- ##
==========================================
- Coverage 95.20% 95.17% -0.03%
==========================================
Files 25 25
Lines 3772 3774 +2
==========================================
+ Hits 3591 3592 +1
- Misses 181 182 +1
Continue to review full report at Codecov.
|
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.
The .eeg
file remains untouched by MNE, if you pass preload=False
--> so this is to be expected in this case.
I think this check is good to have, it will give us some safety that at least the vhdr and vmrk can be properly read.
I think a warning if ".dat" is copied may be good -- especially because we are rewriting it as ".eeg", right? And then maybe some info along the lines: ".dat" is not necessarily raw data, please double check that everything is fine.
not sure if we should add this to all data formats -- but for BrainVision we have a good reason to do so IMHO
thanks!
no, I tried with |
oh, that's weird, did you also rename the file references in VHDR and VMRK (what bv_copyfile does)? |
yes, weird.. you can reproduce if you want :) Archive.zip
in this context it's relevant, though: what do you think? |
wow, I can reproduce -- that's crazy. probably because MNE just opens that json file as if it was binary and is then reading those bytes interpreting them as numbers, or something like it? Maybe not an important problem, but something that would be nice to have fixed with a good error message. 🤷 I think you are right then, we might as well close this PR and hope for the best / wait for user reports if people run into issues. (I hope not) |
this is what i thought, too.
I'll create an issue in the MNE repo soon, at least people are aware then
ok with me.. |
i changed it to the warning @sappelhoff dont think the ubuntu CIs are unhappy due to my PR? |
yes I think these issues are due to an issue in pybv that I just now fixed with a new release. |
thanks! |
PR Description
this PR
asserts that brainvision files can be read by MNE..raises a warning if
.dat
file extension is used instead of.eeg
in brainvision formatfollow up for #1008
Merge checklist
Maintainer, please confirm the following before merging: