History of AFNI updates  

|
March 13, 2018 07:15PM
Hola, Cesar!

No, it is not possible to directly duration modulate anything but 'dmBLOCK' (and its close relatives).

One way to do it (without changes to the 3dDeconvolve code) would be to create a 3dDeconvolve run with "-nodata NR TR", where NR is the number of time points, and TR is the time spacing of the images. For each distinct stimulus duration, create a separate stimulus file.
In your case, you want
10:5 30:10 50:15 70:5
But instead create 3 files, each with the start time(s) of all stimuli with the same duration:
A05.1D = 10 70
A10.1D = 30
A15.1D = 50
Then run a command like so (with NR and TR replaced by actual numbers!):
3dDeconvolve -nodata NR TR -num_stimts 3 -polort -1 \
                       -stim_times 1 A05.1D 'SPMG1(5)'           \
                       -stim_times 2 A10.1D 'SPMG1(10)'         \
                       -stim_times 3 A15.1D 'SPMG1(15)'         \
                       -x1D SPMout -x1D_stop
The resulting file, SPMout.xmat.1D, will have 3 columns, with the 5s, 10s, and 15s duration regressors. Plot it, with
1dplot SPMout.xmat.1D
to make sure that it is what you want. Then add these columns up to get one column, and use THAT column as a regressor in the REAL analysis, using the "-stim_file" option (instead of "-stim_times"). You can do this with the following AFNI commands:
1dtranspose SPMout.xmat.1D | 1dsum stdin: > temp.1D
1dtranspose temp.1D > SPMvector.1D
\rm temp.1D
1dplot SPMvector.1D SPMout.xmat.1D
(There is probably a nicer way to do that in one of Rick's programs, but this is what I've got in my toolbag.)

Once you have the SPMvector.1D file manufactured correctly, you can delete the intermediate files as you like. Probably best to keep the commands in a script, though, so you can reproduce it later. If you want the script to be self-contained, you could use '1D: 10 70' on the command line in place of A05.1D, etc., as below:
3dDeconvolve -nodata NR TR -num_stimts 3 -polort -1   \
                       -stim_times 1 '1D: 10 7'  'SPMG1(5)'          \
                       -stim_times 2 '1D: 30'    'SPMG1(10)'         \
                       -stim_times 3 '1D: 70'    'SPMG1(15)'         \
                       -x1D SPMout -x1D_stop
Subject Author Posted

Duration Modulation with SPMG1 instead of dmBLOCK

Cesar Caballero Gaudes March 12, 2018 05:19PM

Re: Duration Modulation with SPMG1 instead of dmBLOCK

gang March 13, 2018 05:47PM

Re: Duration Modulation with SPMG1 instead of dmBLOCK

RWCox March 13, 2018 07:15PM

Re: Duration Modulation with SPMG1 instead of dmBLOCK

Cesar Caballero Gaudes March 14, 2018 05:36AM

Re: Duration Modulation with SPMG1 instead of dmBLOCK

Bob Cox March 14, 2018 10:34AM