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 Oct 31, 2023
2 parents 4399e0e + cfcc2eb commit eeaf192
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
7 changes: 4 additions & 3 deletions bin/SLpipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# @todo optional PI parameters
# option to have a data+time ID in the name, by default it will be blank?

_version="SLpipeline: 25-oct-2023"
_version="SLpipeline: 31-oct-2023"

echo ""
echo "LMTOY>> VERSION $(cat $LMTOY/VERSION)"
Expand Down Expand Up @@ -325,12 +325,13 @@ echo "date=\"$(lmtoy_date)\" # end " >> $pdir/lmtoy_$obsnum.rc

# make a metadata yaml file for later ingestion into DataVerse
if [ $meta -gt 0 ]; then
echo "LMTOY>> make metadata ($meta) for DataVerse"
mk_metadata.py -y $pdir/lmtmetadata.yaml $pdir
echo "LMTOY>> make metadata ($meta) for DataVerse in $pdir"
if [ $meta -gt 1 ]; then
# @todo will this work reliably on NFS mounted media?
db=$WORK_LMT/example_lmt.db
flock --verbose $db.flock mk_metadata.py -y $pdir/lmtmetadata.yaml -f $db $pdir
else
mk_metadata.py -y $pdir/lmtmetadata.yaml $pdir
fi
fi
# produce TAP, RSRP, RAW tar files, whichever are requested.
Expand Down
5 changes: 3 additions & 2 deletions bin/lmtoy_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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="14-aug-2023"
lmtoy_version="17-aug-2023"

echo "LMTOY>> lmtoy_functions $lmtoy_version via $0"

Expand Down Expand Up @@ -875,7 +875,8 @@ function lmtoy_seq1 {
fi
if [ $maskmoment == 1 ]; then
echo "LMTOY>> Running maskmoment vlsr=$vlsr"
# @todo this can fail (e.g. for bench2 79448) due to too much emission?
echo "LMTOY>> Running maskmoment $s_on.nf.fits vlsr=$vlsr"
mm1.py --vlsr $vlsr --beam 25 $s_on.nf.fits > maskmoment__${bank}.nf.log 2>&1
# hack
mm1.py --vlsr $vlsr --beam 35 $s_on.nfs.fits > maskmoment__${bank}.nfs.log 2>&1
Expand Down
10 changes: 6 additions & 4 deletions bin/mk_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import dvpipe.utils as utils
from dvpipe.pipelines.metadatagroup import LmtMetadataGroup, example

_version = "17-oct-2023"
_version = "31-oct-2023"

def header(rc, key, debug=False):
"""
Expand Down Expand Up @@ -140,7 +140,7 @@ def get_version():

# open the LMG and write some common metadata
# -- see also example() in lmtmetadatagroup.py
lmtdata = LmtMetadataGroup('SLpipeline',dbfile=dbfile, yamlfile=yamlfile)
lmtdata = LmtMetadataGroup('SLpipeline', dbfile=dbfile, yamlfile=yamlfile)
lmtdata.add_metadata("observatory", "LMT")
lmtdata.add_metadata("LMTInstrument",instrument)
lmtdata.add_metadata("projectID", header(rc,"ProjectId",debug))
Expand Down Expand Up @@ -270,6 +270,8 @@ def get_version():
print("instrument=%s not implemented yet" % instrument)

# validate=True is now default
lmtdata.write_to_db()
lmtdata.write_to_yaml()
if yamlfile != None:
lmtdata.write_to_yaml()
if dbfile != None:
lmtdata.write_to_db()

0 comments on commit eeaf192

Please sign in to comment.