You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error when reading an EDF file (resampling) #12897
The bug seems to be specific to that certain EDF-file. Without a file to reproduce I'm at loss :-/
Can you create an anonymized version of the EDF with pyedflib?
frompyedflibimporthighlevelsignals, signal_headers, header=highlevel.read_edf('input.edf')
# scramble data, this should basically destroy any information containedrandom_signals= [np.random.choice(sig, len(sig)) forsiginsignals]
# Alternatively: Completely random data with same shape as existing signals# random_signals = [np.random.unform(min(sig), max(sig), len(sig)) for sig in signals]# Update headers for anonymizationheader['patientname'] ='anonymous'header['patient_additional'] ='anonymous'header['recording_additional'] ='anonymous'header['equipment'] ='anonymous'header['admincode'] ='anon'header['annotations'] = []
# Create an output EDF file with random datahighlevel.write_edf('output.edf', random_signals, signal_headers, header)
Unfortunately, I do not have the file either. The original reporter in the forum says he can't share the file, but it seems to happen with one specific channel only. However, I already mentioned that this might make it impossible for us to fix the problem.
Activity
skjerns commentedon Oct 14, 2024
The bug seems to be specific to that certain EDF-file. Without a file to reproduce I'm at loss :-/
Can you create an anonymized version of the EDF with
pyedflib?cbrnr commentedon Oct 14, 2024
Unfortunately, I do not have the file either. The original reporter in the forum says he can't share the file, but it seems to happen with one specific channel only. However, I already mentioned that this might make it impossible for us to fix the problem.
joseph-pq commentedon Oct 14, 2024
Hi, @skjerns . I made an anonymized version with two signals: "working_ch" and "failing_ch".
output.zip
skjerns commentedon Oct 15, 2024
Can reproduce. Will look into it.
Workaround is to use
preload=Trueh-mayorquin commentedon Oct 16, 2024
commenting to follow up on this.
cbrnr commentedon Oct 16, 2024
@h-mayorquin you don't have to comment if you want to follow a PR/issue, there's a "Subscribe" button for this purpose.