diff --git a/Makefile b/Makefile index 93033fa..26c9093 100644 --- a/Makefile +++ b/Makefile @@ -353,6 +353,7 @@ bench: bench1 bench2 bench3 ## bench1: RSR benchmark: obsnum=33551 bench1: + @echo sbatch_lmtoy.sh etc/bench1.run $(TIME) SLpipeline.sh obsnum=33551 restart=1 linecheck=1 public=2020-12-31 qagrade=3 admit=$(ADMIT) meta=$(META) @bash -c 'source lmtoy_functions.sh ; printf_green_file etc/bench1.txt' @echo "=================================================================================================================" @@ -372,6 +373,7 @@ bench1b: ## bench2: SEQ benchmark: obsnum=79448 bench2: + @echo sbatch_lmtoy.sh etc/bench2.run $(TIME) SLpipeline.sh obsnum=79448 restart=1 map_coord_use=1 public=2020-12-31 qagrade=3 maskmoment=$(ADMIT) admit=$(ADMIT) meta=$(META) @bash -c 'source lmtoy_functions.sh ; printf_green_file etc/bench2.txt' @echo "========================================================================================" @@ -383,6 +385,7 @@ bench2a: ## bench3: SEQ dual IF benchmark (about 1.5 min) bench3: + @echo sbatch_lmtoy.sh etc/bench3.run $(TIME) SLpipeline.sh obsnum=110399 restart=1 extent=120 maskmoment=$(ADMIT) public=2020-12-31 qagrade=3 admit=$(ADMIT) meta=$(META) @bash -c 'source lmtoy_functions.sh ; printf_green_file etc/bench3.txt' @echo "========================================================================================" diff --git a/bin/lmtoy_functions.sh b/bin/lmtoy_functions.sh index b0e9c12..2d99363 100755 --- a/bin/lmtoy_functions.sh +++ b/bin/lmtoy_functions.sh @@ -260,9 +260,10 @@ function lmtoy_rsr1 { # as well as process old data. Thus we want all 'bad_lagsC' in dreampyrc to be "" if [[ $first == 1 ]]; then # 1. - echo "LMTOY>> python $LMTOY/RSR_driver/rsr_driver.py rsr.obsnum $o $do -w rsr.wf0.pdf -p -b $blo $t1 $t2" - python $LMTOY/RSR_driver/rsr_driver.py rsr.obsnum $o $do -w rsr.wf0.pdf -p -b $blo $t1 $t2 > rsr_driver0.log 2>&1 + echo "LMTOY>> python $LMTOY/RSR_driver/rsr_driver.py rsr.obsnum $o $do $w -p -b $blo $t1 $t2" + python $LMTOY/RSR_driver/rsr_driver.py rsr.obsnum $o $do $w -p -b $blo $t1 $t2 > rsr_driver0.log 2>&1 mv rsr.driver.png rsr.driver0.png + mv rsr.wf.pdf rsr.wf0.pdf # 2. echo "LMTOY>> rsr_tsys.py -y rsr.tsys0.png $obsnum" rsr_tsys.py -y rsr.tsys0.png $obsnum > rsr_tsys0.log 2>&1 @@ -297,10 +298,9 @@ function lmtoy_rsr1 { badlags=rsr.$obsnum.badlags # this gives 'BADCB1' - # 4. - echo "LMTOY>> python $LMTOY/RSR_driver/rsr_driver.py rsr.obsnum $o $do -w rsr.wf.pdf -p -b $blo $t1 $t2 --badlags $badlags" - python $LMTOY/RSR_driver/rsr_driver.py rsr.obsnum $o $do -w rsr.wf.pdf -p -b $blo $t1 $t2 --badlags $badlags > rsr_driver1.log 2>&1 - + # 4. redo rsr_driver but now with badlags applied + echo "LMTOY>> python $LMTOY/RSR_driver/rsr_driver.py rsr.obsnum $o $do $w -p -b $blo $t1 $t2 --badlags $badlags" + python $LMTOY/RSR_driver/rsr_driver.py rsr.obsnum $o $do $w -p -b $blo $t1 $t2 --badlags $badlags > rsr_driver1.log 2>&1 # Tsys plot: rsr.tsys.png - only done for single obsnum - also lists BADCB's # rsr.spectra.png - another way to view each chassis spectrum diff --git a/bin/lmtoy_functions2.sh b/bin/lmtoy_functions2.sh new file mode 100644 index 0000000..b8e0d98 --- /dev/null +++ b/bin/lmtoy_functions2.sh @@ -0,0 +1,16 @@ +# interactive helpers for those who need it + +lmtoy_version2="12-nov-2024" + +echo "LMTOY>> lmtoy_functions2 $lmtoy_version2 via $0" +echo "LMTOY>> useful aliases loaded:" +echo " cdrun [projectID] -- cd to where an lmtoy_PID is" + + +function cdrun { + if [ -z $1 ]; then + (cd $WORK_LMT/lmtoy_run/; ls -d lmtoy_* | sed s/lmtoy_//g | pr -4 -t) + else + cd $WORK_LMT/lmtoy_run/lmtoy_$1 + fi +} diff --git a/bin/source_obsnum.sh b/bin/source_obsnum.sh index 0d4ff6b..cbc3dab 100755 --- a/bin/source_obsnum.sh +++ b/bin/source_obsnum.sh @@ -3,9 +3,13 @@ # find which source/obsnum combinations are in an LMT project # +_version="10-nov-2024" + usage() { - echo "Usage: $0 [options] ProjectId" + echo "Usage: $0 [options] [ProjectId]" + echo "Version: $_version" echo " Makes a list of obsnums, sorted per source, for a given ProjectId, ready for the script generator" + echo " If no ProjectId given and inside an lmtoy_run directory with the PID file, it will use that PID" echo " Options:" echo " -l report LineCheck instead of Science intent. Useful for RSR only" echo " -p report Pointing instead of Science intent." @@ -27,8 +31,13 @@ mk_trailer() { } if [ -z "$1" ]; then - usage - exit 0 + if [ -e PID ]; then + source PID + pid=$PID + else + usage + exit 0 + fi fi intent="Science" @@ -47,6 +56,17 @@ fi pid=$1 +if [ -z $pid]; then + if [ -e PID ]; then + source PID + pid=$PID + else + usage + exit 0 + fi +fi + + dat=$DATA_LMT/data_lmt.log log=$WORK_LMT/tmp/$pid.obsnums.log g=1