3dDeconvolve Varying Duration Modulations Across Trials with SPMG or GAM

Hi All,

Using 3dDeconvolve and stim_times_IM, I’d like to set my SPMG or GAM function to be duration-modulated, but for the durations to vary across trials. I know there are options for setting your SPMG and GAM to be duration-modulated, but it seems we can only set the duration to a constant across trails (e.g. 20 seconds in the example below from 3dDeconvolve docs:

                    The SPMGx functions now can take an optional   
                    (duration) argument, specifying that the primal
                    SPM basis functions should be convolved with   
                    a square wave 'duration' seconds long and then 
                    be normalized to have peak absolute value = 1; 
                    e.g., 'SPMG3(20)' for a 20 second duration with
                    three basis function.  [28 Apr 2009])

Is there a way to do this for SPMG or GAM? One option that is close is the combination of stim_times_IM and dmBLOCK, like so:

“*N.B.: You can also use dmBLOCK with -stim_times_IM, in which case
each time in the ‘tname’ file should have just ONE extra
parameter – the duration – married to it, as in ‘30:15’,
meaning a block of duration 15 seconds starting at t=30 s.”

But it’s still not quite what I’d like.

Much thanks for any help in advance!
Anthony

Anthony, check out the option dmBLOCK or dmUBLOCK(-X) with -stim_times_AM1 and -stim_times_AM2 in the 3dDeconvolve help.

Hi Anthony,

I believe that DM only works with dmBLOCK,
regardless of whether one uses IM.

  • rick

Thanks so much for the responses Gang and Rick. It doesn’t have to be with DM, I hope I didn’t give that impression. I just wish to have SPMG or GAM functions varying in duration across trials (e.g. if I have onscreen stimuli lasting from 4-12 seconds, randomized). So there’s no way to do this with AFNI? Or am I missing something? What I’m looking for is akin to FSL Feat’s 3-column-format convolution (where column 1 is onset, 2 is duration, and 3 is total value) with an FSL Feat double-gamma HRF. Thanks in advance for any help!

Ahh I see now. I was thinking the BLOCK function was literally a block function that was then deconvolved for your signal, but I now understand that the BLOCK function is deconvolved with an AFNI function and then deconvolved for your signal. This makes so much more sense! Thanks again for your help!

Okay, great! Yes, BLOCK is a very specific shape for a
basis function, similar to GAM.

I was thinking you did not like the shape of the BLOCK
function, and preferred that of GAM in a strong way.
Wanting this for SPMG3 would be more reasonable,
though we cannot do that either (well, one could do
it by constructing the event regressors and adding
them up, but that would be a bit ugly).

Anyway, I am glad that you are satisfied with BLOCK!

  • rick