BDF(+) file format "Status" channel

Post Reply
Greg Smith
Posts: 3
Joined: Mon May 02, 2016 12:30 pm

BDF(+) file format "Status" channel

Post by Greg Smith »

We (Cambridge Electronic Design Ltd) have had an importer for EDF(+)/BDF(+) files for many years, and I was revisiting it recently to incorporate it into an improved file importer system.

I doing this, I discovered that we have no specification for the Status channel signal. We seem to have implemented this in the past by assuming it is a 16-bit signal sampled at the same rate as the waveforms and we detect changes in individual bits to implement up to 16 channels of event times.

However, in testing our code changes, I downloaded your example BDF files (Newtest17-256 and Newtest17-2048) and discovered that in your 24-bit data, bits of the Status channel other than the low 16 bits are changing.

I have searched the web for a definitive statement about the format of Status channels, and have been unable to find this. In fact the only reference is on your BDF file format page, but there is no explanation of this channel:
Note1: Total header length (for BDF and EDF) is: {(N+1)*256} bytes, where N is number of channels (including the status channel).

Do you have any documentation about the format of the Status channel, or can you point meat it elsewhere, please?

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

Re: BDF(+) file format "Status" channel

Post by Coen »

The status channel is described on http://www.biosemi.com/faq/trigger_signals.htm

Best regards, Coen (BioSemi)

Greg Smith
Posts: 3
Joined: Mon May 02, 2016 12:30 pm

Re: BDF(+) file format "Status" channel

Post by Greg Smith »

Thank you for the quick answer, much appreciated. Perhaps a link from the word Status on the file format page to the Status channel format page would be good?

May I bother you with a few additional questions so I can refine the importation...

1) Is the Status channel a BIOSEMI only addition (i.e. never exists in EDF(+) files)?
2) Do you ever generate 16-bit (rather than 24-bit) files with a Status channel (so only the 16 events are present)? If your Status channels always have 24-bit data this allows me to simplify the implementation of our importer.
3) What are the Speed bits used for (sorry, but I am not familiar with your equipment). I can import them as a separate channel if they are useful.
4) Do you ever generate discontinuous files, and if so, do you have any examples?

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

Re: BDF(+) file format "Status" channel

Post by Coen »

> 1) Is the Status channel a BIOSEMI only addition (i.e. never exists in EDF(+) files)?

Yes, only BioSemi software generates BDF (and EDF) files with a status channel.

The BioSemi "DBF to EDF converter" (http://www.biosemi.com/download/ToolsFo ... rter86.zip) generates EDF files with a 16-bit status channel (just the 16 trigger bits from the BDF file)

> 2) Do you ever generate 16-bit (rather than 24-bit) files with a Status channel (so only the 16 events are present)?

BDF always has a 24-bit status channel, EDF always has 16 bit status channel

> 3) What are the Speed bits used for (sorry, but I am not familiar with your equipment). I can import them as a separate channel if they are useful.

The speemode bits indicate the speedmode setting of the amplifier, see http://www.biosemi.com/faq/adjust_samplerate.htm. Because the sample rate is also listed in the file header, the speedmode bits can be ignored in the BDF file (they are used in the acquisition software).

> 4) Do you ever generate discontinuous files, and if so, do you have any examples?

The user can pause the streaming to file during recording. The start of each new epoch is indicated by a High bit 16 in the status channel.

The BDF files always have a block (data record) size of 1 second, unless the file is terminated unexpectedly (for example by a computer crash). A file that was not properly closed has a "-1" length in the file header, and a last record may be shorter than 1 second. Such a file can be repaired with the tool in: http://www.biosemi.com/download/ToolsFo ... pair86.zip

Best regards, Coen (BioSemi)

Greg Smith
Posts: 3
Joined: Mon May 02, 2016 12:30 pm

Re: BDF(+) file format "Status" channel

Post by Greg Smith »

Thank you for your quick reply and the information. Much appreciated.

Post Reply