I am new to Biosemi and I have a couple of question regarding the Biosemi data format and reading in .bdf files into Matlab.
I would like to use Fieldtrip, a Matlab toolbox for EEG analysis (see http://fieldtrip.fcdonders.nl/), to analyze my data, but I am encountering some problems when trying to read in raw biosemi data (.bdf).

The main thing is that the data looks odd to me as the vertial scale is very large [ -178000 178000 ], but also filtering and trial selection does not work properly.

From what I have read so far about Biosemi, I suspect that this might have to do with the DC-offset and that I might have to re-reference the data. I tried this using one of the EXG channels ('EXG5'), but this did not help.
I am afraid that I dont fully understand Biosemi data and it would be great if someone could give me some more insights into this matter.

- Is this scaling problem indeed caused by the offset/Do I indeed need to re-reference the data before I can use it in Matlab?
- If so, what should be used as a reference?
- In addition, I was wondering if someone could explain to me what these EXG channels (there are 8 of those in my data) are exactly?

Since I wasn't able to work with the .bdf files, I tried to convert them to .edf (using the converter from http://www.biosemi.com/download/).
This .edf file looks much more normal in Fieldtrip, but the data is still very noisy and I still encounter some problems, especially when trying to filter the data. When applying a high-pass filter (0.5Hz) on the data for example, Matlab gives an error reporting unstable poles.

- I was not sure whether I need to re-reference this .edf file as well (which leads again to my question about re-referencing and the EXG channels)
- Any additional suggestions on why I might have problems with filtering are of course also very welcome!

In addition, I am curious what exactly happens to the data when it is converted from .bdf to .edf, so additional information on this would also be very much appreciated.

- First, I was wondering what re-reference you would suggest. Would it be best to re-reference to the average?

Then, I also experience some problems with the markers that are read into Matlab. The codes we send (also using Matlab) during the experiment, do not match the codes that I see back in my data after reading it in.

For example, we have send a 103 originally and after reading in, I see 65383 instead.
Do you have any idea what might be causing this and how it can be adjusted?

Reference choice depends on the sort of analysis you want to do. Typical reference choices are: average of all electrodes, a single electrode like Cz, or the average of 2 flat (EX) electrodes behind the ears (mastoid reference, virtual point in the center of the head).

There are 16 trigger lines (bits), see http://www.biosemi.com/faq/trigger_signals.htm. In "analog" display mode, ActiView displays the 16 separate bits as colored bars or dots. In "digital" display mode, ActiView displays the triggers as two separate bytes (trig 1-8 and trig 9-16). So you will two groups of numbers each in the 0-255 range. Your Matlab program apparently shows a single 16 bit number in the 0-65535 range. Split the 16 bit word in 2 bytes, and you will see the same values as in ActiView.

Sorry for the inconvenience, but I just have one final question about the scaling of the data and the use of the converter.
Matlab does not automatically detect the scale of the data of the raw .bdf file but I would want to have the data displayed in uV.

I am understanding it correctly that I can use the converter to rescale the data? So if I chose the EDF setting LSB value 1.0 uV (66mVpp range) does that then mean that the scale of the .edf data will be (1) uV?