Dear AFNI gurus,
Time to do some VOI analysis of trial-type-averaged signal (HRF responses) thru a VOI mask.
To do the VOI dumpouts of raw signal change, averaged over time, I would generate the trial-averaged 3d+time dataset thus:
1) Create a map file (.txt format), where the time series dataset would be coded at each volume based on the event type of interest, e.g.
A1
A2
A3
-
-
-
-
C1
C2
C3
-
-
B1
B2
B3
-
Etc….
2) Enter AFNI GUI, go to Define Datamode, then to “Plugins”
3) Select “Reorder”
4) Under the Input, I would select my 3d+time dataset of concatenated runs of the behavioral experiment
5) Under the output, I would enter my desired filename, e.g. “Trial-type-averaged”
6) Under Map File, I would enter the txt file that is my map file.
7) Under “Duplicates” pull-down menu, select “Average”
8) Click Run+Close to make the new, shorter 3d+time dataset consisting of three volumes per every letter-coded trial event type
Now, I need to do this about 120 times. This is because I need to dump out THREE outputs per subject with three mapfiles, where the subsequent mapfiles would be progressively delayed by three additional volumes, e.g.
-
-
-
A2
A2
A3
-
-
-
-
C1
C2
Etc.
This is because the timing of events in my task is jittered, and there is spillover of the HRF of one event type across the onset of another stimulus/event type, which would need its own unique coding. Doing the progressively-shifting map files can get around this, with the VOI maskave text outputs concatentated so that I end up with a whole HRF (where latter timepoints are contaminated with radomized jittered other trial events). It’s time consuming but it works.
I’d LOVE a script based method to do this! Like:
3dReorder –input timeseries123+tlrc –mapfile eventmapping.txt –average –prefix trialaveraged
This would be an immense time-saver! Is there such a thing? If not, could you program one? It shouldn’t be too hard for you guys.