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 
   50         nohup $SCRIPT >& all.log & 
   54 if [[ $OPTION == "plot" || $OPTION == "fit
" ]]; then 
   56     set_variable  ACOUSTICS_ZMUL_TXT    ${TMPDIR:-/tmp}/acoustics-zmul.txt 
   57     set_variable  ACOUSTICS_ZMUL_ROOT   ${TMPDIR:-/tmp}/acoustics-zmul.root 
   59     rm -f $ACOUSTICS_ZMUL_TXT >& /dev/null 
   61     for MUL in $MULS[*]; do 
   63         set_variable  DIR                $WORKDIR/mul=$MUL 
   64         set_variable  FILE               `ls $DIR/stage-(1|A).log` 
   66         tail -1 $FILE | grep "Elapsed time
" >& /dev/null 
   68         if (( $? == 0 )); then 
   70             set_array  RESULT  `grep -v "warning
" $FILE | tail -2 | head -1` 
   72             printf "%4.1e %6.3f\n
" $MUL $RESULT[-1]  >>  $ACOUSTICS_ZMUL_TXT 
   77         -f $ACOUSTICS_ZMUL_TXT                    \ 
   78         -o $ACOUSTICS_ZMUL_ROOT 
   80     XMIN=`sort -k1g $ACOUSTICS_ZMUL_TXT | head -1 | awk '{ print $1 }'` 
   81     XMAX=`sort -k1g $ACOUSTICS_ZMUL_TXT | tail -1 | awk '{ print $1 }'` 
   83     let "XMIN = $XMIN - 1.0e-3
" 
   84     let "XMAX = $XMAX + 1.0e-3
" 
   86     if [[ $OPTION == "fit
" ]]; then 
   88         sort -gr -k2gr $ACOUSTICS_ZMUL_TXT | tail -1 | read X Y 
   91             -f ${ACOUSTICS_ZMUL_ROOT}:\.\*            \ 
   92             -o ${TMPDIR:-/tmp}/fit.root                          \ 
  100         set_array P2 `JPrintFit -f ${TMPDIR:-/tmp}/fit.root:\.\* -@p2` 
  102         printf "Optimal stretching factor %8.2e\n
" $P2[1] 
  104         mv ${TMPDIR:-/tmp}/fit.root $ACOUSTICS_ZMUL_ROOT 
  109         -f $ACOUSTICS_ZMUL_ROOT:\.\*        \ 
then usage $script< option > nPossible plot
 
*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 |