Commit ab9d9ec8 authored by Carl Schaffer's avatar Carl Schaffer
Browse files

adding calfiles only option

parent 184a8ab6
......@@ -80,10 +80,11 @@ print_help () {
echo " -h - display this message and exit"
echo " -r RUNNUMBER - calibrate only a single observation run"
echo " -t thorough - Run FTS fitting more times"
echo " -c calfiles-only - Only generate calfiles withour running the calibration"
}
while getopts ":htr:" opt; do
CALFILES_ONLY=0
while getopts ":htrc:" opt; do
case ${opt} in
h)
print_help
......@@ -99,6 +100,9 @@ while getopts ":htr:" opt; do
t)
THOROUGH_CAL="-t"
;;
c)
CALFILES_ONLY=1
;;
\?)
echo "Invalid option: -$OPTARG" >&2
print_help
......@@ -137,14 +141,14 @@ for f in $@; do
file_base=`printf "gris_%s" $clean_date`
fi
calfile=`printf "%s_calib-script.pro" $file_base` # stores idl routines
logfile=`printf "%s_calib-log.log" $file_base` # stores calibration log
calfile=`printf "%s_calibscript.pro" $file_base` # stores idl routines
logfile=`printf "%s_caliblog.log" $file_base` # stores calibration log
echo "Storing script to $calfile"
echo "Storing calibration log to $calfile"
# generate commands from settings and write to calfile
echo python $grisred_folder/gen_command.py $THOROUGH_CAL $theday $runnumber
# echo python $grisred_folder/gen_command.py $THOROUGH_CAL $theday $runnumber
commands=`python2 $grisred_folder/gen_command.py $THOROUGH_CAL $theday $runnumber`
if [ -z "$commands" ]; then
echo "No commands were generated! Check arguments!";
......@@ -158,6 +162,10 @@ for f in $@; do
echo "$commands" >> $calfile
echo exit >> $calfile
if [ $CALFILES_ONLY -eq 1 ] ; then
exit;
fi;
# inform user of what has been done
p=`readlink -f $calfile`
echo Wrote calibration commands to $p
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment