Hi,
I need some help fixing my script for make_random_timing.py. Based on the help file for make_random_timing.py, the how to #03 example, as well as the the first example in this thread I am trying to come up with a script that includes 100 iterations and outputs the normalized standard deviation for each trial. I have made many efforts but my scripting skills are not good enough to set up the extraction of the LC sums correctly.
Thanks,
Maria
set iterations = 100
set seed = 1234567
set outdir = stim_results
set LCfile = NSD_sums # file to store norm. std. dev. sums in # set pattern = LC # search pattern for LC[0], say
set pattern = 'norm. std.' # search pattern for normalized stdev vals
foreach iter (`count -digits 3 1 $iterations`)
# create empty LC file
echo -n "" > $LCfile
echo -n "iteration: 000"
make_random_timing.py -num_runs 2 -run_time 240 -num_stim 2 -num_reps 15 -show_timing_stats -stim_dur 2 -max_consec 3 -min_rest 2.0 -save_3dd_cmd sample.3dd.command.${iter} -stim_labels first second -t_gran 7.0 -make_3dd_contrasts -verb 4 -seed ${seed} -prefix stim_times.${iter} \
>& out.mrt.$iter
tcsh cmd.3dd.$iter >& out.3dD.$iter
# save the sum of the 2 LC values
set nums = ( `awk -F= '/'"$pattern"'/ {print $2}' out.3dD.${iter}` )
# make a quick ccalc command
set sstr = $nums[1]
foreach num ( $nums[2-1] )
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 "$iter"
end