I am trying to split a recording and then export the resulting segments to EDF. After splitting, each new recording contains the correct events when viewed in Brainstorm. However, after exporting one of these split recordings to EDF, the events in the EDF file are missing. I am not sure, but maybe the issue comes from the annotation check in out_fwrite_edf.m (around line 61).
Additionally, I encountered another issue: when exporting to EDF using a relative file path, the generated file appears to have a corrupted header. Using an absolute path works correctly. Is this an expected behavior?
For the events issue, it was indeed a bug present when exporting a raw file that did not started in 0 s as EDF. The check to determine in which block to add the annotation was not working right as it was missing the offset for the beginning of the file. This is now solved in commit 71578ea
Update your Brainstorm instance to 23-Mar-2026 to get the fix.
Can you provide more info about how you are exporting the file?
GUI? Function (which one)? Process?
Yes, any export of data, goes back to export_data() which requires absolute paths for checking existence of files with file_exist() which is a replacement of exist(..., 'file')
What you are seeing, is the the file with the header cannot be found (file_exist() uses abs paths), so it creates a the .edf file again, no more header!