Can you please clarify a few things about the -stim_times_AM1 option in 3dDeconvolve? I’d like to specify the HRF with duration modulation, but not amplitude modulation. My stim time files have stimulus onsets married to the participant’s RT (stimulus onset*RT). When I run 3dDeconvolve, the log spits out the average amplitude for each regressor. With this format, am I modulating the duration or the amplitude? For duration modulation, should my stimulus onsets and RTs be married with a : instead of a *?

Part of my confusion comes from looking back through an old message board thread. The user was running duration modulation with SPMG2, so that AFNI calculates coefficients for both the regressor and its temporal derivative. I notice that the user was getting four coefficients per condition, which represented the coefficient for the regressor, its temporal derivative, the RT, and the RT’s temporal derivative. When I run 3dDeconvolve with the -stim_times_AM1 option below, I only get two coefficients per condition, which I assume are for the regressor and its temporal derivative. Is there a reason I’m not getting coefficients for the RT and its temporal derivative?

-stim_times_AM1 5 ${subj}.Emo_Angry_Standard_ALL.1D ‘SPMG2’ \

Thanks for the help,

Hi Phil,

Are you using dmBLOCK (or dmUBLOCK or something) as
the basis function? That is how 3dDeconvolve really
applies duration modulation. For duration modulation,
one will not get extra regressors. It is intended to
have the convolution vary as the duration does (which
is not a linearly scaling operation).

Your example showing AM1 with SPMG2 is an amplitude
modulation, not a duration modulation. And since it
is applied with AM1 the modulation is assumed (the
amplitudes of regressors vary over time), rather than
making extra regressors with modulators (having both
mean response and modulated response regressors).
So in the old thread, I expect AM2 was used, not AM1.

Yes, it is more correct to use : instead of * as the
duration modulation separator. While 3dDeconvolve
does not really care, some of the python utilities do.

To back up, what basis function are you applying?

Hi Rick,

I was originally using dmBLOCK, but switched to SPMG2 to account for the temporal derivative.

You are correct that the previous thread was using AM2. I missed that the first time. So will the code below give me duration modulated coefficients for both the regressor and its temporal derivative, if I also switch the stim time files to the stimulus onset:RT format (instead of stimulus onset*RT)?

  • stim_times_AM2 5 ${subj}.Emo_Angry_Standard_ALL.1D ‘SPMG2’ \

I haven’t been specifying a basis function. Should I be setting it to 1?


Hi Phil,

By basis function, I mean SPMG2 or dmBLOCK (possibly
including parameters).

Yes, SPMG2 will include the temporal derivative, but
it cannot be directly used for duration modulation.
The way you have specified AM2 with SPMG2 will do
amplitude modulation, not duration modulation.

Amplitude modulation allows for different heights
for each event response, while the shape stays fixed.
Duration modulation leads to varying shapes, since
the basis function is convolved with varying boxcar

  • rick

Thanks for clarifying, Rick.

So I need to decide between duration modulation (dmBLOCK) and adding temporal derivatives (SPMG2)? Is it possible to have it both ways?

I’ve run it both ways, although I now realize that running SPMG2 with RTs married to stimulus onset times will modulate the amplitude, not the shape, of the function.


Hi Phil,

The various dmBLOCK functions are the only ones
that can be used for duration modulation. If you want
modulation from both the duration and the amplitude,
it can be done with those dmBLOCK functions.

SPMG* cannot do duration modulation.

  • rick