Commit b9cf0a7f authored by Tanner Prestegard's avatar Tanner Prestegard

Remove skymap_image_filename from VOEvent creation

parent 20d7b003
......@@ -1844,18 +1844,18 @@ class GraceDb(GsiRest):
@event_or_superevent
def createVOEvent(self, object_id, voevent_type, skymap_type=None,
skymap_filename=None, skymap_image_filename=None, internal=True,
open_alert=False, hardware_inj=False, CoincComment=False,
ProbHasNS=None, ProbHasRemnant=None, BNS=None, NSBH=None,
BBH=None, Terrestrial=None, *args, **kwargs):
skymap_filename=None, internal=True, open_alert=False,
hardware_inj=False, CoincComment=False, ProbHasNS=None,
ProbHasRemnant=None, BNS=None, NSBH=None, BBH=None, Terrestrial=None,
*args, **kwargs):
"""Create a new VOEvent
Signature:
createVOEvent(self, object_id, voevent_type, skymap_type=None,
skymap_filename=None, skymap_image_filename=None,
internal=True, open_alert=False, hardware_inj=False,
CoincComment=False, ProbHasNS=None, ProbHasRemnant=None,
BNS=None, NSBH=None, BBH=None, Terrestrial=None)
skymap_filename=None, internal=True, open_alert=False,
hardware_inj=False, CoincComment=False, ProbHasNS=None,
ProbHasRemnant=None, BNS=None, NSBH=None, BBH=None,
Terrestrial=None)
Arguments:
object_id: event graceid or superevent id
......@@ -1866,8 +1866,6 @@ class GraceDb(GsiRest):
skymap_filename: name of skymap file in GraceDB (required for
'initial' and 'update' alerts, optional for
'preliminary' alerts.
skymap_image_filename: name of skymap image file in GraceDB
(same requirements as skymap_filename)
internal: whether the VOEvent should be distributed to LVC members
only (True/False)
hardware_inj: whether the candidate is a hardware injection
......@@ -1909,9 +1907,6 @@ class GraceDb(GsiRest):
if not skymap_filename:
raise ValueError("Skymap file is required for 'initial' "
"VOEvents")
if not skymap_image_filename:
raise ValueError("Skymap image file is required for 'initial' "
"VOEvents")
# Construct request body
body = {
......@@ -1926,8 +1921,6 @@ class GraceDb(GsiRest):
body['skymap_type'] = skymap_type
if skymap_filename is not None:
body['skymap_filename'] = skymap_filename
if skymap_image_filename is not None:
body['skymap_image_filename'] = skymap_image_filename
if ProbHasNS is not None:
body['ProbHasNS'] = ProbHasNS
if ProbHasRemnant is not None:
......
......@@ -587,7 +587,6 @@ class TestSuperevents(TestGraceDb):
pr_voevent = {
'skymap_type': None,
'skymap_filename': None,
'skymap_image_filename': None,
'internal': True,
'hardware_inj': False,
'open_alert': False,
......@@ -622,7 +621,6 @@ class TestSuperevents(TestGraceDb):
up_voevent = {
'skymap_type': 'update',
'skymap_filename': os.path.basename(filename),
'skymap_image_filename': os.path.basename(filename2),
'internal': False,
'hardware_inj': False,
'open_alert': False,
......
......@@ -39,9 +39,6 @@ class TestVOEvents(TestGraceDb):
r = cls._gracedb.writeLog(cls._graceid, "Fake skymap file.",
filename="fake_skymap.txt", filecontents="Fake skymap.",
tagname="sky_loc")
r = cls._gracedb.writeLog(cls._graceid, "Fake skymap image file.",
filename="fake_skymap_image.txt",
filecontents="Fake skymap image.", tagname="sky_loc")
# Helper functions --------------------------------------------------------
def get_citations_dict(self, graceid, voevent_filename):
......@@ -85,7 +82,6 @@ class TestVOEvents(TestGraceDb):
"""Create an update VOEvent"""
r = self._gracedb.createVOEvent(self._graceid, "Update",
skymap_filename="fake_skymap.txt", skymap_type="FAKE",
skymap_image_filename="fake_skymap_image.txt",
ProbHasRemnant=0.2, BBH=0.1, Terrestrial=0.3)
rdict = r.json()
self.assertTrue('voevent_type' in list(rdict.keys()))
......
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