cntdetrend

Synopsis


-----------------------------------------------------------------------------
EEP 3.1  Max-Planck-Institute of Cognitive Neuroscience 1996-99
cntdetrend 3.11   (OSF1 V4.0 alpha)           Wed Sep 15 13:30:25 1999
-----------------------------------------------------------------------------
  cntdetrend <source cnt> [<dest cnt>] <cfg> [<trg in>] [<rej in>]
files:
  foo.cnt      ->  food.cnt
  foo.trg          food.trg
  foo.rej          food.lin


Configuration File

;---------------------------------------------------------------------------
;Example configuration file for cntdetrend
;---------------------------------------------------------------------------

Estimation window size:
 10000                  ; in msec  (requested)
                        ; -> actual sizes will be determined by DC-resets
                        ;    and position of synchronizing triggers
Synchronize on:
 10 (-500),             ; trigger numbers (.TRG-file required)
 11 (-200), 12 (-300)

Exclude range(s) (ms):
 1000..1700, 3500..4000 ; in msec  (max. 30 separate ranges)
relative to:            ; -> ranges refer to specified triggers,
 12, 20, 22             ;    not necessarily to beginning of epochs

Estimation method:
;Robust                 ; minimizes absolute deviations
                        ;   (slower, but normally more precise estimates)
 LeastSquares           ; minimizes squared deviations

Correction threshold:
 0.0                    ; min slope, i.e. 'b' in  y=a+b*t
Max. linearity error:
 30.0                   ; average abs. deviation / RMS
Exception handling:
 DC                     ; correct DC-offset only
;none                   ; neither correct DC nor slope

Description

Splitting into Windows

The estimation of a EEG/MEG drift by a linear function is valid for epochs of few seconds only. Therefore it is necessary to split the continuous signal. The resulting discontinuities should not be in the interesting trial epochs.

To manage this, cntdetrend looks at first for present resets/discontinuities and forces a window limit there. The resulting epochs are temporary split to windows according to the length in the configuration file.

If a Synchronize trigger position is found in the range +/- 0.8 * Estimation Window Size, this position is taken instead of the requested position. If this new position is nearer then 0.5 * Estimation Window Size to a previous window limit, then it is ignored (to avoid short windows which are bad for the detrending algorithms), otherwise the new position becomes a real window limit.

This means, that a Estimation Window Size of at least 1.25 total stimulus intervals ensures that at least one stimules trigger is found in the shift range. If all stimulus triggers are configured as Synchronize triggers, every window limit (discontinuity artifact) can be shifted out of the trial window.

Trend Estimation

A linear trend is estimated and substracted independently in each window and each channel. Rejected epochs and Excluded ranges are excluded from the trend estimation.

The estimation is possible via simple regression (least error squares) or via a robust estimation (least error absolutes). To reduce the computation effort, the estimation is not done with the original sample points. The signal is virtually downsampled to about 15 Hz, where each new sample point comes from the mean of the original sample points.

It is possible to supply a test criterion for the validity of the linear estimation and to choose an exception handling (see Configuration).


EEP 3.1 - MPI/ANT(eeprobe@ant-software.nl), 15.09.1999
Copyright © 1996-99 Max-Planck-Institute of Cognitive Neuroscience. All rights reserved.