Skip to main content
  • Description
  • Computes from an EEG file the mean of the time-frequency powers for each single-trial (mean squared modulus of the wavelet transform) in a time-frequency window. For each epoch, it computes the mean value on a baseline window and substracts this value from the mean of the measure window. The output is stored in a text file format (one .val.txt file by event code).
    These computations requires a parameter file .par and an event position file .pos. Usually, the .pos file is the output of the averaging/rejection program eegavg.

  • Usage
  • tfval myeegfile.eeg myposfile.pos myparfile.par [ -e ]

    with :

    • myeegfile.eeg: input .eeg file to process (with extension).
    • myposfile.pos: input event file (with extension).
    • myparfile.par: text file containing computation parameters (with extension).
    • options:
      -e : don't print column titles in output file. If omitted, the titles of each columns are printed at the beginning of the file (on the first line).


  • Fields of parameter file and examples
  • fileprefix myfilename Prefix of the output text files.
    nb_eventcode 2 Number of event codes to process.
    list_eventcode 2 5 List of the event codes to process.
    prestim_nbsample 400 400 List of the numbers of samples in the prestimulus period; one value for each event code.
    poststim_nbsample 1000 1000 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.
    tf_channel_flag 1 1 0 1 0 0 0 List of the channels to process: 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 processed and stored in the output .avg.tf files.
    single_freq_min 18 18 List of the starting frequencies (in Hz) for the time-frequency analysis (one value for each event code).
    List of the ending frequencies (in Hz) for the time-frequency analysis (one value for each event code).
    single_freq_step 2 2 List of the frequency steps (in Hz) for the time-frequency analysis (one value for each event code).
    tf_nb_sample_blackman 100 100 List of the number of samples in the rise or fall time period of the blackman window applied on the single trials before the wavelet transform (one value for each event code).
    tf_wavelet_type 1 1 List of the types of wavelet used for the time-frequency analysis (one value for each event code):
    1: Morlet wavelet.
    2: Gabor wavelet.
    tf_morlet_m 7 7 In case of Morlet wavelet, list of the m ratio used for the time-frequency analysis (one value for each event code): m=f0/sigmaf
    Suggested values for m: m>5, usually m=7.
    This determines the number of cycles of the wavelet.
    tf_gabor_sigmat 100 100 In case of Gabor wavelet, list of the half-window durations of the wavelets (in msec) irrespective of the frequency band (one value for each event code).
    single_lat_min 100 100 List of the starting latencies of the measure window in ms (one value for each event code).
    single_lat_max 100 100 List of the ending latencies of the measure window in ms (one value for each event code).
    single_base_min -100 -100 List of the starting latencies of the baseline window in ms (one value for each event code).
    single_base_max -50 -50 List of the ending latencies of the baseline window in ms (one value for each event code).


  • Examples

  • Comments


  • Current version
  • 1.06 12-06-2012

  • History
    • 1.00 01-08-2001 (OB/CTB/PEA) : 1st documented version.
    • 1.01 17-06-2002 (PEA) : minor modification (event file reading).
    • 1.02 26-09-2003 (PEA) : minor modification.
    • 1.03 05-01-2004 (PEA) : supports 32 bits EEG.
    • 1.04 05-02-2004 (PEA) : minor modification.
    • 1.05 13-09-2011 (PEA) : updates to use cmake and free release of Elan. Removes static allocations. Uses threads to compute TF transform (TF transform function of libelansignal).
    • 1.06 12-06-2012 (PEA) : minor modification : output file name creation.


  • Files
  • $ELANPATH/bin/tfval

  • See also
  • tfavg, tfmval