zil_soas.pl - parses DMDX input and .zil files to output times in TRs
If you have an input file myexp.rtf, and an output file my_exp.zil in the same directory. You want the stim / response times from the second subject. The first 6 scans were dummy scans, and the pulse from the scanner occurs at the beginning of the scan. The subjects potential responses were button press 1 (+Bit0 in DMDX), and button press 2.
zil_soas.pl myexp.zil -subject 2 -dummies 6 -pdelay 0 -respstr +Bit0 -respstr +Bit1
will output the stimulus and response times in TRs relative to the onset of the first non-dummy scan, as a text file myexp_sub2.txt
See ZilUtility for more information.
Note: requires RTF::Parser, available via CPAN: http://search.cpan.org/author/PVERD/RTF-Parser-1.07/
zil_soas.pl takes a DMDX .rtf input file, and an output .zil file, and outputs the recorded stimulus and response events in terms of TRs for use - in particular - with SPM.
zil_soas parses the rtf and zil files to estimate the onset times of the first event relative to the beginning of the experiment. It uses scanner pulses recorded in the zil file to calculate a best estimate of the TR, if required. Outputs are text files for each subject in the zil file, specifying stimulus and response times in terms of the beginning of the first non-dummy TR.
zil_soas.pl [options] input_file.zil
Options:
-help print help message and quit
-man full documentation and quit
-verbose more messages, more detailed help output
-quiet no messages during operation
-clobber overwrite preexisting files
-rtf specify input rtf file
-subject one or more subjects to convert
-all convert all subjects
-outdir directory to output files
-outroot root name of files to output
-pdelay time (ms) from start of scan to pulse
-tr TR (usually calculated)
-esttr starting guess for TR if calculated
-limit margin by which estimated TR may be incorrect
-tol allowable error in ms for estimated TR
-misstrs TRs to miss (any spacebar events, preceding pulses)
-dummies dummy scans
-scanpulses strings defining scan pulse events
-respstrs strings defining responses
-omititem item numbers to omit
-nullval string to signal null value
-version returns version no