Converting bdf file configuration post-hoc

Post Reply
Posts: 1
Joined: Tue Jan 15, 2013 7:37 pm

Converting bdf file configuration post-hoc

Post by BDLerps » Tue Jan 15, 2013 7:51 pm

My lab runs 32-channel and 64-channel systems. Recently, some pilot participants were accidentally run with a 64-channel config file using a 32-channel system resulting in many mislabeled channels in the .bdf file. Can anyone recommend an elegant way of fixing the .bdf files so that they match the rest of our 32-channel data (acquired correctly with the 32-channel config file)? I get the feeling we are spending too much time and energy on this and that there may be a simple solution. Thanks!

Site Admin
Posts: 982
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands

Re: Converting bdf file configuration post-hoc

Post by Coen » Wed Jan 16, 2013 2:39 pm

The elegant method is to modify the LabVIEW code of the (open-source) "Reducer" tool available from (or for LabVIEW 8.6.1: ... Engine861/). Modifying the code to overwrite the channel labels in the header with the list from a 32-chan CFG is a fairly easy and limited LabVIEW programming job.

Alternatively, proceed as follows with a less elegant, but nevertheless effective method:
- use "Reducer" tool to delete the 32 unused channels from the BDF file (the original BDF file is left unchanged as a backup)
- use "Cropper" tool to split the reduced BDF file in two halves, with the first halve containing the first second, and the second half containing the rest of the file
- open the 1 second BDF file in a file editor (e.g. Notepad)
- edit the channel names, while being extremely cautious to leave the total file length unchanged (or the file will become unreadable by BDF readers).
- use the "Merger" tool to add the second half BDF file to the modified 1 second BDF file.

Note: the reason for splitting and merging the file is that loading a BDF file with a length of more than a few seconds in Notepad may take ages.

Best regards, Coen (BioSemi)

Posts: 32
Joined: Wed Feb 06, 2008 9:42 am
Location: Neverland

Re: Converting bdf file configuration post-hoc

Post by Teuniz » Sat Jan 19, 2013 9:38 pm

No need to split and merge your file.

EDFbrowser has a tool to reduce the number of channels in your file.
It has also a tool to (safely) edit the header (signallabels), regardless the size of your file. ... ce_signals ... dit_header

Post Reply