cntsetup - CNT File Hacker's Friend

Contents

Synopsis


-----------------------------------------------------------------------------
EEP 3.1  Max-Planck-Institute of Cognitive Neuroscience 1996-99
cntsetup 3.3   (OSF1 V4.0 alpha)              Thu Aug 19 14:09:56 1999
-----------------------------------------------------------------------------
  cntsetup [-i <regex>|-x <regex>] <operation> <src cnt> <dest cnt>
  cntsetup -c <expr> <src cnt> <dest cnt>
  cntsetup -R <src cnt> <dest cnt>

options:
  -i <regex>     select channels for <operation>
  -x <regex>     exclude channels from <operation>
  -c <expr>      compute a channel
  -R             try to "repair" cnt file checksum errors
operations:
  -s <factor>    scale scaling factors
  -d <factor>    scale raw data values
  -u <unit>      set unit strings
  -l <label>     set channel label
  -r             remove channels
  -f <freq>      set sampling frequency


Description

cntsetup allows to change the channel list, the per channel or per-file attributes in cnt-files. This program has much of a "hacker tool", it is rarely used and not well-tested. - so check its output carefully before deleting the original files!

Compute/Insert Derived Channels (-c option)

The -c allows to specify an expression how to compute a signal from other signals and constants. If the target channel is already present, it is overwritten; otherwise, an additional channel is created in the output cnt. <expr> can have the following forms (to be extended with a real expression parser...):
  <label> = <label> - <label>
  <label> = <label> + <label>
  <label> = <const> * <label>
It is possible to specify multiple, comma-separated expressions. Note that whitespaces are required to separate labels and operators (since '+' and '-' are legal characers in channel labels). This means also that you must quote the whole expression in shell commands. Typical usage is to insert bipolar channels from monopolar channels or to insert an artificial reference channel.
  cntsetup -c 'VEOG = V+ - V-, HEOG = H+ - H-' in.cnt out.cnt
  cntsetup -c 'A1 = 0.0 * A2' in.cnt out.cnt

"Repair" Corrupted Files (-R option)

If an evaluation fails with something like cnt: checksum error... or raw3: unknown compression..., this indicates that the file is corrupted and the data cannot be decoded. As a last resort, if no correct copy/backup of the file is available, you can use this option. The full file is read, the corrupted epochs - typically one second - are replaced with zeroes and surrounded by discontinuity triggers ("__").

Note that the corrupted signal epochs are lost in any case! And it will not help at all in some cases, where the failure is in the internal management tables and not only in the signal data block. So it's really better to have a backup at hand...

Manipulate Channel Attributes

See the synopsis info for the list of supported operations. Multiple channels are selected with the -i or -x pattern, whichever is more convenient for you. Per default, all channels are processed. It is possible to combine some operations in one call.


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