----------------------------------------------------------------------------- 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
;--------------------------------------------------------------------------- ;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
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.
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).