3ddeconvolve column order with multiple basis functions and stim_times_IM

As the overly-verbose title says, I’m wondering if someone can confirm for me the column order in the x1D file if one uses a convolution with multiple basis functions and stim_times_IM.

3dDeconvolve -input ${FUNC} -mask ${MASK}
-num_stimts 1
-stim_times_IM 1 times.1D ‘SPMG2(18)’ -stim_label 1 Task

For a simple example, say I have a stim_times_IM file that has 3 onsets, and I use the SPMG function. I expect to get a total of 6 regressors, e.g.,

ColumnLabels = "Run#1Pol#0 ; Run#1Pol#1 ; Run#1Pol#2 ; Task#0 ; Task#1 ; Task#2 ; Task#3 ; Task#4 ; Task#5

Should I assume that Task#0 is the “raw” basis and Task#1 is the temporal derivative for the first onset?

Thanks for your help.

-John

John,

Should I assume that Task#0 is the “raw” basis and Task#1 is the temporal derivative for the first onset?

I don’t have a definite answer about their order, so I’ll leave the question to Bob or Rick. On the other hand, since each block lasts for 18 seconds, practically it would not make much difference if you use BLOCK(18,1) or SPMG1(18).

Thanks for your help. I may try that since I haven’t hear from Bob or Rick.

Well, I could look through the code and try to figure it out – I don’t recall the answer offhand, even though I wrote the code. But the easier solution is to try it and see. So here’s a command


3dDeconvolve -nodata 200 1.0 -polort 0 -num_stimts 1 -stim_times_IM 1 '1D: 20 80 140' 'SPMG2(18)'
1dplot nodata.xmat.1D

And the result of the plot (hopefully attached) clearly shows that the order is[ol]
[li] Polorts
[/li][li] First stim time (20 s) first basis func (‘raw’)
[/li][li] First stim time, 2nd basis (temporal derivative)
[/li][li] Second stim time (80s), first basis function
[/li][li] et cetera
[/li][/ol]
The attribute for these columns is given in nodata.xmat.1D as

ColumnLabels = "Run#1Pol#0 ; Stim#1#0 ; Stim#1#1 ; Stim#1#2 ; Stim#1#3 ; Stim#1#4 ; Stim#1#5"

Of course! Thank you, and thanks for taking the time to demonstrate how to answer the question for oneself, even if it feels a little bit obvious in retrospect (and so might have seemed like a silly question).

~j

Well, if you simply first read ALL the AFNI -help outputs (would be about 1100 pages), and then memorized them, then it would all be so eeeeaaassssyyyyy.

In other words, asking questions is what this forum is for. It was a decent question, and I didn’t know the answer myself off the top of my head – although I was pretty sure that your initial guess was right.