#! /bin/bash #+ # NAME: # smeidb_newcal # PURPOSE: # Maintains SMEI data base of calibration patterns # CATEGORY: # /gen/exe/linux # CALLING SEQUENCE: # smeidb_newcal # CALLS: # smeidb_cal # PROCEDURE: # The ascii input file for a new weekly calibration should # be put in $SMEIDB/cal/new. Then this script is run. # All ascii files in $SMEIDB/cal/new are fed to smeidb_cal # to produce a new calibration pattern in $SMEIDB/cal. # If the exit code of smeidb_cal is 3 (indicating success) # the corresponding ascii file is moved to $SMEIDB/cal/txt # MODIFICATION HISTORY: # SEP-2007, Paul Hick (UCSD/CASS; pphick@ucsd.edu) #- cal_dir=$SMEIDB/cal txt_dir=$cal_dir/txt new_dir=$cal_dir/new ls $new_dir | while read line; do cal=$new_dir/$line echo "New calibration: $cal" $PYTHONPATH/splat.py $cal $SMEI_EXE/smeidb_cal $cal -destination=$cal_dir if [ $? == 3 ]; then mv -v $cal $txt_dir fi done exit 0