Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/astroumd/lmtoy
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Nov 19, 2024
2 parents ab66b8c + f2b7efa commit 607d13d
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 "================================================================================================================="
Expand All @@ -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 "========================================================================================"
Expand All @@ -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 "========================================================================================"
Expand Down
12 changes: 6 additions & 6 deletions bin/lmtoy_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions bin/lmtoy_functions2.sh
Original file line number Diff line number Diff line change
@@ -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
}
26 changes: 23 additions & 3 deletions bin/source_obsnum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand All @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit 607d13d

Please sign in to comment.