Hello afni gurus,
Is there a straightforward way to build a square-wave response model (no convolution) by reading stimtimes from a file?
I am modeling a number of tasks with a mixed block-event design. Onset and offset of task blocks vary across tasks and subjects. Currently, I am using -stim_times_AM1 blocktimes.txt with ‘dmBLOCK(1)’ to model the sustained signal, and a set of TENT functions to model the transients associated with block onset and offset. But instead of the ramping inherent to the BLOCK() function, I would like to have the sustained model start instantaneously when the transient model returns to baseline, so that all variance at onset/offset is attributed to transient, and so that there’s no ‘gap’ between sustained and transient.
I’ve fooled around with waver (e.g., waver -EXPR “step(t-4)*step(12-t)” -peak 1 | 1dplot -stdin ), but I have not found a way to build a square wave by using waver while reading stimulus times from a file. It would be great if there were a simple way to do this (or a programmatic way to do something similar on the command line); otherwise it’s not the biggest deal.
Thanks for any thoughts y’all have.