----------------------------------------------------------------------------- EEP 3.1 Max-Planck-Institute of Cognitive Neuroscience 1996-99 trged 3.6 (OSF1 V4.0 alpha) Wed Sep 15 13:30:22 1999 ----------------------------------------------------------------------------- trged [-d] [-u] [-s [<file>]] -f <cmd_file>|-e <cmd> ... [<trg in>] options: -f <cmd_file> file(s) containing trigger search/replace command(s) -e <cmd> trigger search/replace command -d put no discontinuity triggers in output -u put no unmatched triggers in output -s [<file>] write replacement statistics to <file> (to standard error if <file> is omitted)Some notes to the command line (this one is not typical for EEP modules):
trged
can act as a pipe. If no trigger input file is given,
stdin is read. Output is always sent to stdout.
The final script to be executed results from the concatenation of all commands
behind a -e
switch and all commands from the files indicated by a
-f
switch in the given order. You can have multiple -e
commands and
-f
command files. Don't forget to protect
trged
commands from the shell
if you supply them at command-line!
trged
is a search-and-replace tool for trigger code sequences in EEP
trg files. It's main purpose is the response dependent recoding of the triggers
which are generated by the stimulus sequence. The recoded triggers in turn are
needed by the cntaverage
module to
distinguish the EEG epochs which corresponds to correct or uncorrect answered
trials.The discontinuity triggers "__" and "Rs", which can be generated without your control at any position during recording or evaluation, are ignored in the trigger sequence match.
trged
and there is no
quoting mechanism in the actual implementation)
trged
script:
/12/43/ /22/43/ /13/43/ /23/43/ /14/43/ /24/43/
Since the search sequence consists of regular expressions and the replace sequence supports special tags for "add a constant" and "keep unchanged", you can do the same thing with the completely equivalent command:
/1[234]/43/ /+10/&/The long first form is self-documenting and easily understood by everyone, whereas the second one looks like a random pile of characters and is cool... Make your own choice.
Using the second form, you could write a shellscript line
cntevents -p foo.cnt | trged -e "/1[234]/43/ /+10/&/" > foo.trgwhich extracts the archived triggers from the cnt file, passes them through the editing script and finally writes the recoded triggers to a file.