-
Notifications
You must be signed in to change notification settings - Fork 126
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
request to provide a sample script to de-identify edf #64
Comments
I have something like that written. I'll upload it for you, but it requires a few more scripts and functions as well. I'll see if I can make a PR with some more high-level functions to this package. |
I've added the functions and created a PR #65 . Until then you can find the functions here: https://github.com/skjerns/pyedflib more specifically: https://github.com/skjerns/pyedflib/blob/master/pyedflib/highlevel.py |
Thank you @skjerns ! It was helpful! |
Ahh, right, I totally forgot that those exist. I'll see if I'll find time today to adapt the script. |
@catvasily try again, should work now :) |
Thank you @skjerns for refining your toolbox! |
Found the culprit. Can you check again @catvasily? |
@catvasily ? does it work for you? edit: marking as closed, as no response |
Thank you @skjerns for improving your toolbox. The annotations are still rounded up to 1 second. By the way, the last line in the sample script demonstrating "Highlevel Interface" on https://pypi.org/project/pyEDFlib/, should be highlevel.anonymize_edf('edf_file.edf'), right? |
did you install the develop version?
If not try that and check again. It should be working in the current dev version. There's no new release yet. |
Failed to build pyedflib
but at no avail. |
You need to install an VS C++ compiler, e.g. Visual Studio 2015 Community or maybe even this one might work: Microsoft Visual C++ Compiler for Python 2.7 and make sure the compiler exe ( |
Thank you @skjerns ! |
Unfortunately,
can you provide me with a sample file? alternatively open the file in a text editor and send me the first 500 characters. Where did you obtain a file with sub-second resolution? |
Now I am surprised myself. |
0 X F 24-SEP-1996 Lastname,Firstname Startdate 05-SEP-2017 X X X 05.09.1710.33.339216 EDF+C 1347 1 35 Trigger Event Patient Event C3 C4 CZ F3 F4 F7 F8 FZ FP1 FP2 FPZ O1 O2 P3 P4 PZ T3 T4 T5 T6 AUX1 ECG1 ECG2 AUX4 AUX5 AUX6 AUX7 AUX8 PG1 PG2 A1 A2 EDF Annotations uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV uV 0 0 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 8711 -1 1 1 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 -8711 1 0 0 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 -32768 1 1 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 32767 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 184 |
leave me a message at [removed] |
Your recording also starts at a second mark, according to the header. |
It seems that the information is not annotated in the header itself, but rather inside the signal blocks, must be something by EDF+C/D I'm not aware of. However, I cannot figure out yet how to access this information, as it's not part of the header itself.
However, it might be non-trivial to implement this change, as most of the library is set up to second-accuracy starttimes and not subsecond. But I'll see. |
There were two problems with EDFlib:
Both issues have been addressed in EDFlib. Kind regards, Teunis |
@catvasily I've implemented the changes for subsecond accuracy. Can you check if it works? Test it with the dev version: |
Hi @skjerns, it is working!! |
@catvasily that's great to hear. I'll look into the issue with the shift by 0.1ms. It really isn't much, however it would still be better to have it consistent. |
this seems to be a problem with writing the annotations in general, not with the starttime itself. The starttime is set accurately, but the annotations timing not, it will only do so up to 0.1ms accuracy. Should be possible to keep them the same. I'll continue here #86 |
Thank you for sharing the package.
May I kindly ask you to provide a sample script on how to remove patient's name from a given EDF+, or to replace it with a fake name.
Thank you.
The text was updated successfully, but these errors were encountered: