#! /bin/bash
#
# Lon Riesberg, Bill Barrett
#
# Date: 6-1-07, Apr 2016
#
# Notes: 
#   1. Runs CIPS processing in preliminary mode.  In this mode, it's assumed that
#       definitive TLE's haven't been acquired.  PAN's are NOT sent to the PDC, the
#       CIPS Observation Catalog is NOT updated, and file names have 'prelim'
#       appended to them.

# make sure that user is aimpro
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
year=`date +%Y`
date=`date +%j`

logFile=/aim/logs/cips/cips_day_${year}_${date}_prelim.txt
echo ${logFile}
# prelim processing
idl -e 'run_cips_daily_prelim_processing_cron' 2>&1 | tee -a ${logFile}

exit 0
# Done
