Problem with importing edf file

Hi Francois,
We are having few problems with importing edf file in brainstorm.
The edf file we have does not contain any sensor locations and all channel types are labelled as EEG. Once we import the data in brainstorm, we edit the channel file labelling ECG channel as EKG and appropriate EEG channels as EEG and some other channels as 'MISC'. We also approximate locations of all EEG channels on the scalp. Below are the issues we are having:

  1. When we plot the sensor cap, brainstorm expects the sensor locations of the channels that are not of type EEG. This creates problem in plotting the 2d sensor cap or 3d sensor cap.
  2. If we delete channels that are not of type EEG, it creates a mismatch between number of channels and the link to raw file. This causes brainstorm to produce an error when we want to see the data through the browser
  3. Also when you import edf file, brainstorm adds an unnecessary channel (when compared to eeglab). Although this issue will become irrelevant if the above two issues were fixed.
    Let me know if you need anything from my side,
    Thank you,

Hi Chiran,

  1. What you’re doing seems correct, I don’t see why the program would need 3d positions for sensors that have their field “Type” set to something else than “EEG”. This is the issue to solve.
    Can you export a subject for which you have this problem, with just one block of imported data (not only the “link to raw file”)? Right click on the subject > File >Export subject. I will have a look at it next week.

  2. You’re not supposed to delete any channel. The number of entries in the channel file must match the number of data channels that you have in the EDF file.

  3. Those files include an “EDF Annotation” channel, which do not contain recordings but text information about the temporal markers. It is not useful for anything once the file is imported, but we need to keep track that there is this extra channel to read correctly data from the EDF file.


Hi Francois,
I have the problem too. For example, my raw files contain 65 channels one of which is "EDF annotation" channel. I want to compute sources and i use default EEG cap and wrap it beacuse i don't have the channel location. The problem is that i must use the 65-channel EEG cap to match the raw files. But, the "EDF annotation” channel is meaningless and i should use 64-channel EEG cap beacuse the records use 10-10 international system. I don't know how to solve the problem. When, i delete the "EDF Annotaion " channel, the error will happen!

You should not try to delete any channel from the recordings.
To add 3D positions to a dataset, right-click on the existing channel file > Add EEG positions:

If i add 3D positions, it will show that no channel matching the loaded cap.

Probably because you are trying to use file with channel positions that does not correspond to the EEG cap you used in your recordings, or because your acquisition software does not save correctly the electrode names.

To add the 3D positions to the electrodes, it is safer to match the data channels with the electrodes positions based on their names using the menu "Add EEG positions". If you use the menu "Import channel file", as you did before, it replaces channel names of the EDF file with the names from the file with the 3D positions, and there is nothing that checks this is appropriate. If you have no way to control that the order of the channels is the same in the two files, you should not use this option.
This might require that you rename all your channels manually in your EDF file (if you have multiple files, you can then copy-paste the modified channel file, you don't have to do the renaming manually for each file).

If you need additional help with this, please give us more information on your setup:
Where is this EDF file coming from? What acquisition software created it?
What EEG amplifiers and cap were used?
Where is your electrode position coming from? Are you using a template available in Brainstorm or real positions digitized on the head of the subject?

MOVEMENT/IMAGERY DATASET. dataset was created and contributed to PhysioNet by the developers of the BCI2000 instrumentation system, which they used in making these recordings. The system is shown below.10-10 international system.pdf (16.9 KB)
I don't have the electrode position. So i wanted to use a template. But i found that there is no suitable 3D position.

The channel names in these EDF files include dots at the end, which is not usual and does not correspond to any standard. For example the first channel is named "Fc5." instead of "FC5" in the standard 10-10 naming convention. This is the only reason why Brainstorm does not find your channel names in its 10-10 template.

I don't think there is any harm in removing these dots from the channel names automatically, I have never seen them being used for any purpose. Therefore I updated the EDF reading function so that they get stripped from the channel names.

Update Brainstorm (menu Update > Update Brainstorm) and try again adding the positions from the 10-05 template, it should work now.