Skip to main content
  • Description
  • Extracts data from an .eeg files and writes to a text file. The data is epoched around events defined in the parameter file.

  • Usage
  • eeg2asc myeegfilein.eeg myposfile.pos myparfile.par myasciifileout
    with :

    • myeegfilein.eeg : input EEG file to process (with extension).
    • myposfile.pos : input event file (with extension).
    • myparfile.par : input parameter file (with extension).
    • myasciifileout : output text file (with extension) containing concatenated epochs of data.
    • options:
      +v : verbose mode on. If omitted, verbose mode is off.


  • Fields of parameter file and examples
  • nb_eventcode 2 Number of event codes to process.
    list_eventcode 2 5 List of the event codes to process.
    prestim_nbsample 400 800 List of the numbers of samples in the prestimulus period; one value for each event code.
    poststim_nbsample 1000 1200 List of the numbers of samples in the poststimulus period; one value for each event code; the total number of samples of the analysis is prestim_nbsample + poststim_nbsample + 1, the extra sample corresponds to the event itself.
    ep_channel_flag 1 1 0 1 0 0 0 List of the channels to average: 1/0 for selected/unselected channels; the total number of flags is N+2, N being the number of recorded channels in myeegfile.eeg file; the last 2 flags should be set to 0.
    In this example, N=5, and only channels number 1, 2, 4 will be averaged and stored in the output .p files.
    ep_channel_ref 0 5 0 6 0 0 0 List of the new reference for each channel before averaging (bipolar montage for instance):
    0: no change of the reference,
    ≠0: electrode number (rank) to which the current channel should be re-referenced.
    The total number of values is N+2, N being the number of recorded channels in myeegfile.eeg file; the last 2 flags should be set to 0.
    This field is optional. If omitted, the channels are not modified.
    In this example, N=5, and channel 1 is unchanged, channel 2 is referenced to channel 5, and channel 4 re-referenced to channel 6.


  • Example


  • Comments


  • Current version
  • 1.04 17-01-2012

  • History
    • 1.03 29-09-2010 (PEA) : update to use cmake and free release of Elan. Remove static allocation for reading EEG file header.
    • 1.04 17-01-2012 (PEA) : fixes an error on event counters.


  • Files
  • $ELANPATH/bin/eeg2asc

  • See also