#!/usr/bin/perl use POSIX; use File::Copy qw(copy); ###################### expt setup #setup the T2 experiments #run this script in the /opt/../vc/ directory # t2_list is the VCLIST loops in the "cpmg" pulprog # t2_list.txt is the VDLIST delays for processing ############################# $outfile1="t2_list"; $outfile2="t2_list.txt"; $finish= 16; #number of delays $sat_max = 10; #maximum t2 delay in SECONDS $p20 = 10; #180 pulse in us $d20 = 10000; #tau delay us ############################# #NOTHING TO EDIT BELOW HERE ############################# $p20 = $p20/1e6; #180 pulse in us $d20 = $d20/1e6; #tau delay us $delay = 2*$d20+$p20 ; #cpmg block delay ############################# $sat=0; open(OUTPUT, "> $outfile1"); open(OUTPUT2, "> $outfile2"); open(OUTPUT3, "> ../vd/$outfile2"); for($i = 1; $i <= $finish; $i = $i + 1){ $sat = $sat_max*(($i-1)/($finish-1)); ############################# #ASSURE loops are 2*integer ############################# $loops = $sat/$delay; $a = floor($loops)%(2); $b = floor($loops) - $a; ############################# if($b == 0){$b=2}; #be sure 1st delay loops at least twice #printf "%d\t",$b; #printf "%d\t",$i; $time = $b*$delay; #printf "%3.3f\n",$time; printf OUTPUT "%d\n",$b; #printf OUTPUT2 "%d\t",$i; printf OUTPUT2 "%3.3f\n",$time; #printf OUTPUT3 "%d\t",$i; printf OUTPUT3 "%3.3f\n",$time; } close (OUTPUT);close (OUTPUT2); close (OUTPUT3); exit;