An update:
I just realized that I could simply add 3dTcat as program over and over again, like in the following example (which paradigmatically only shows two time windows):
directory=/users/philipp/desktop/fmri/dataset/subjects
for subject in subj1_exp1
do
for fMRIruns (fitts.Subject_1+tlrc)
do
cd $directory/$subject/Preprocessing
echo "Processing $subject ..."
3dTcat \
-prefix 21-75.$fMRIruns \
-session $directory/$subject/TimeWindows \
-verb \
-tr 1.0 \
$fMRIruns'[21..75]'
3dTcat \
-prefix 199-253.$fMRIruns \
-session $directory/$subject/TimeWindows \
-verb \
-tr 1.0 \
$fMRIruns'[199..253]'
done
done
This actually works and one could now add all required time windows this way. 3dTcat then creates distinct outputs for each time window (instead of merging them all into one file). It is not a nice way to do this though, as the code would become really long depending on the number of time windows. So, if there is a nicer way to code this, please let me know.
Thanks, Philipp
Edited 1 time(s). Last edit at 09/08/2021 08:49AM by Philipp.