mne-bids: Possible error when anonymizing EDF files
Describe the bug
Using write_raw_bids, I converted an EDF file using v0.6 while anonymizing it. However, I tried opening the same file in EDFBrowser, and I got this error:
Error, file is marked as EDF+ but startdate field does not match with startdate in
recordfield:
"12.02.85" <-> "12-FEB-2012".
File is not a valid EDF or BDF file.
This suggests that the anonymization didn’t work. In addition, it doesn’t seem to be a valid file in the context of edfbrowser suggesting that further errors might occur in the future.
Steps to reproduce
Convert dataset attached here: https://www.dropbox.com/sh/w0wd0icoo9bib2j/AAB0MVgibmrTUeSRPNGmeIaya?dl=0
Expected results
The file after doing anonymization in write_raw_bids should still be accessible by EDFBrowser.
Additional information
A related issue is just telling write_raw_bids to convert said file to BrainVision. #659
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (15 by maintainers)
related: https://github.com/bids-standard/bids-specification/issues/538
The 1925 date requirement keeps coming up all the time. It’s a problem in fif, now edf. But HIPPA doesn’t require it. Folks should really reconsider this …
@sappelhoff Don’t know much about the BrainVision format’s internals, but the main points in favour of EDF+/BDF+ I can think of are:
That’s the best case I can think of for anonymizing them without a format conversion, but I also see the benefits of always converting to BrainVision. As much effort as I put into the EDF anonymization PR, I’m perfectly happy to see it dropped by the wayside if it’s not the best possible solution for end-users!
EDIT: I think if we can find any other big EDF utilities that do the same date-matching check as EDFBrowser, that would negate any ‘broad compatibility’ benefit that the format has, and clearly make BrainVision conversion a better choice. If it’s just an EDFBrowser quirk, I think it would be easiest to file an issue or PR there and remove the sanity check.
Shouldn’t be random, but shifted by a user-specified duration 😃 But otherwise yes, why not. This is once again a deviation from BIDS, as the file content deviates from the sidecar metadata, but for me and a few others this seems to be okay 😉 we should codify this though, i.e. amend BIDS asap…
in brief: It’s not possible to reasonably anonymize EDF/EDF+/BDF files to a year prior to 1985. 😦 I am starting to be in favor of going back to auto-conversion to BrainVision if anonymization to prior 1985 is wanted. And I am starting to develop a severe dislike for EDF … Austin, can you tell me one nice thing about EDF which makes it good in my eyes again? 😃