@make_random timing.py and 3dDeconvolve -nodata for ITI efficiency

Hi,

I am trying to use the @stim_analyze script to simulate a design for optimal ITI efficiency.
The experiment has:
-3 stimuli classes: pos, neg, neu
-135 stims (45 in each class)
-15 stim reps per run
-1s TR
-5 sec stim duration

Does it make sense to run the below script utilizing make_random_timing input for 3dDeconvole to optimize efficiency?

This is the modified script:
#!/bin/tcsh

set num_stim = 3
set num_runs = 3
set pre_rest = 20 # min rest before first stim (for magnet steady state)
set post_rest = 20 # min rest after last stim (for trailing BOLD response)
set min_rest = 2 # minimum rest after each stimulus
set tr = 1.0 # used in 3dDeconvolve, if not make_random_timing.py

set stim_durs = “5 5 5”
set stim_reps = “15 15 15”
set run_lengths = “760”
set labels = “pos neg neu”

set iterations = 100 # number of iterations to compare
set seed = 1234567 # initial random seed
set outdir = stim_results # directory that all results are under
set LCfile = NSD_sums # file to store norm. std. dev. sums in

set pattern = ‘norm. std.’ # search pattern for normalized stdev vals

if ( -d $outdir ) then
echo “** removing output directory, $outdir …”
\rm -fr $outdir
endif

echo “++ creating output directory, $outdir …”
mkdir $outdir
if ( $status ) then
echo “failure, cannot create output directory, $outdir”
exit
endif

cd $outdir

echo -n “” > $LCfile

echo -n “iteration (of $iterations): 0000”

foreach iter #(count -digits 4 1 $iterations) #I GET AN ERROR HERE

    @ seed = $seed + 1

    make_random_timing.py -num_stim $num_stim -stim_dur $stim_durs  \
            -num_runs $num_runs -run_time $run_lengths              \
            -num_reps $stim_reps -prefix stimes.$iter               \
            -pre_stim_rest $pre_rest -post_stim_rest $post_rest     \
            -min_rest $min_rest                                     \
            -stim_labels $labels                                    \
            -seed $seed                                             \
            -tr $tr                                                 \
            -show_timing_stats                                      \
            -save_3dd_cmd cmd.3dd.$iter                             \
                    >& out.mrt.$iter

    tcsh cmd.3dd.$iter >& out.3dD.$iter

    set nums = ( `awk -F= '/'"$pattern"'/ {print $2}' out.3dD.${iter}` )

    set sstr = $nums[1]
    foreach num ( $nums[2-] )
        set sstr = "$sstr + $num"
    end
    set num_sum = `ccalc -expr "$sstr"`

    echo -n "$num_sum = $sstr : " >> $LCfile
    echo    "iteration $iter, seed $seed"                  >> $LCfile

    echo -n "\b\b\b\b$iter"

end

echo “”
echo “done, results are in ‘$outdir’, LC sums are in ‘$LCfile’”
echo consider the command: “sort -n $outdir/$LCfile | head -1”

Hi Daisy,

That script look appropriate to me. There is just one typo that I
see in the foreach iter line (it shows “foreach iter #” - that ‘#’
terminates the line before the count command is seen).
Otherwise it looks good.

Once the output files are generated (e.g. stimes.0001_*.1D),
you can get some information about them via timing_tool.py.
For example, a complete listing of events and rest:

timing_tool.py -multi_stim_dur 5 5 5 -multi_timing stimes.0001_*.1D -multi_timing_to_event_list GE:ALL -

Or ISI (inter stimulus interval rest) stats:

timing_tool.py -multi_stim_dur 5 5 5 -multi_timing stimes.0001_*.1D -multi_show_isi_stats

Please let me know if any of that is not clear.

  • rick

Thanks, Rick. This is really clear and very helpful program. I fixed that # but am still getting an error in the same location:

afni_make_randomtiming_3dDeconvolve: line 70: syntax error near unexpected token (' afni_make_randomtiming_3dDeconvolve: line 70: foreach iter (count -digits 4 1 $iterations)’

I also tried replying the “0000” with “100” to match the 100 iterations in the above line:
echo -n “iteration (of $iterations): 0000”

Actually i fixed this, I just needed to execute it in tcsh.

So the output of sorting:
sort -n stim_results/NSD_sums | head -1
0.247900 = 0.0822 + 0.0820 + 0.0837 : iteration 0076, seed 1234643

Does this mean iteration 76 had the highest efficiency?

Output of:
timing_tool.py -multi_stim_dur 5 5 5 -multi_timing stimes.0001_*.1D -multi_show_isi_stats
is this:
ISI statistics (3 elements) :

                    total      per run
                   ------      ------------------------------
total time         2190.4       725.9    735.2    729.3  
total time: stim    675.0       225.0    225.0    225.0  
total time: rest   1515.4       500.9    510.2    504.3  

rest: total isi    1439.6       477.9    481.1    480.6  
rest: pre stim       75.8        23.0     29.1     23.7  
rest: post stim       0.0         0.0      0.0      0.0  

num stimuli         135          45       45       45  


                     min      mean     max     stdev
                   -------  -------  -------  -------
rest: pre-stim      23.000   25.267   29.100    3.338
rest: post-stim      0.000    0.000    0.000    0.000

rest: run #0 ISI     2.000   10.861   45.600    8.890
rest: run #1 ISI     2.000   10.934   58.200   10.152
rest: run #2 ISI     2.000   10.923   43.800    8.539

all runs: ISI        2.000   10.906   58.200    9.149
all runs: stimuli    5.000    5.000    5.000    0.000

and the output of:
timing_tool.py -multi_stim_dur 5 5 5 -multi_timing stimes.0001_*.1D -multi_timing_to_event_list GE:ALL -

have 45 events in run 1

is this:

have 45 events in run 1

class prev_class event_time timediff duration stim_file

3 INIT 23.000 23.000 5.000 stimes.0001_03_neu.1D
1 3 32.800 4.800 5.000 stimes.0001_01_pos.1D
2 1 48.800 11.000 5.000 stimes.0001_02_neg.1D
2 2 59.000 5.200 5.000 stimes.0001_02_neg.1D
2 2 66.600 2.600 5.000 stimes.0001_02_neg.1D
3 2 73.600 2.000 5.000 stimes.0001_03_neu.1D
1 3 83.300 4.700 5.000 stimes.0001_01_pos.1D
2 1 95.200 6.900 5.000 stimes.0001_02_neg.1D
1 2 108.000 7.800 5.000 stimes.0001_01_pos.1D
1 1 122.700 9.700 5.000 stimes.0001_01_pos.1D
2 1 130.900 3.200 5.000 stimes.0001_02_neg.1D
2 2 139.800 3.900 5.000 stimes.0001_02_neg.1D
2 2 166.900 22.100 5.000 stimes.0001_02_neg.1D
1 2 176.100 4.200 5.000 stimes.0001_01_pos.1D
2 1 183.700 2.600 5.000 stimes.0001_02_neg.1D
3 2 199.900 11.200 5.000 stimes.0001_03_neu.1D
2 3 219.200 14.300 5.000 stimes.0001_02_neg.1D
1 2 226.700 2.500 5.000 stimes.0001_01_pos.1D
1 1 238.000 6.300 5.000 stimes.0001_01_pos.1D
1 1 247.100 4.100 5.000 stimes.0001_01_pos.1D
3 1 272.200 20.100 5.000 stimes.0001_03_neu.1D
3 3 296.300 19.100 5.000 stimes.0001_03_neu.1D
2 3 304.600 3.300 5.000 stimes.0001_02_neg.1D
3 2 323.100 13.500 5.000 stimes.0001_03_neu.1D
3 3 330.100 2.000 5.000 stimes.0001_03_neu.1D
3 3 349.700 14.600 5.000 stimes.0001_03_neu.1D
2 3 362.500 7.800 5.000 stimes.0001_02_neg.1D
3 2 399.200 31.700 5.000 stimes.0001_03_neu.1D
1 3 449.800 45.600 5.000 stimes.0001_01_pos.1D
3 1 467.700 12.900 5.000 stimes.0001_03_neu.1D
1 3 482.200 9.500 5.000 stimes.0001_01_pos.1D
3 1 490.600 3.400 5.000 stimes.0001_03_neu.1D
1 3 502.900 7.300 5.000 stimes.0001_01_pos.1D
2 1 521.500 13.600 5.000 stimes.0001_02_neg.1D
2 2 541.400 14.900 5.000 stimes.0001_02_neg.1D
2 2 557.100 10.700 5.000 stimes.0001_02_neg.1D
3 2 575.800 13.700 5.000 stimes.0001_03_neu.1D
3 3 593.300 12.500 5.000 stimes.0001_03_neu.1D
3 3 604.900 6.600 5.000 stimes.0001_03_neu.1D
1 3 633.300 23.400 5.000 stimes.0001_01_pos.1D
3 1 643.900 5.600 5.000 stimes.0001_03_neu.1D
1 3 651.500 2.600 5.000 stimes.0001_01_pos.1D
1 1 669.300 12.800 5.000 stimes.0001_01_pos.1D
2 1 688.700 14.400 5.000 stimes.0001_02_neg.1D
1 2 720.900 27.200 5.000 stimes.0001_01_pos.1D

have 45 events in run 2

class prev_class event_time timediff duration stim_file

1 INIT 29.100 29.100 5.000 stimes.0001_01_pos.1D
2 1 36.700 2.600 5.000 stimes.0001_02_neg.1D
1 2 45.200 3.500 5.000 stimes.0001_01_pos.1D
3 1 58.300 8.100 5.000 stimes.0001_03_neu.1D
2 3 76.500 13.200 5.000 stimes.0001_02_neg.1D
1 2 93.100 11.600 5.000 stimes.0001_01_pos.1D
2 1 100.900 2.800 5.000 stimes.0001_02_neg.1D
3 2 115.900 10.000 5.000 stimes.0001_03_neu.1D
2 3 136.000 15.100 5.000 stimes.0001_02_neg.1D
3 2 146.900 5.900 5.000 stimes.0001_03_neu.1D
1 3 169.100 17.200 5.000 stimes.0001_01_pos.1D
3 1 178.800 4.700 5.000 stimes.0001_03_neu.1D
2 3 186.700 2.900 5.000 stimes.0001_02_neg.1D
3 2 208.900 17.200 5.000 stimes.0001_03_neu.1D
1 3 231.800 17.900 5.000 stimes.0001_01_pos.1D
2 1 295.000 58.200 5.000 stimes.0001_02_neg.1D
1 2 302.600 2.600 5.000 stimes.0001_01_pos.1D
1 1 322.100 14.500 5.000 stimes.0001_01_pos.1D
3 1 351.600 24.500 5.000 stimes.0001_03_neu.1D
3 3 379.000 22.400 5.000 stimes.0001_03_neu.1D
3 3 388.900 4.900 5.000 stimes.0001_03_neu.1D
2 3 399.500 5.600 5.000 stimes.0001_02_neg.1D
2 2 413.700 9.200 5.000 stimes.0001_02_neg.1D
3 2 422.100 3.400 5.000 stimes.0001_03_neu.1D
3 3 437.100 10.000 5.000 stimes.0001_03_neu.1D
1 3 446.500 4.400 5.000 stimes.0001_01_pos.1D
3 1 455.400 3.900 5.000 stimes.0001_03_neu.1D
1 3 465.400 5.000 5.000 stimes.0001_01_pos.1D
2 1 475.800 5.400 5.000 stimes.0001_02_neg.1D
2 2 504.300 23.500 5.000 stimes.0001_02_neg.1D
3 2 525.400 16.100 5.000 stimes.0001_03_neu.1D
2 3 538.600 8.200 5.000 stimes.0001_02_neg.1D
1 2 553.900 10.300 5.000 stimes.0001_01_pos.1D
3 1 589.200 30.300 5.000 stimes.0001_03_neu.1D
2 3 608.700 14.500 5.000 stimes.0001_02_neg.1D
2 2 615.700 2.000 5.000 stimes.0001_02_neg.1D
2 2 627.000 6.300 5.000 stimes.0001_02_neg.1D
1 2 637.100 5.100 5.000 stimes.0001_01_pos.1D
3 1 654.000 11.900 5.000 stimes.0001_03_neu.1D
1 3 663.700 4.700 5.000 stimes.0001_01_pos.1D
1 1 671.200 2.500 5.000 stimes.0001_01_pos.1D
2 1 697.400 21.200 5.000 stimes.0001_02_neg.1D
3 2 707.800 5.400 5.000 stimes.0001_03_neu.1D
1 3 715.100 2.300 5.000 stimes.0001_01_pos.1D
1 1 730.200 10.100 5.000 stimes.0001_01_pos.1D

have 45 events in run 3

class prev_class event_time timediff duration stim_file

3 INIT 23.700 23.700 5.000 stimes.0001_03_neu.1D
2 3 46.000 17.300 5.000 stimes.0001_02_neg.1D
2 2 55.000 4.000 5.000 stimes.0001_02_neg.1D
2 2 64.800 4.800 5.000 stimes.0001_02_neg.1D
2 2 75.400 5.600 5.000 stimes.0001_02_neg.1D
3 2 124.200 43.800 5.000 stimes.0001_03_neu.1D
3 3 134.100 4.900 5.000 stimes.0001_03_neu.1D
2 3 150.900 11.800 5.000 stimes.0001_02_neg.1D
3 2 162.800 6.900 5.000 stimes.0001_03_neu.1D
1 3 175.800 8.000 5.000 stimes.0001_01_pos.1D
3 1 187.100 6.300 5.000 stimes.0001_03_neu.1D
1 3 203.400 11.300 5.000 stimes.0001_01_pos.1D
3 1 220.100 11.700 5.000 stimes.0001_03_neu.1D
3 3 237.700 12.600 5.000 stimes.0001_03_neu.1D
2 3 265.000 22.300 5.000 stimes.0001_02_neg.1D
1 2 280.100 10.100 5.000 stimes.0001_01_pos.1D
2 1 292.400 7.300 5.000 stimes.0001_02_neg.1D
2 2 330.600 33.200 5.000 stimes.0001_02_neg.1D
1 2 348.800 13.200 5.000 stimes.0001_01_pos.1D
1 1 367.300 13.500 5.000 stimes.0001_01_pos.1D
3 1 380.800 8.500 5.000 stimes.0001_03_neu.1D
3 3 388.400 2.600 5.000 stimes.0001_03_neu.1D
2 3 403.000 9.600 5.000 stimes.0001_02_neg.1D
2 2 421.200 13.200 5.000 stimes.0001_02_neg.1D
3 2 437.700 11.500 5.000 stimes.0001_03_neu.1D
1 3 453.600 10.900 5.000 stimes.0001_01_pos.1D
1 1 463.100 4.500 5.000 stimes.0001_01_pos.1D
1 1 487.400 19.300 5.000 stimes.0001_01_pos.1D
1 1 494.400 2.000 5.000 stimes.0001_01_pos.1D
3 1 508.700 9.300 5.000 stimes.0001_03_neu.1D
1 3 541.900 28.200 5.000 stimes.0001_01_pos.1D
3 1 552.600 5.700 5.000 stimes.0001_03_neu.1D
1 3 561.000 3.400 5.000 stimes.0001_01_pos.1D
3 1 571.700 5.700 5.000 stimes.0001_03_neu.1D
1 3 579.100 2.400 5.000 stimes.0001_01_pos.1D
3 1 589.000 4.900 5.000 stimes.0001_03_neu.1D
1 3 612.300 18.300 5.000 stimes.0001_01_pos.1D
2 1 621.800 4.500 5.000 stimes.0001_02_neg.1D
2 2 642.500 15.700 5.000 stimes.0001_02_neg.1D
2 2 653.200 5.700 5.000 stimes.0001_02_neg.1D
1 2 660.700 2.500 5.000 stimes.0001_01_pos.1D
2 1 685.300 19.600 5.000 stimes.0001_02_neg.1D
1 2 703.700 13.400 5.000 stimes.0001_01_pos.1D
2 1 712.300 3.600 5.000 stimes.0001_02_neg.1D
3 2 724.300 7.000 5.000 stimes.0001_03_neu.1D

Output of:
1d_tool.py -cormat_cutoff 0.1 -show_cormat_warnings -infile X.xmat.1D
is this:

Warnings regarding Correlation Matrix: X.xmat.1D

severity correlation cosine regressor pair


medium: -0.210 0.007 (21 vs. 22) pos#0 vs. neg#0
medium: -0.197 0.016 (21 vs. 23) pos#0 vs. neu#0
medium: -0.190 0.022 (22 vs. 23) neg#0 vs. neu#0
medium: -0.150 -0.136 (15 vs. 22) Run#3Pol#1 vs. neg#0
medium: -0.123 -0.111 ( 6 vs. 21) Run#1Pol#6 vs. pos#0
medium: -0.119 -0.108 ( 2 vs. 22) Run#1Pol#2 vs. neg#0
medium: -0.103 -0.094 (19 vs. 23) Run#3Pol#5 vs. neu#0

Would you be able to provide any guidance on how to interpret these?
How should I be interpreting the NSD sums? Is iteration 76 the high efficiency? NSD sums are linear contrast sums, right?

My goal here was to identify the most efficient ITI timing and I want to compare exponential versus uniform jitters and I don’t know how to set those different parameters. I also am having trouble finding the “@DesginSearch: Output” script referred to in various handouts.

Thanks!

Hi Daisy,

Yes, 76 would be viewed as the highest efficiency, though it
is out of only 100 iterations. If you do this for many sets
of timing, consider going up to 10000, say.

The measure used is the sum of normalized standard deviations
for the trivial contrasts of each term of interest.

Oh, if you want to compare exponential vs uniform jitters, the
make_random_timing.py command will have to be rewritten. And
that might affect the rest of the script.

Work on getting a single execution of the advanced form of
MRT.py working, and go from there. Start with:

make_random_timing.py -help_advanced

and follow “Advanced Example 1”. Once that works, alter the
distribution of the ‘rest’ timing class to be perhaps
uniform_grid (or _rand).

Actually, I am not sure about the timing here. If each run
is of duration 760, subtracting 40s for pre/post rest and
dividing by 45 (events) that leaves 16s per event, which
would be 5s stim plus 11s rest.

Do you really want an average of 11s rest between events?

  • rick

Hi Rick,

Thanks so much for this really helpful response.

I will check with my group about the 11 sec average rest, that does seem like a lot. Thanks for pointing that out. But actually, we don’t want an average rest at all.

In terms of trying one with the uniform_rand dist:

execution parameters

set iteration = 100 # number of iterations to compare
set outdir = stim_results # directory that all results are under
set LCfile = NSD_sums # file to store normal standard dev sums (root mean square of the measurement error variance for each condition for linear contrasts)

set pattern = LC # search pattern for LC[0], say

set pattern = ‘norm. std.’ # search pattern for normalized stdev vals

make_random_timing.py - num_runs 3 -run_runs 760	\
    -pre_stim_rest 20 -post_stim_rest 20	\
        -rand_post_stim_rest no	\
        -add_timing_class stim 5	\
  	    -add_timing_class rest dist=uniform_rand	\
    -add_stim_class pos 15 stim rest	\
    -add_stim_class neg 15 stim rest	\
    -add_stim_class neu 15 stim rest	\
        -tr 1	\         
        -seed 1234567 -prefix uniformstimtimes	\			 
        -show_rest_events	\
        -show_timing_stats	\
        -save_3dd_cmd cmd.3dd.$iter	\
         	    >& out.mrt.$iter

But when running this there, iter it not recognized, and I don’t see anywhere in advanced manual iterations. Where am I setting the iterations? Does this look okay otherwise?

Thanks

The full script script intended for uniform rest with no average, min, or max is here:
#!/bin/tcsh

set iteration = 100 # number of iterations to compare
set outdir = stim_results_uniform # directory that all results are under
set LCfile = NSD_sums # file to store normal standard dev sums (root mean square of the measurement error #variance for each condition for linear contrasts)
set seed = 1234567 # initial random seed
set pattern = ‘norm. std.’ # search pattern for normalized stdev vals

foreach iter (count -digits 4 1 $iterations)
@ seed = $seed + 1

make_random_timing.py - num_runs 3 -run_runs 760	\
    -pre_stim_rest 20 -post_stim_rest 20	\
        -rand_post_stim_rest no	\
        -add_timing_class stim 5	\
  	    -add_timing_class rest dist=uniform_rand	\
    -add_stim_class pos 15 stim rest	\
    -add_stim_class neg 15 stim rest	\
    -add_stim_class neu 15 stim rest	\
        -tr 1	\         
        -seed $seed -prefix uniformstimtimes	\			 
        -show_rest_events	\
        -show_timing_stats	\
        -save_3dd_cmd cmd.3dd.$iter	\
         	    >& out.mrt.$iter

tcsh cmd.3dd.$iter >& out.3dD.$iter

    # save the sum of the 3 Linear Contrast values
    set nums = (`awk -F= '/'"$pattern"'/ {print $2}' out.3dD.${iter}`)

    # make a quick ccalc command
    set sstr = $nums[1]
    foreach num ( $nums[2-] )
        set sstr = "$sstr + $num"
    end
    set num_sum = `ccalc -expr "$sstr"`

    echo -n "$num_sum = $sstr : " >> $LCfile
    echo    "iteration $iter, seed $seed"                  >> $LCfile

    echo -n "\b\b\b\b$iter"

end

echo “”
echo “done, results are in ‘$outdir’, LC sums are in ‘$LCfile’”
echo consider the command: “sort -n $outdir/$LCfile | head -1”

But it is not iterating.

Hi Daisy,

Try embedding the make_random_timing.py command back into
the previous script. This is missing the directory tree and other
aspects.

Some things to ponder:

  • “iterations” is missing the “s” when set at the top

  • the option should read “-run_time 760”

  • a uniform distribution class must have parameters, else
    it will not know what to distribute over, consider:

-add_timing_class rest 5 11 17 dist=uniform_rand \
  • rick

Thanks, Rick. Almost working! There is one error that I have gone over and over am not fixing.

0000nums: Subscript out of range.

It looks like this line is not properly saving:
-save_3dd_cmd cmd.3dd.$iter \

Meaning this line searches and finds nothing, leading to an error and it not iterating:
set nums = ( awk -F= '/'"$pattern"'/ {print $2}' out.3dD.${iter} )

But I do not know why it is not saving! I checked for extra spaces.

here is full script:
#!/bin/tcsh

set iterations = 100 # number of iterations to compare
set outdir = stim_results_uniform # directory that all results are under
set LCfile = NSD_sums # file to store normal standard dev sums (root mean square of the measurement error #variance for each condition for linear contrasts)
set seed = 1234567 # initial random seed
set pattern = ‘norm. std.’ # search pattern for normalized stdev vals

if ( -d $outdir ) then
echo “** removing output directory, $outdir …”
\rm -fr $outdir
endif

echo “++ creating output directory, $outdir …”
mkdir $outdir
if ( $status ) then
echo “failure, cannot create output directory, $outdir”
exit
endif

move into the output directory

cd $outdir

create empty LC file

echo -n “” > $LCfile

echo -n “iteration (of $iterations): 0000”

iterate

foreach iter (count -digits 4 1 $iterations)

    # make some other random seed

    @ seed = $seed + 1

make_random_timing.py -num_runs 3 -run_time 760	\
    -pre_stim_rest 20 -post_stim_rest 20	\
        -rand_post_stim_rest no	\
        -add_timing_class stim 5	\
  	    -add_timing_class rest 5 11 17 dist=uniform_rand	\
    -add_stim_class pos 15 stim rest	\
    -add_stim_class neg 15 stim rest	\
    -add_stim_class neu 15 stim rest	\
        -tr 1	\
        -seed $seed -prefix uniformstimtimes	\
        -show_rest_events	\
        -show_timing_stats	\
    -write_event_list uniformevents	\
        -save_3dd_cmd cmd.3dd.$iter	\
         	    >& out.mrt.$iter

tcsh cmd.3dd.$iter >& out.3dD.$iter

    # save the sum of the 3 Linear Contrast values
    set nums = ( `awk -F= '/'"$pattern"'/ {print $2}' out.3dD.${iter}` )
echo -n "Before\n"
    # make a quick ccalc command
    set sstr = $nums[1]
echo -n "After\n"
    foreach num ( $nums[2-] )
        set sstr = "$sstr + $num"
    end
    set num_sum = `ccalc -expr "$sstr"`

    echo -n "$num_sum = $sstr : " >> $LCfile
    echo    "iteration $iter, seed $seed" >> $LCfile

    echo -n "\b\b\b\b$iter"

end

echo “”
echo “done, results are in ‘$outdir’, LC sums are in ‘$LCfile’”
echo “sort -n $outdir/$LCfile | head -1”

Hi Daisy,

Did you fix this? It is working for me.

  • rick

Hi Rick,

No…I still get:
0000nums: Subscript out of range.

It looks like this line is not properly saving:
-save_3dd_cmd cmd.3dd.$iter \

Meaning this line searches and finds nothing, leading to an error and it not iterating:
set nums = ( awk -F= '/'"$pattern"'/ {print $2}' out.3dD.${iter} )

But I do not know why it is not saving! I checked for extra spaces.

Also, I had someone else recopy, save and run the script and they get the same error…

What does “afni -ver” show?

  • rick

Precompiled binary linux_openmp_64: Apr 27 2017 (Version AFNI_17.1.02)

You will need to update. I applied -save_3dd_cmd for the advanced
case at the end of May. Are you able to update?

  • rick

Thank you that was it!!! Have a great weekend!

With the advanced version, are the commands to get the ISI stats from ID files different?

For basic version, I used:

timing_tool.py -multi_stim_dur 5 5 5 -multi_timing stimes.0001_*.1D -multi_show_isi_stats

Hi Daisy,

The timing_tool.py command should work fine as it is.
Are you seeing an error with it?

  • rick