I was wanting to calculate percent change per voxel, but I was wondering if there is a clever way of separating out the stimulus and baseline subbricks in a block design? I know I can do this by 3dtcat, but I was wondering if there is a way of doing this automatically based on the reference function? My task has some pseudo random ordering in it and I was hoping I could separate things without having to do it by hand for every data set.
Appreciate any thoughts.
If you view this in terms of when the expected BOLD
response is non-zero, then it would be simple to do,
grabbing the volumes when the ideal time series is
non-zero, e.g. (in tcsh syntax) for some ideal_TASK.1D:
set task_vols = `1d_tool.py -show_trs_uncensored encoded -infile ideal_TASK.1D`
3dTcat -prefix data_TASK all_runs+tlrc"[$task_vols]"
I get this error message:
** FATAL ERROR: can’t decipher index codes from …/…/TC_D2+orig
This looks like looking for the on blocks. Is there a similar way to do the opposite? From the point of view that the offs would be zeros that is.
It is hard to say much without seeing your commands.
Are you running tcsh or bash?
And what happens with that 1d_tool.py command alone?
Get that to work correctly before grabbing the output.
Ah, I think I’m running bash. I’m working on a supercomputing node. I’m not sure if I can switch to tcsh…
I’ll pull up a VM and try it there.
The output of the 1d_tool.py looks like this: 32…45,98…111,186…195
It looks like it is working fine to me.
So in bash syntax that might be:
task_vols=$(1d_tool.py -show_trs_uncensored encoded -infile ideal_TASK.1D)