#!/bin/csh # # Script file which does ALL of the work!! # # quick_run 0 ==> reads two_exp_fit_ranges.dat and makes the # fitting scripts # # quick_run 1 ==> performs all of the fits using the scripts # made by quick_run 0 # # quick_run 2 ==> makes the web pages # # quick_run 3 ==> makes all of the plots with respect to R # # ########################################### set runs = ( 5 6 ) set orientations = ( 0 1 ) set webpagerun = 1 set webpagename = B56_AR2 set runname = A set nspacedim = 2 set weborientation = 0 set Nboot = 1024 set Nbootgap = 512 set program1 = /home1/STATIC_POTENTIAL_RESULTS/src/make_su2_scripts set program2 = /home1/STATIC_POTENTIAL_RESULTS/src/make_su2_gap_scripts set program3 = /home1/STATIC_POTENTIAL_RESULTS/src/make_web_pages set program4 = /home1/STATIC_POTENTIAL_RESULTS/src/plot_su2_Rcurves set sg = 1 set su = 2 set ag = 3 set au = 4 if ( $#argv == 0 ) then set flag = -2 else set flag = $1 endif set locs = ( Sg Sg Sg Sg Su Ag Ag Ag Au Au Au ) set channels = ( $sg $sg $sg $sg $su $ag $ag $ag $au $au $au ) set levels = ( 1 2 3 4 1 1 2 3 1 2 3 ) # *************************************************************************************** if ( $flag == -1 ) then rm -f Sg/* rm -f Su/* rm -f Ag/* rm -f Au/* rm -f plots/* rm -f Rlinks/* rm -f *.html rm -f *results.dat # *************************************************************************************** else if ( $flag == 0 ) then foreach count ( 1 2 3 4 5 6 7 8 9 10 11 ) if !( -d $locs[$count] ) then mkdir $locs[$count] endif cd $locs[$count] foreach run ( 1 2 ) $program1 << END $Nboot $runs[$run] $channels[$count] $levels[$count] END end cd .. end foreach count ( 2 3 4 5 6 7 8 9 10 11 ) if !( -d $locs[$count] ) then mkdir $locs[$count] endif cd $locs[$count] foreach run ( 1 2 ) $program2 << END $Nbootgap $runs[$run] $channels[$count] $levels[$count] END end cd .. end # *************************************************************************************** else if ( $flag == 1 ) then foreach run ( 1 2 ) if ( $orientations[$run] == 0 ) then set ending = .csh else if ( $orientations[$run] == 1 ) then set ending = _PD.csh else if ( $orientations[$run] == 2 ) then set ending = _CD.csh else echo "Bad orientation" exit endif foreach count ( 1 2 3 4 5 6 7 8 9 10 11 ) cd $locs[$count] set runfile = fit_${locs[$count]} @ pcount = ${levels[$count]} - 1 while ( $pcount > 0 ) set runfile = ${runfile}p @ pcount-- end set runfile = ${runfile}${ending} $runfile cd .. end foreach count ( 2 3 4 5 6 7 8 9 10 11 ) cd $locs[$count] set runfile = fit_${locs[$count]} @ pcount = ${levels[$count]} - 1 while ( $pcount > 0 ) set runfile = ${runfile}p @ pcount-- end set runfile = ${runfile}_gap${ending} $runfile cd .. end end # ************************************************************************************** else if ( $flag == 2 ) then if !( -d Rlinks ) then mkdir Rlinks endif $program3 << END $cwd $webpagename $runname $nspacedim $weborientation END # *************************************************************************************** else if ( $flag == 3 ) then if !( -d plots ) then mkdir plots endif $program4 << END $webpagerun END # ************************************************************************************** else echo " flag is not 0, 1, 2, or 3 --- nothing to do" endif exit