Commit c355bdf6 authored by Leo Pound Singer's avatar Leo Pound Singer

bayestar_localize_lvalert: add option to skip lvem tag

This is useful for controlling visibility of sky maps under
testing configurations.
Original: 52e2950956d0f6111b9b71c16b7c4258eecf2f1d
parent d5011da1
......@@ -55,6 +55,8 @@ parser = command.ArgumentParser(
parents=[command.waveform_parser, command.prior_parser, command.skymap_parser])
parser.add_argument('-N', '--dry-run', default=False, action='store_true',
help='Dry run; do not update GraceDB entry [default: %(default)s]')
parser.add_argument('--no-tag', default=False, action='store_true',
help='Do not set lvem tag for GraceDB entry [default: %(default)s]')
parser.add_argument('-o', '--output', metavar='FILE.fits[.gz]',
default='bayestar.fits.gz',
help='Name for uploaded file [default: %(default)s]')
......@@ -95,6 +97,10 @@ if opts.chain_dump:
else:
chain_dump = None
tags = ("sky_loc",)
if not opts.no_tag:
tags += ("lvem",)
for graceid in graceids:
# Send log messages to GraceDb too
......@@ -135,7 +141,7 @@ for graceid in graceids:
else:
gracedb.writeLog(
graceid, "BAYESTAR rapid sky localization ready",
filename=fitspath, tagname=("sky_loc", "lvem"))
filename=fitspath, tagname=tags)
log.debug('uploaded FITS file')
except:
# Produce log message for any otherwise uncaught exception
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment