Issues with EDF file data record duration

Hi,
I am trying to sort out a edf. file. I have used edf browser to convert raw data to edf file. But when i open the edf file the data record duration is 1 sec. With 34816 data records. and 7 signals even though there is only 6
It is opening up as being over 9hrs long when it should only be 50 mins and 46 secs.
When i use the convert from csv file to edf the duration is better coming up as 49 mins and 20 secs but there is no visible data even when i change settings and filters. With 29707 data records at 0.1 duration. With the correct 6 signals.
Im new to matlab and have had a look but cant seem to find a way to edit a edf only to view.
Im hoping there is a way i can edit using matlab. Thanks

1 个评论

The incorrect duration may come from a mismatch between the declared number or duration of data records and what is physically present in the file. The additional signal may also be an EDF+ annotation channel rather than another EEG channel.
I built a local command-line tool that can help inspect this:
npx edf2csv recording.edf
It outputs:
signals.csv
channels.csv
annotations.csv
metadata.json
channels.csv makes the individual signals and their sampling information easier to inspect, while metadata.json records the parsed file information and any warnings encountered during conversion. EDF+ annotations are exported separately rather than treated as a normal EEG signal.
For disclosure, I am the developer.
This will not edit or repair the original EDF file, but it may make it easier to determine whether the unexpected duration comes from the header, record count, sampling information, or discontinuities in the recording.
GitHub:

请先登录,再进行评论。

回答(1 个)

Taylor
Taylor 2024-1-23
You will have to read the data with edfread, edit it within the MATLAB workspace, and then save it back to an EDF/EDF+ file with edfwrite. If you're spefically having issue with the file you're using, it would help to upload that file so we can work with it as well.

类别

帮助中心File Exchange 中查找有关 EEG/MEG/ECoG 的更多信息

提问:

2024-1-20

评论:

about 23 hours 前

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by