Commit 47b7fbad authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB

Remove unused submitToSkyalert functions

parent 26efc93a
......@@ -553,40 +553,3 @@ def buildVOEvent(event, serial_number, voevent_type, request=None, skymap_filena
#schemaURL = "http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd")
return xml, ivorn
def submitToSkyalert(event, validate_only=False):
## Python stub code for validating and authoring VOEvents to Skyalert
import urllib
dict = {}
# the server that will handle the submit request
url = "http://skyalert.org/submit/"
url = "https://betelgeuse.ligo.caltech.edu:8000/submit/"
url = "http://betelgeuse.ligo.caltech.edu/submit/"
# choose 'dryrun' for validation and 'author' for authoring
dict['checker'] = 'dryrun'
# for command line, we want plain text output, not HTML
dict['plainResponse'] = 'on'
if not validate_only:
# uncomment these for authoring
dict['checker'] = 'author'
# Skyalert username and password
dict['username'] = 'system'
dict['password'] = 'OPV537'
# This is the short name for the stream, must match credentials and event!
dict['streamName'] = 'LIGO'
# Should alerts be run once the event is ingested?
dict['doRules'] = 'on'
dict['xmlText'] = buildVOEvent(event)
params = urllib.urlencode(dict)
f = urllib.urlopen(url, params)
result = f.read()
return result
......@@ -508,42 +508,3 @@ def construct_voevent_file(superevent, voevent, request=None,
xml = stringVOEvent(v)
#schemaURL = "http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd")
return xml, ivorn
def submitToSkyalert(superevent, validate_only=False):
## Python stub code for validating and authoring VOEvents to Skyalert
import urllib
dict = {}
# the server that will handle the submit request
#url = "http://skyalert.org/submit/"
#url = "https://betelgeuse.ligo.caltech.edu:8000/submit/"
url = "http://betelgeuse.ligo.caltech.edu/submit/"
# choose 'dryrun' for validation and 'author' for authoring
dict['checker'] = 'dryrun'
# for command line, we want plain text output, not HTML
dict['plainResponse'] = 'on'
if not validate_only:
# uncomment these for authoring
dict['checker'] = 'author'
# Skyalert username and password
dict['username'] = 'system'
dict['password'] = 'OPV537'
# This is the short name for the stream, must match credentials and event!
dict['streamName'] = 'LIGO'
# Should alerts be run once the event is ingested?
dict['doRules'] = 'on'
dict['xmlText'] = buildVOEvent(superevent)
params = urllib.urlencode(dict)
f = urllib.urlopen(url, params)
result = f.read()
return result
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