'stim_times' handling in 3dDeconvolve

I am trying to figure out how the 3dDeconvolve program calculates the correct stimulus times when the stimulus presentation times do not match the acquisitions/TR. (For example, if TR=2s and a stimulus is presented at [2.5,6.7,12.3…]s after the start of a run, rather than [2,6,12…]s).

I am guessing some sort of upsampling has to occur to estimate an approximate presentation time? Does 3dDeconvolve use something similar to “timing_tool.py” where the TR is altered (upsampled) and the min_frac flag determines the percentage of each interpolated TR that has to be occupied? If this is how it works, I am also guessing some kind of compression/downsampling has to happen after the analysis is run. Would appreciate any insight into this.

Thanks!

I am trying to figure out how the 3dDeconvolve program calculates the correct stimulus times when the stimulus
presentation times do not match the acquisitions/TR. (For example, if TR=2s and a stimulus is presented at
[2.5,6.7,12.3…]s after the start of a run, rather than [2,6,12…]s).

No up- / down-sampling is involved. Instead, when a regressor (presumed hemodynamic response curve) is generated based on the stimulus onset times, it’s sampled at the TR grids to match up with the EPI time series.

Hi there,

Thank you for your response. Just to ask a follow-up question, does this work the same way if you are running the analysis with the ‘TENT’ impulse response option, even though it is not convolved with a particular shape?

To give more context on the question, in our experiment we have a rapid event-related design:
TR=2s, ISI~1.5s, stimuli do not align with the TR grid.
We think the HRFs generated in our experiment do not match particularly well to the canonical HRF and have been running 3dDeconvolve with the TENT option (usually with start time=0, stop time=16s, timestep=2s).

Thanks again for your time and apologies if I am missing the obvious here.

To give more context on the question, in our experiment we have a rapid event-related design:
TR=2s, ISI~1.5s, stimuli do not align with the TR grid.

In that case with TENT, 3dDeconvolve will create the regressors still on the TR grids based on the stimulus timing if you specify the same time resolution for TENT as TR. However, if you choose a finer grid for the TENT interval than TR, 3dDeconvolve will provide the estimated IRF through up-sampling (or interpolation).

Thanks, that makes sense. Final question, what type of interpolation is it? Linear, cubic, etc?

For TENT (or TENTzero), the interpolation is linear; for CSPLIN (or CSPLINzero), it’s cubic.