Skip to main content
  • Description
  • Writes in a text file the latency limits of the time-windows detected with a threshold on each channel of an EP file (.p).

  • Usage
  • epwinwrite epfile.p threshold flag_abs flag_sign outputfile.txt [latmin latmax] [half-window]
    with :

    • epfile.p : input EP filename (with extension).
    • threshold :amplitude threshold for time-window detection (in signal units).
    • flag_abs : possible values :
    • 0 : window detection is based on signed signal amplitude.
      1 : window detection is based on absolute signal amplitude.

    • flag_sign : possible values :
    • 0 : windows detected when amplitude <= threshold.
      1 : windows detected when amplitude >= threshold.

    • outputfile.txt : name of the text file where results will be written (with extension).
    • options :
    • latmin latmax : latency limits (in ms) between which window detection will be performed. If omitted, analysis is performed on the entire epoch.
      half-window : half-window duration for computing corrected window limits (this value refers to the half-window value used in eegstat for instance). If omitted, no corrected value is computed.


  • Fields of parameter file and example

  • Examples
  • epwinwrite file.p 10 0 1 file.txt -100 300 25

    For each channel of file.p, the windows having an amplitude value >= 10 (signal units) are detected. This detection is performed in the interval -100 to 500 ms. Latency limits (lat1 and lat2) of each window are computed and written in file.txt.
    Latency limits corrected by the half-window value (hw) are also computed (lat1-hw and lat2+hw). This refers to the windowed processing performed by other programs such as smoothing (epsmooth) or statistical analysis (eegstat).
    The mean value of the signal (signed or absolute values) is also computed and written for each window.

    Example of output file (file.txt):

    file chan# chan win# lat1 lat2 duration lat1_c lat2_c duration_c on border mean_amp
    kw11.H.p 1 M1 1 -100.0 -70.0 30.0 -125.0 -45.0 82.0 < 13.045
    kw11.H.p 1 M1 2 130.0 132.0 2.0 105.0 157.0 52.0 10.565
    kw11.H.p 1 M1 3 274.0 288.0 14.0 249.0 313.0 64.0 11.955
    kw11.H.p 3 F3 1 24.0 32.0 8.0 -1.0 57.0 58.0 12.926
    kw11.H.p 3 F3 2 56.0 70.0 14.0 31.0 95.0 64.0 14.121
    kw11.H.p 3 F3 3 264.0 270.0 6.0 239.0 295.0 56.0 11.113
    kw11.H.p 3 F3 4 278.0 284.0 6.0 253.0 309.0 56.0 11.333
    kw11.H.p 3 F3 5 288.0 290.0 2.0 263.0 315.0 52.0 10.565
    kw11.H.p 4 T3 1 128.0 132.0 4.0 103.0 157.0 54.0 10.709
    kw11.H.p 4 T3 2 256.0 300.0 38.0 231.0 319.0 88.0 > 12.366

    chan# : channel rank in the .p file
    chan : channel name
    win# : window number for each channel
    lat1 : latency (ms) of the beginning of the window
    lat2 : latency (ms) of the end of the window
    duration : duration (ms) of the window
    lat1_c : latency (ms) of the beginning of the window corrected by the half-window (hw) parameter (lat1_c = lat1 – hw)
    lat2_c : latency (ms) of the end of the window corrected by the half-window (hw) parameter (lat2_c = lat2 + hw)
    duration : duration (ms) of the corrected window (duration_c = duration + 2*hw)
    > or < : window limit detected at the upper or lower latency limit for the detection (lat2 or lat1, respectively).
    mean_amp : mean amplitude of the signal over the detected window (in signal units)


  • Comments


  • Current version
  • 1.02 02-02-2011

  • History
    • 1.00 30-04-2005 (OB) : 1st version.
    • 1.01 29-09-2010 (PEA) : updates to use cmake and free release of Elan.
    • 1.02 02-02-2011 (PEA) : removes static allocation for reading EP file.


  • Files
  • $ELANPATH/bin/epwinwrite

  • See also
  • epsmooth, eegstat, epmask, epresample