Go to the source code of this file.
Definition at line 20 of file acoustics-Zmul.sh.
   24 if (( $# < 1 || $# > 2)); then 
   30 set_variable  SCRIPT              $argv[1] 
   31 set_variable  OPTION              $argv[-1] 
   33 if [[ $OPTION != "run
" && $OPTION != "plot
" && $OPTION != "fit
" ]]; then 
   37 if [[ $OPTION == "run
" ]]; then 
   39     for MUL in $MULS[*]; do 
   41         set_variable  DIR                $WORKDIR/mul=$MUL 
   46         # set varibales in script 
   48         set_variable  ACOUSTICS_MUL      $MUL 
   49         set_variable  ACOUSTICS_STAGES   A 
   51         nohup $SCRIPT >& all.log & 
   55 if [[ $OPTION == "plot
" || $OPTION == "fit
" ]]; then 
   57     set_variable  ACOUSTICS_ZMUL_TXT    /tmp/acoustics-zmul.txt 
   58     set_variable  ACOUSTICS_ZMUL_ROOT   /tmp/acoustics-zmul.root 
   60     rm -f $ACOUSTICS_ZMUL_TXT >& /dev/null 
   62     for MUL in $MULS[*]; do 
   64         set_variable  DIR                $WORKDIR/mul=$MUL 
   65         set_variable  FILE               `ls $DIR/stage-(1|A).log` 
   67         tail -1 $FILE | grep "Elapsed time
" >& /dev/null 
   69         if (( $? == 0 )); then 
   71             set_array  RESULT  `grep -v "warning" $FILE | tail -2 | head -1` 
   73             printf "%4.1e %6.3f\n
" $MUL $RESULT[-1]  >>  $ACOUSTICS_ZMUL_TXT 
   78         -f $ACOUSTICS_ZMUL_TXT                    \ 
   79         -o $ACOUSTICS_ZMUL_ROOT 
   81     XMIN=`sort -k1g $ACOUSTICS_ZMUL_TXT | head -1 | awk '{ print $1 }'` 
   82     XMAX=`sort -k1g $ACOUSTICS_ZMUL_TXT | tail -1 | awk '{ print $1 }'` 
   84     let XMIN="$XMIN - 1.0e-3
" 
   85     let XMAX="$XMAX + 1.0e-3
" 
   87     if [[ $OPTION == "fit
" ]]; then 
   89         sort -gr -k2gr $ACOUSTICS_ZMUL_TXT | tail -1 | read X Y 
   92             -f ${ACOUSTICS_ZMUL_ROOT}:\.\*            \ 
  101         set_array P2 `JPrintFit -f /tmp/fit.root:\.\* -@p2` 
  103         printf "Optimal stretching factor %8.2e\n
" $P2[1] 
  105         mv /tmp/fit.root $ACOUSTICS_ZMUL_ROOT 
  110         -f $ACOUSTICS_ZMUL_ROOT:\.\*        \ 
then eval awk Processing stage Elapsed
 
*fatal Wrong number of arguments
 
*fatal Wrong option $OPTION
 
 
 
 
Initial value:=${0##*/}
 
if [ -z $JPP_DIR ]
 
Definition at line 2 of file acoustics-Zmul.sh.
 
 
      
        
          | then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR& dev null set_variable |