#! /bin/bash
#
# Lon Riesberg, Bill Barrett
#
# Date: 6-1-07, April 2016
#
# Notes: 
#   1. debug_level gt 5 will save calibration diagnostics files. 
#      debug_level gt 9 will plot memory usage but the cron is 
#      currently not setup to write to a z-buffer.  
#   2. This script assumes that definitive TLE's have been 
#      acquired and runs the processing in definitive mode.
#      The Observation Catalog is updated and PAN's are sent
#      to the PDC.  Both of these activities are controlled by
#      calling set_production_flag and the user must be aim_sds.

# make sure that user is aimsds
userName=`whoami`
if [ ${userName}  != "aimpro" ]
    then
    echo
    echo "Must be logged in as aimpro"
    echo
    exit 1
fi
source /aim/sds/common/scripts/setup_science_data_system.sh

logFile=/home/aimpro/proc_all_ci_ret_log.txt
echo ${logFile}
# prelim processing
idl -e "run_proc_all_ci_ret" 2>&1 | tee -a ${logFile}
# Ensure universal readability for the backup files
#chmod -R a+r /aim/data/cips/special_1a/flat/ver_04.20/rev_02/*_2016-*

exit 0
# Done
