Skip to main content
  • Description
  • Computes a grand average from several evoked potential files (.p) generally produced by eegavg . The output is a new evoked potential file (.p).

  • Usage
  • epavg [+force]

    with :

    • option :
    • +force : no test of compatibility on the electrode numbers.

    This program uses an interactive input.The questions are as follows (questions (program) are italic, answers (user) are bold):
    grand average filename (no .p extension) or Return to quit :
    standard average (return), normalised (n), weighted (w)?

    Name of the .p file to average (no .p extension) or return to stop the list:
    Name of the .p file to average (no .p extension) or return to stop the list:
    Name of the .p file to average (no .p extension) or return to stop the list:
    Name of the .p file to average (no .p extension) or return to stop the list:

    grand average filename (no .p extension) :

  • Fields of parameter file and example

  • Examples
  • This program will compute the average of myfile1, myfile2 and myfile3 and will store the results in myoutputfile. The number of channel, the number of samples, the analysis duration, the number of pre-stimulus samples and the sampling period must be the same in all input files.

  • Comments
    1. It should be noted that the ep file name are entered without the .p extension.
    2. The averaging options can be :
    3. Standard: ouput values are simple average values.
      Normalized: the values of each input files is divided by the maximum absolute value of this file, and normalized values are then averaged. The mean of the maximum values of all files is displayed at the end of the averaging: "..... mean of normalisation values = xx,xx micro-volts"
      weighted: the values of each input file is multiplied by the actual number of trials averaged for this file. Then these new values are summed, and divided by the sum of trials across files.

    4. Possible error messages:
    5. Incompatible epfile : p_xe[n]
      the file you just enter is not compatible with the previous ones. The 'n' indicates which field of the *.p header is wrong:
      - 1 the number of channel,
      - 2 the number of samples,
      - 3 the epoch duration,
      - 4 the number of pre-stimulus samples,
      - 5 the sampling period.

  • Current version
  • 1.08 28-06-2012

  • History
    • 1.00 09-12-2001 (PEA) : 1st documented version.
    • 1.01 01-02-2002 (PEA) : minor modification.
    • 1.02 21-01-2003 (PEA) : adds +force option : disables electrode compatibility test.
    • 1.03 10-11-2005 (PEA) : minor modification.
    • 1.04 13-08-2007 (PEA) : minor modification.
    • 1.05 29-09-2010 (PEA) : updates to use cmake and free release of Elan.
    • 1.06 24-01-2011 (PEA) : removes static allocation for reading EP file.
    • 1.07 05-03-2011 (PEA) : removes header check in reading EP file (libpem) due to Fortran compatibility problems.
    • 1.08 28-06-2012 (PEA) : adds epsilon when comparing headers for file compatibility.

  • Files
  • $ELANPATH/bin/epavg

  • See also
  • epdiff