1 #! /bin/csh -f 2 # 3 # for a selected run and time ranges, study the rotation of the 'bar' 4 # It returns a small ascii table with times, Phi-X, Phi-Y and the 5 # Moments of Inertia along X, Y and Z of the rectified object 6 # 7 8 # defaults for script 9 set run=run1 10 set times=5:10:0.5 11 12 # command line parser 13 foreach a ($*) 14 set $a 15 end 16 17 # loop over all times requested 18 foreach t (`nemoinp $times`) 19 snaptrim $run.02 - times=$t debug=-1 |\ 20 snaprect - . weight="-phi*phi*phi" > $run.tmp 21 set ex=(`grep e_x $run.tmp | awk -F: '{print $2}'`) 22 set ey=(`grep e_y $run.tmp | awk -F: '{print $2}'`) 23 if ($#ex != 6) continue 24 25 snaptrim $run.02 - times=$t debug=-1 |\ 26 snapinert - - weight="-phi*phi*phi" tab=t > $run.tmp 27 set si=(`cat $run.tmp`) 28 29 echo $t $ex[6] $ey[6] $si[11] $si[12] $si[13] 30 end 31 32 # clean up the mess 33 rm -f $run.tmp 34