Skip to main content
  • Description
  • Conversion tool for Brainamp files to EEG format.

  • Usage
  • brainamp2eeg mybrainamp_headerfile.vhdr myeegfile [myparfile]

    with :

    • mybrainamp_headerfile.vhdr : Brainamp header file (with extension). It contains the names of data and event files (.eeg et .vmrk).
    • myeegfile : output EEG file (no extension).
    • option :
      myparfile : text file containing conversion parameters.


  • Fields of parameter file and example
  • electrodes
    P1.21
    P2.22
    H1.1091
    H2.1092
    A1.225
    A2.226
    Cable.-1
    Output channel name list :

    Names and numbers corresponding to elec.dat definition for converted channels, or name and -1 if the channel is not defined in elec.dat.

    The order should be the same as in the input Brainamp file.
    This field is optional. If omitted, the name of the channels is read from the Brainamp file. The first entry corresponding to the label in elec.dat is choosen.
    nb_event_code 6 Number of different event code to use from the VMRK event file.
    This field is optional. If omitted, events of type "Stimulus" only are converted.
    If this field is present, the fields "event_names" and "event_codes" are required. If not, they are unnecessary.
    event_names
    walk
    slow
    fast
    A
    B
    C
    List of event types used in the VMRK event file. These labels will be associated to the digital codes defined with "event_codes".
    This field is required when the field "nb_event_code" is present.
    event_codes
    1
    2
    3
    4
    5
    6
    List of event codes to associate to the previous names. The order must be the same as the name order. The stimulus code of the VMRK file is added to these codes (see Example section).
    This field is required when the field "nb_event_code" is present.


  • Example
    • Marker file with different kind of stimulus :
    • The following files contains 3 kinds of triggers : Stim, Video, Response. Each type of event may have different values :
      Stim : always 1
      Response : 1 or 2
      Video : 1 to 15

      Brain Vision Data Exchange Marker File, Version 1.0

      [Common Infos]
      Codepage=UTF-8
      DataFile=tap0003.eeg

      [Marker Infos]
      ; Each entry: Mk=,,,
      ; ,
      ; Fields are delimited by commas, some fields might be omitted (empty).
      ; Commas in type or description text are coded as "\1".
      Mk1=New Segment,,1,1,0,20110531174504332097
      Mk2=Comment,actiCAP not connected,1,1,0
      Mk3=Video,V 5,6193,1,0
      Mk4=Stim,S 1,7693,1,0
      Mk5=Response,R 1,8118,1,0
      Mk6=Video,V 4,9571,1,0
      Mk7=Stim,S 1,11070,1,0
      Mk8=Response,R 1,11446,1,0
      Mk9=Video,V 14,13048,1,0
      Mk10=Stim,S 1,14547,1,0
      Mk11=Response,R 2,15041,1,0
      Mk12=Video,V 1,16814,1,0
      Mk13=Stim,S 1,18314,1,0
      Mk14=Response,R 1,18642,1,0
      Mk15=Video,V 13,20571,1,0
      Mk16=Stim,S 1,22071,1,0
      Mk17=Video,V 4,23968,1,0
      Mk18=Stim,S 1,25468,1,0
      Mk19=Response,R 1,25771,1,0
      Mk20=Video,V 13,27695,1,0
      Mk21=Stim,S 1,29195,1,0
      Mk22=Response,R 2,29621,1,0
      Mk23=Video,V 5,31192,1,0
      Mk24=Stim,S 1,32692,1,0
      Mk25=Response,R 1,32987,1,0
      Mk26=Video,V 10,34749,1,0
      Mk27=Stim,S 1,36248,1,0
      Mk28=Response,R 2,36516,1,0
      Mk29=Video,V 2,38286,1,0
      Mk30=Stim,S 1,39785,1,0
      Mk31=Response,R 1,40161,1,0
      Mk32=Video,V 14,41723,1,0

      To import all these events, we use the following parameter file (this is the event import part only):

      nb_event_code 3

      event_names Video Stim Response

      event_codes 100 0 200

      100 is added to each Video code, 0 to each Stim code and 200 to each Response code.
      The resulting event file (after use of eegpos) is :

      1 255 0
      6193 105 0
      7693 1 0
      8118 201 0
      9571 104 0
      11070 1 0
      11446 201 0
      13048 114 0
      14547 1 0
      15041 202 0
      16814 101 0
      18314 1 0
      18642 201 0
      20571 113 0
      22071 1 0
      23968 104 0
      25468 1 0
      25771 201 0
      27695 113 0
      29195 1 0
      29621 202 0
      31192 105 0
      32692 1 0
      32987 201 0
      34749 110 0
      36248 1 0
      36516 202 0
      38286 102 0
      39785 1 0
      40161 201 0
      41723 114 0

      The first event (255) corresponds to the New Segment event of Brainamp. The Comment event is removed.


  • Comments
    • If the parameter file is omitted, names are read from the Brainamp file and the first entry corresponding in elec.dat is choosen. If there is no corresponding name in elec.dat, the number is -1.
    • The Brainamp header file contains the names of the data and event files (.eeg and .vmrk). The output Elan EEG file contains converted data and events.
    • Warning : the Brainamp data file and the Elan data file have the same extension (.eeg). Be careful to use different names when converting Brainamp file to Elan.
    • Note to INSERM U821 users : ActiCap is based on 10/10 system. When converting Brainamp files, use the following electrode positions (listed in the file elecActiCap.dat) :
      electrodes
      Fp1.2176
      Fp2.2177
      F7.2178
      F3.2179
      Fz.2180
      F4.2181
      F8.2182
      FC5.2183
      FC1.2184
      FC2.2185
      FC6.2186
      T7.2187
      C3.2188
      Cz.2189
      C4.2190
      T8.2191
      TP9.2221
      CP5.2192
      CP1.2193
      CP2.2194
      CP6.2195
      TP10.2227
      P7.2197
      P3.2198
      Pz.2199
      P4.2200
      P8.2201
      PO9.2203
      O1.2204
      Oz.2237
      O2.2205
      PO10.2206
      EOG.-1
      EMGL.-1
      EMGR.-1


  • Current version
  • 1.10 08-06-2011

  • History
    • 1.03 19-07-2006 (PEA) : Brainamp file format evolution.
    • 1.04 19-09-2006 (PEA) : adding fields in parameter files to use events that are not of type "Stimulus" (type defined by Brainamp).
    • 1.05 21-09-2006 (PEA) : repair error with event codes for events of type different from "Stimulus".
    • 1.06 22-09-2006 (PEA) : sort events by time before conversion (comments are not sorted by time).
    • 1.08 05-03-2008 (PEA) : repair error with path of header file (vhdr). This file contains the names without path of the data and event files.
    • 1.09 20-12-2010 (PEA) : fixes memory allocation (initialization of array of samples for events and free of index of channels in elec.dat).
    • 1.10 08-06-2011 (PEA) : changes stimulation codes according to Brainamp.


  • Files
  • $ELANPATH/bin/brainamp2eeg

  • See also
AttachmentSize
elecActiCap.dat305 bytes