Skip to content

Commit

Permalink
combinations fix
Browse files Browse the repository at this point in the history
  • Loading branch information
teuben committed Feb 1, 2024
1 parent bf322fe commit 864b563
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions bin/mk_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,16 +262,20 @@ def guess_line(restfreq, debug=False):
lmtdata.add_metadata("obsInfo",obsinfo)

if isCombined:
# assemble all obsinfo's for all obsnum's in the combo - this single one is just a hack
if True:
# loop over all obsnum's
for o in obsnums.split(','):
fn = '../%s/lmtmetadata.yaml' % o
print("YAML Reading",fn)
fp = open(fn)
# assemble all obsinfo's for all obsnum's in the combo
for o in obsnums.split(','):
fn = '../%s/lmtmetadata.yaml' % o
print("YAML Reading",fn)
fp = open(fn)
if False:
# native yaml
y = yaml.safe_load(fp)
o = y['obsInfo'][0]
lmtdata.add_metadata("obsInfo",o)
else:
# directly using out dvpipe
y = LMTMetadataBlock(yamlfile=fn,load_data=True)
o = y.metadata['obsInfo'][0]
lmtdata.add_metadata("obsInfo",o)

# ref_id - string identifier. Following Toltec convention:
# * Single obsnum: {obsnum}_{reduction_id}
Expand Down

0 comments on commit 864b563

Please sign in to comment.