From d6fe4bd044ca0e3f316406ade2db83cf4dba58bb Mon Sep 17 00:00:00 2001 From: Peter Teuben Date: Wed, 6 Nov 2024 11:19:01 -0500 Subject: [PATCH 1/4] change bench1a to use 33551 and 33552 --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1b34b0e..93033fa 100644 --- a/Makefile +++ b/Makefile @@ -358,9 +358,13 @@ bench1: @echo "=================================================================================================================" @echo xdg-open $(WORK_LMT)/2014ARSRCommissioning/33551/README.html -## bench1a: RSR benchmark with identical combination +## bench1a: RSR benchmark with a combination bench1a: - $(TIME) SLpipeline.sh obsnums=33551,33551 restart=1 admit=$(ADMIT) meta=$(META) + $(TIME) SLpipeline.sh obsnum=33552 restart=1 linecheck=1 public=2020-12-31 qagrade=3 admit=$(ADMIT) meta=$(META) + $(TIME) SLpipeline.sh obsnums=33551,33552 restart=1 admit=$(ADMIT) meta=$(META) + @bash -c 'source lmtoy_functions.sh ; printf_green_file etc/bench1a.txt' + @echo "=================================================================================================================" + @echo xdg-open $(WORK_LMT)/2014ARSRCommissioning/33551_33552/README.html ## bench1b: RSR dryrun archive submission using dvpipe (needs bench1) bench1b: From 11e5ed5845e0af8363120f665e544098d37576f0 Mon Sep 17 00:00:00 2001 From: Peter Teuben Date: Wed, 6 Nov 2024 11:33:10 -0500 Subject: [PATCH 2/4] fix processing of obsnums in combinations --- bin/mk_metadata.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/bin/mk_metadata.py b/bin/mk_metadata.py index c67d145..393e9a8 100755 --- a/bin/mk_metadata.py +++ b/bin/mk_metadata.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # -_version = "4-nov-2024" +_version = "6-nov-2024" _doc = """Usage: mk_metadata.py [options] [OBSNUM] @@ -47,7 +47,7 @@ -def header(rc, key, debug=False): +def header(rc, key, multi=False, debug=False): """ input: rc dictionary from the rc file @@ -62,11 +62,14 @@ def header(rc, key, debug=False): if rc[key].find(",") < 0: return rc[key] else: - print( - "# PJT: header %s not single valued: %s, using first" % (key, rc[key]) - ) - # return first - return rc[key].split(",")[0] + if multi: + return rc[key] + else: + print( + "# PJT: header %s not single valued: %s, using first" % (key, rc[key]) + ) + # return first + return rc[key].split(",")[0] else: if debug: print("# PJT: unknown key ", key) @@ -282,7 +285,7 @@ def get_qagrade(rc, debug=False): obsnum = header(rc, "obsnum") if obsnum.find("_") > 0: isCombined = True - obsnums = header(rc, "obsnum_list") + obsnums = header(rc, "obsnum_list", multi=True) else: isCombined = False obsnums = "" @@ -298,6 +301,7 @@ def get_qagrade(rc, debug=False): # opacity225 - opacity at 225 GHz (can be 0) if isCombined: + # print("PJT combined",obsnums) # assemble all obsinfo's for all obsnum's in the combo p = header(rc, "ProjectId") for o in obsnums.split(","): @@ -313,12 +317,12 @@ def get_qagrade(rc, debug=False): if True: # native yaml y = yaml.safe_load(fp) - o = y["obsInfo"][0] + o1 = y["obsInfo"][0] else: # directly using out dvpipe @todo this doesn't work y = MetadataBlock(yamlfile=fn, load_data=True) - o = y.metadata["obsInfo"][0] - lmtdata.add_metadata("obsInfo", o) + o1 = y.metadata["obsInfo"][0] + lmtdata.add_metadata("obsInfo", o1) ref_id = data_prod_id.make_lmtoy_data_prod_id(obsnums.split(",")) else: obsinfo = dict() From 4115497f8d1790a8a01494e4b16be97aa6600603 Mon Sep 17 00:00:00 2001 From: Peter Teuben Date: Thu, 7 Nov 2024 23:36:19 -0500 Subject: [PATCH 3/4] remove obsid ; allow linecheck= to have a freq for non linecheck sources --- bin/rsr_pipeline.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/rsr_pipeline.sh b/bin/rsr_pipeline.sh index bbcffd4..ba0e897 100755 --- a/bin/rsr_pipeline.sh +++ b/bin/rsr_pipeline.sh @@ -10,7 +10,7 @@ # # -_version="rsr_pipeline: 9-aug-2023" +_version="rsr_pipeline: 7-nov-2024" echo "LMTOY>> $_version" @@ -18,7 +18,6 @@ echo "LMTOY>> $_version" # input parameters (only obsnum is required) # - start or restart obsnum=0 # this is a single obsnum pipeline (obsnums=0) -obsid="" # not used yet pdir="" # where to do the work # - PI parameters @@ -30,7 +29,7 @@ badlags="" # set to a badlags file if to use this instead of dynamically gene shortlags="" # set to a short_min and short_hi to avoid flagged strong continuum source lags, e.g. shortlags=32,10.0 spike=3 # spikyness of bad lags that need to be flagged -linecheck=0 # set to 1, to use the source name to grab the correct xlines= +linecheck=0 # set to 1, to use the source name to grab the correct xlines= (or a freq to check for a nearby peak) bandzoom=5 # the band for the zoomed window (0..5) speczoom="" # override bandzoom with a manual speczoom=CENTER,HALF_WIDTH pair rthr=0.01 # -r option for rsr_driver Threshold sigma value when averaging single observations repeats From 54c355e3f79241c3ced6016addfd2d0305a2b106 Mon Sep 17 00:00:00 2001 From: Peter Teuben Date: Thu, 7 Nov 2024 23:37:15 -0500 Subject: [PATCH 4/4] allow linecheck= to have a freq for non-linecheck sources --- bin/lmtoy_functions.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/lmtoy_functions.sh b/bin/lmtoy_functions.sh index 9174644..b0e9c12 100755 --- a/bin/lmtoy_functions.sh +++ b/bin/lmtoy_functions.sh @@ -3,7 +3,7 @@ # some functions to share for lmtoy pipeline operations # beware, in bash shell variables are common variables between this and the caller -lmtoy_version="4-nov-2024" +lmtoy_version="7-nov-2024" echo "LMTOY>> lmtoy_functions $lmtoy_version via $0" @@ -484,10 +484,14 @@ function lmtoy_rsr1 { echo "regress=\"$regress\"" >> $rc if [ $obsgoal = "LineCheck" ]; then - echo "LMTOY>> LineCheck $xlines" + echo "LMTOY>> LineCheck $linecheck $xlines" rm -f spec1.tab spec2.tab # good for I17208, I12112, I10565 - xrange=106:111 + if [ $linecheck == 1 ]; then + xrange=106:111 + else + xrange=$linecheck-2:$linecheck+2 + fi echo "# tabnllsqfit $spec1 fit=gauss1d xrange=$xrange" > linecheck.log tabnllsqfit $spec1 fit=gauss1d xrange=$xrange out=spec1.tab >> linecheck.log 2>&1 echo "# tabnllsqfit $spec2 fit=gauss1d xrange=$xrange" >> linecheck.log