Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 26 May 2020 starting at approximately 10am CDT. It is expected to take around 30 minutes and will involve a short period of downtime, around 5 minutes, towards the end of the maintenance period. Please address any questions, comments, or concerns to uwm-help@cgca.uwm.edu.

Commit 7907ca86 authored by Leo Pound Singer's avatar Leo Pound Singer

Add --instrument option to ligo-skymap-from-samples

See lalsuite!692.
parent 0531f3a5
Pipeline #53279 passed with stages
in 10 minutes and 49 seconds
......@@ -8,6 +8,9 @@ Changelog
- The ``bayestar-localize-lvalert`` and ``ligo-skymap-from-samples`` tools will
now generate multiresolution FITS files by default.
- Add ``--instrument`` option to ``ligo-skymap-from-samples`` to support
storing metadata about which detectors contributed data.
0.1.3 (2019-03-04)
==================
......
......@@ -59,6 +59,8 @@ def parser():
help='generate a multiresolution HEALPix map')
parser.add_argument('-j', '--jobs', action='store_true',
help='Use multiple threads')
parser.add_argument('--instruments', metavar='H1|L1|V1|...', nargs='+',
help='instruments to store in FITS header')
parser.add_argument('--objid', help='event ID to store in FITS header')
return parser
......@@ -139,6 +141,8 @@ def main(args=None):
' '.join([_parser.prog] + sys.argv[1:])]
if args.objid is not None:
hpmap.meta['objid'] = args.objid
if args.instruments:
hpmap.meta['instruments'] = args.instruments
if args.enable_distance_map:
hpmap.meta['distmean'] = np.mean(dist)
hpmap.meta['diststd'] = np.std(dist)
......
......@@ -43,4 +43,8 @@ def samples(seed, tmpdir):
def test_from_samples(samples, tmpdir):
"""Test ligo-skyamp-from-samples."""
run_entry_point('ligo-skymap-from-samples', '--seed', '150914',
samples, '-o', str(tmpdir))
samples, '-o', str(tmpdir),
'--instruments', 'H1', 'L1', 'V1', '--objid', 'S1234')
table = Table.read(str(tmpdir / 'skymap.fits'), format='fits')
assert table.meta['OBJECT'] == 'S1234'
assert table.meta['INSTRUME'] == 'H1,L1,V1'
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