Commit da974a8e authored by Brandon Piotrzkowski's avatar Brandon Piotrzkowski

Fix bug where grabbing combined sky map can return a .png

parent 520e523f
......@@ -2,7 +2,8 @@
## 1.1.7 (unreleased)
- No changes yet
- Fix bug where grabbing a combined sky map can return a .png of
the same filename.
## 1.1.6 (2020-02-26)
......
......@@ -245,7 +245,9 @@ def compose_raven(gracedb_id, authors=(),
logs = client.logs(gracedb_id).json()['log']
for message in reversed(logs):
filename = message['filename']
if '-ext.' in filename:
if '-ext.' in filename and (filename.endswith('fits.gz') or
filename.endswith('fits') or
filename.endswith('.fit')):
cl = 90
include_ellipse, ra, dec, a, b, pa, area, greedy_area = \
uncertainty_ellipse(gracedb_id, filename, client, cl=cl)
......
......@@ -145,14 +145,26 @@
"N": 11
},
{
"comment": "Combined LVC-Fermi sky map using bayestar.fits.gz",
"comment": "Combined LVC-Fermi sky map bayestar.fits.gz",
"file_version": 0,
"tag_names": ["sky_loc", "public"],
"file": "https://gracedb-dev1.ligo.org/api/events/S1234/files/bayestar-ext.fits.gz,0",
"created": "2018-06-28 04:08:44 UTC",
"self": "https://gracedb-dev1.ligo.org/api/events/S1234/log/13",
"self": "https://gracedb-dev1.ligo.org/api/events/S1234/log/12",
"issuer": "leo.singer@LIGO.ORG",
"filename": "bayestar-ext.fits.gz",
"tags": "https://gracedb-dev1.ligo.org/api/events/S1234/log/12/tag/",
"N": 12
},
{
"comment": "Combined LVC-Fermi sky map using bayestar.fits.gz",
"file_version": 0,
"tag_names": ["sky_loc", "public"],
"file": "https://gracedb-dev1.ligo.org/api/events/S1234/files/bayestar-ext.png,0",
"created": "2018-06-28 04:08:44 UTC",
"self": "https://gracedb-dev1.ligo.org/api/events/S1234/log/13",
"issuer": "leo.singer@LIGO.ORG",
"filename": "bayestar-ext.png",
"tags": "https://gracedb-dev1.ligo.org/api/events/S1234/log/13/tag/",
"N": 13
},
......@@ -162,11 +174,11 @@
"tag_names": [],
"file": null,
"created": "2018-06-28 04:08:44 UTC",
"self": "https://gracedb-dev1.ligo.org/api/events/S5678/log/12",
"self": "https://gracedb-dev1.ligo.org/api/events/S5678/log/14",
"issuer": "leo.singer@LIGO.ORG",
"filename": "",
"tags": "https://gracedb-dev1.ligo.org/api/events/S5678/log/12/tag/",
"N": 12
"tags": "https://gracedb-dev1.ligo.org/api/events/S5678/log/14/tag/",
"N": 14
}
],
"links": {
......
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