Skip to main content
  • Description
  • Computes FFT on an EEG file.


  • Usage
  • eegspectrum myeegfilein myparameterfile.par myeventfile.pos [+std]

    with :

    • myeegfilein : input EEG file (without extension).
    • myparameterfile.par : parameter file (with extension) containing parameters for FFT computation.
    • myeventfile.pos : event file to process (with extension).
    • options :
      • +std : computes an ep file with standard deviation of FFT, stored in filename.std.p .


  • Fields of parameter file and example
  • fileprefix myfilename.fft Prefix of the output files.
    nb_eventcode 3 Number of event codes to process.
    list_eventcode 10 12 19 List of the event codes to process.
    prestim_nbsample 2000 2000 2000 List of the numbers of samples in the prestimulus period; one value for each event code.
    poststim_nbsample 3000 3000 3000 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
    fft_channel_flag 1 1 0 1 0 0 0 List of the channels to compute: 1/0 for selected/unselected channels; the total number of flags is N+2, N being the number of recorded channels in myeegfilein file; the last 2 flags should be set to 0.
    In this example, N=5, and only channels number 1, 2, 4 will be computed and stored in the output files.
    fft_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 myeegfilein 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.
    fft_center_signal 1 1 1 Flag to center signal before computing FFT (0=center signal, 1=no centering), by substracting mean value of sliding window .
    This field is optional. If omitted, no centering is done.
    fft_nb_sample_blackman 100 100 100 Number of samples of the Blackman window applied to signal before computing FFT.
    This field is optional. If omitted, the default value is 100 samples.
    fft_nb_samples 1000 1000 1000 Number of samples of the sliding window of FFT.
    This field is optional. If omitted, the window size corresponds to the whole event window.
    fft_step_nb_samples 100 100 100 Step of the sliding window of FFT.
    This field is optional. If omitted, the step is half of the sliding window.
    erpa_view 4 Value stored in all output .p file. It is used by erpa to set the default mapping view (see eegavg).
    This field is optional. If omitted, it is set to 0, and erpa default will be top view.


  • Example

  • Comments


  • Current version
  • 1.07 12-04-2013

  • History
    • 1.00 19-03-2008 (PEA) : 1st version.
    • 1.01 21-03-2008 (PEA) : adds parameter fft_step_nb_samples for adjusting step of sliding window.
    • 1.02 25-03-2008 (PEA) : corrections for last sliding window and reference of channels.
    • 1.03 14-04-2008 (PEA) : correction for mean (number of FFT out of square root).
    • 1.05 26-11-2008 (PEA) : correction for signal center (sliding window instead of event window).
    • 1.06 27-09-2010 (PEA) : update to use cmake and free release of Elan.
    • 1.07 12-04-2013 (PEA) : minor modification for FFT initialization.


  • Files
  • $ELANPATH/bin/eegspectrum

  • See also
  • eegavg