Commit 6b4163e9 authored by Carl Schaffer's avatar Carl Schaffer
Browse files

Merge branch 'artifact-names' into 'master'

Artifact names

See merge request !14
parents 184a8ab6 ab9d9ec8
Pipeline #3406 passed with stage
...@@ -80,10 +80,11 @@ print_help () { ...@@ -80,10 +80,11 @@ print_help () {
echo " -h - display this message and exit" echo " -h - display this message and exit"
echo " -r RUNNUMBER - calibrate only a single observation run" echo " -r RUNNUMBER - calibrate only a single observation run"
echo " -t thorough - Run FTS fitting more times" echo " -t thorough - Run FTS fitting more times"
echo " -c calfiles-only - Only generate calfiles withour running the calibration"
} }
CALFILES_ONLY=0
while getopts ":htr:" opt; do while getopts ":htrc:" opt; do
case ${opt} in case ${opt} in
h) h)
print_help print_help
...@@ -99,6 +100,9 @@ while getopts ":htr:" opt; do ...@@ -99,6 +100,9 @@ while getopts ":htr:" opt; do
t) t)
THOROUGH_CAL="-t" THOROUGH_CAL="-t"
;; ;;
c)
CALFILES_ONLY=1
;;
\?) \?)
echo "Invalid option: -$OPTARG" >&2 echo "Invalid option: -$OPTARG" >&2
print_help print_help
...@@ -137,14 +141,14 @@ for f in $@; do ...@@ -137,14 +141,14 @@ for f in $@; do
file_base=`printf "gris_%s" $clean_date` file_base=`printf "gris_%s" $clean_date`
fi fi
calfile=`printf "%s_calib-script.pro" $file_base` # stores idl routines calfile=`printf "%s_calibscript.pro" $file_base` # stores idl routines
logfile=`printf "%s_calib-log.log" $file_base` # stores calibration log logfile=`printf "%s_caliblog.log" $file_base` # stores calibration log
echo "Storing script to $calfile" echo "Storing script to $calfile"
echo "Storing calibration log to $calfile" echo "Storing calibration log to $calfile"
# generate commands from settings and write 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` commands=`python2 $grisred_folder/gen_command.py $THOROUGH_CAL $theday $runnumber`
if [ -z "$commands" ]; then if [ -z "$commands" ]; then
echo "No commands were generated! Check arguments!"; echo "No commands were generated! Check arguments!";
...@@ -157,6 +161,10 @@ for f in $@; do ...@@ -157,6 +161,10 @@ for f in $@; do
# append idl commands # append idl commands
echo "$commands" >> $calfile echo "$commands" >> $calfile
echo exit >> $calfile echo exit >> $calfile
if [ $CALFILES_ONLY -eq 1 ] ; then
exit;
fi;
# inform user of what has been done # inform user of what has been done
p=`readlink -f $calfile` p=`readlink -f $calfile`
......
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