#! /bin/bash
#
# Bill Barrett
#
# January 2021
#
# Notes: 

# 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

# Set up the AIM CIPS oracle test environment
export IDL_PATH=\<IDL_DEFAULT\>:+/aim/sds/cips:\
+/aim/sds/common:\
+/aim/sds/test:\
+/data_systems/tools/idl_libraries/datetime:+/data_systems/tools/idl_libraries/misc:\
+/data_systems/tools/IdlDbInterface/idl:+/data_systems/tools/idl_libraries/math

echo $IDL_PATH
echo "aimsds: $aimsds"

# Try to update the orbit list,
# writing the relevant information to the logfile
cd /aim/sds
pwd

idl -e 'level_1a_image_slew_test' 2>&1 | \
  grep -v "Compiled module" | \
  grep -v "Installation number" | \
  grep -v "Licensed for use"  | tee -a /aim/sds/slew_test.txt

exit 0

