Skip to content

Instantly share code, notes, and snippets.

@thespacedoctor
Last active May 5, 2021 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thespacedoctor/5786bec2c0aea0ad0ddda86488a11f70 to your computer and use it in GitHub Desktop.
Save thespacedoctor/5786bec2c0aea0ad0ddda86488a11f70 to your computer and use it in GitHub Desktop.
[Parse Ligo-Virgo GCN VOEvents] #voevent #ligo_virgo #gcn

Parsing VOEvents Streamed from the Ligo-Virgo GCN Feed

Here you will find VOEvent packet examples for the 4 types of LV event alerts:

LV Alert Timeline<br>Image Credit: LVEM User Guide

  1. Preliminary GCN Notice. The automated preliminary notice is sent (via GCN) within 1-10 minutes of event detection and the trigger visible in GraceDB. Once a map has been generated a second preliminary notice is sent.

  2. Initial GCN Notices. A source classification (BNS, NSBH, BHBH ..) and updated skymap will be released within 4-24 hrs. The initial notice is also accompanied by a GCN Circular which is the first formal publication of the candidate and can be cited as such.

  3. Update GCN Notice. Sent whenever the sky localisation area, significance accuracy or classification improves.

There is also a Retraction GCN Notice that can be issued at any time if the event is found to be non-astrophysical.

Alert Content

A detailed description of what can be found in the GCN notice and circulars can be found here and a neat summary of the notice content below:

GCN Notice Content<br>Image Credit: LVEM User Guide

Parsing Alerts

To parse the alerts with python run:

python voevent_reader.py
<?xml version="1.0" ?>
<voe:VOEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:voe="http://www.ivoa.net/xml/VOEvent/v2.0"
xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd"
version="2.0" role="test" ivorn="ivo://gwnet/LVC#MS181101ab-1-Preliminary">
<Who>
<Date>2018-11-01T22:34:49</Date>
<Author>
<contactName>LIGO Scientific Collaboration and Virgo Collaboration</contactName>
</Author>
</Who>
<What>
<Param name="internal" dataType="int" value="0">
<Description>Indicates whether this event should be distributed to LSC/Virgo members only</Description>
</Param>
<Param name="Packet_Type" dataType="int" value="150">
<Description>The Notice Type number is assigned/used within GCN, eg type=150 is an LVC_PRELIMINARY notice</Description>
</Param>
<Param name="Pkt_Ser_Num" dataType="string" value="1">
<Description>A number that increments by 1 each time a new revision is issued for this event</Description>
</Param>
<Param name="GraceID" dataType="string" value="MS181101ab" ucd="meta.id">
<Description>Identifier in GraceDB</Description>
</Param>
<Param name="AlertType" dataType="string" value="Preliminary" ucd="meta.version">
<Description>VOEvent alert type</Description>
</Param>
<Param name="HardwareInj" dataType="int" value="0" ucd="meta.number">
<Description>Indicates that this event is a hardware injection if 1, no if 0</Description>
</Param>
<Param name="OpenAlert" dataType="int" value="1" ucd="meta.number">
<Description>Indicates that this event is an open alert if 1, no if 0</Description>
</Param>
<Param name="EventPage" dataType="string" value="https://example.org/superevents/MS181101ab/view/" ucd="meta.ref.url">
<Description>Web page for evolving status of this GW candidate</Description>
</Param>
<Param name="Instruments" dataType="string" value="H1,L1" ucd="meta.code">
<Description>List of instruments used in analysis to identify this event</Description>
</Param>
<Param name="FAR" dataType="float" value="9.11069936486e-14" ucd="arith.rate;stat.falsealarm" unit="Hz">
<Description>False alarm rate for GW candidates with this strength or greater</Description>
</Param>
<Param name="Group" dataType="string" value="CBC" ucd="meta.code">
<Description>Data analysis working group</Description>
</Param>
<Param name="Pipeline" dataType="string" value="gstlal" ucd="meta.code">
<Description>Low-latency data analysis pipeline</Description>
</Param>
<Param name="Search" dataType="string" value="MDC" ucd="meta.code">
<Description>Specific low-latency search</Description>
</Param>
<Group type="GW_SKYMAP" name="bayestar">
<Param name="skymap_fits" dataType="string" value="https://emfollow.docs.ligo.org/userguide/_static/bayestar.fits.gz" ucd="meta.ref.url">
<Description>Sky Map FITS</Description>
</Param>
</Group>
<Group type="Classification">
<Description>Source classification: binary neutron star (BNS), neutron star-black hole (NSBH), binary black hole (BBH), MassGap, or terrestrial (noise)</Description>
<Param name="BNS" dataType="float" value="0.95" ucd="stat.probability">
<Description>Probability that the source is a binary neutron star merger (both objects lighter than 3 solar masses)</Description>
</Param>
<Param name="NSBH" dataType="float" value="0.01" ucd="stat.probability">
<Description>Probability that the source is a neutron star-black hole merger (primary heavier than 5 solar masses, secondary lighter than 3 solar masses)</Description>
</Param>
<Param name="BBH" dataType="float" value="0.03" ucd="stat.probability">
<Description>Probability that the source is a binary black hole merger (both objects heavier than 5 solar masses)</Description>
</Param>
<Param name="MassGap" dataType="float" value="0.0" ucd="stat.probability">
<Description>Probability that the source has at least one object between 3 and 5 solar masses</Description>
</Param>
<Param name="Terrestrial" dataType="float" value="0.01" ucd="stat.probability">
<Description>Probability that the source is terrestrial (i.e., a background noise fluctuation or a glitch)</Description>
</Param>
</Group>
<Group type="Properties">
<Description>Qualitative properties of the source, conditioned on the assumption that the signal is an astrophysical compact binary merger</Description>
<Param name="HasNS" dataType="float" value="0.95" ucd="stat.probability">
<Description>Probability that at least one object in the binary has a mass that is less than 2.83 solar masses</Description>
</Param>
<Param name="HasRemnant" dataType="float" value="0.91" ucd="stat.probability">
<Description>Probability that a nonzero mass was ejected outside the central remnant object</Description>
</Param>
</Group>
</What>
<WhereWhen>
<ObsDataLocation>
<ObservatoryLocation id="LIGO Virgo"/>
<ObservationLocation>
<AstroCoordSystem id="UTC-FK5-GEO"/>
<AstroCoords coord_system_id="UTC-FK5-GEO">
<Time>
<TimeInstant>
<ISOTime>2018-11-01T22:22:46.654437</ISOTime>
</TimeInstant>
</Time>
</AstroCoords>
</ObservationLocation>
</ObsDataLocation>
</WhereWhen>
<How>
<Description>Candidate gravitational wave event identified by low-latency analysis</Description>
<Description>H1: LIGO Hanford 4 km gravitational wave detector</Description>
<Description>L1: LIGO Livingston 4 km gravitational wave detector</Description>
</How>
<Description>Report of a candidate gravitational wave event</Description>
</voe:VOEvent>
<?xml version="1.0" ?>
<voe:VOEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:voe="http://www.ivoa.net/xml/VOEvent/v2.0"
xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd"
version="2.0" role="test" ivorn="ivo://gwnet/LVC#MS181101ab-1-Preliminary">
<Who>
<Date>2018-11-01T22:34:49</Date>
<Author>
<contactName>LIGO Scientific Collaboration and Virgo Collaboration</contactName>
</Author>
</Who>
<What>
<Param name="internal" dataType="int" value="0">
<Description>Indicates whether this event should be distributed to LSC/Virgo members only</Description>
</Param>
<Param name="Packet_Type" dataType="int" value="150">
<Description>The Notice Type number is assigned/used within GCN, eg type=150 is an LVC_PRELIMINARY notice</Description>
</Param>
<Param name="Pkt_Ser_Num" dataType="string" value="1">
<Description>A number that increments by 1 each time a new revision is issued for this event</Description>
</Param>
<Param name="GraceID" dataType="string" value="MS181101ab" ucd="meta.id">
<Description>Identifier in GraceDB</Description>
</Param>
<Param name="AlertType" dataType="string" value="Preliminary" ucd="meta.version">
<Description>VOEvent alert type</Description>
</Param>
<Param name="HardwareInj" dataType="int" value="0" ucd="meta.number">
<Description>Indicates that this event is a hardware injection if 1, no if 0</Description>
</Param>
<Param name="OpenAlert" dataType="int" value="1" ucd="meta.number">
<Description>Indicates that this event is an open alert if 1, no if 0</Description>
</Param>
<Param name="EventPage" dataType="string" value="https://example.org/superevents/MS181101ab/view/" ucd="meta.ref.url">
<Description>Web page for evolving status of this GW candidate</Description>
</Param>
<Param name="Instruments" dataType="string" value="H1,L1" ucd="meta.code">
<Description>List of instruments used in analysis to identify this event</Description>
</Param>
<Param name="FAR" dataType="float" value="9.11069936486e-14" ucd="arith.rate;stat.falsealarm" unit="Hz">
<Description>False alarm rate for GW candidates with this strength or greater</Description>
</Param>
<Param name="Group" dataType="string" value="CBC" ucd="meta.code">
<Description>Data analysis working group</Description>
</Param>
<Param name="Pipeline" dataType="string" value="gstlal" ucd="meta.code">
<Description>Low-latency data analysis pipeline</Description>
</Param>
<Param name="Search" dataType="string" value="MDC" ucd="meta.code">
<Description>Specific low-latency search</Description>
</Param>
<Group type="GW_SKYMAP" name="bayestar">
<Param name="skymap_fits" dataType="string" value="https://emfollow.docs.ligo.org/userguide/_static/bayestar.fits.gz" ucd="meta.ref.url">
<Description>Sky Map FITS</Description>
</Param>
</Group>
<Group type="Classification">
<Description>Source classification: binary neutron star (BNS), neutron star-black hole (NSBH), binary black hole (BBH), MassGap, or terrestrial (noise)</Description>
<Param name="BNS" dataType="float" value="0.95" ucd="stat.probability">
<Description>Probability that the source is a binary neutron star merger (both objects lighter than 3 solar masses)</Description>
</Param>
<Param name="NSBH" dataType="float" value="0.01" ucd="stat.probability">
<Description>Probability that the source is a neutron star-black hole merger (primary heavier than 5 solar masses, secondary lighter than 3 solar masses)</Description>
</Param>
<Param name="BBH" dataType="float" value="0.03" ucd="stat.probability">
<Description>Probability that the source is a binary black hole merger (both objects heavier than 5 solar masses)</Description>
</Param>
<Param name="MassGap" dataType="float" value="0.0" ucd="stat.probability">
<Description>Probability that the source has at least one object between 3 and 5 solar masses</Description>
</Param>
<Param name="Terrestrial" dataType="float" value="0.01" ucd="stat.probability">
<Description>Probability that the source is terrestrial (i.e., a background noise fluctuation or a glitch)</Description>
</Param>
</Group>
<Group type="Properties">
<Description>Qualitative properties of the source, conditioned on the assumption that the signal is an astrophysical compact binary merger</Description>
<Param name="HasNS" dataType="float" value="0.95" ucd="stat.probability">
<Description>Probability that at least one object in the binary has a mass that is less than 2.83 solar masses</Description>
</Param>
<Param name="HasRemnant" dataType="float" value="0.91" ucd="stat.probability">
<Description>Probability that a nonzero mass was ejected outside the central remnant object</Description>
</Param>
</Group>
</What>
<WhereWhen>
<ObsDataLocation>
<ObservatoryLocation id="LIGO Virgo"/>
<ObservationLocation>
<AstroCoordSystem id="UTC-FK5-GEO"/>
<AstroCoords coord_system_id="UTC-FK5-GEO">
<Time>
<TimeInstant>
<ISOTime>2018-11-01T22:22:46.654437</ISOTime>
</TimeInstant>
</Time>
</AstroCoords>
</ObservationLocation>
</ObsDataLocation>
</WhereWhen>
<How>
<Description>Candidate gravitational wave event identified by low-latency analysis</Description>
<Description>H1: LIGO Hanford 4 km gravitational wave detector</Description>
<Description>L1: LIGO Livingston 4 km gravitational wave detector</Description>
</How>
<Description>Report of a candidate gravitational wave event</Description>
</voe:VOEvent>
<?xml version="1.0" ?>
<voe:VOEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:voe="http://www.ivoa.net/xml/VOEvent/v2.0"
xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd"
version="2.0" role="test" ivorn="ivo://gwnet/LVC#MS181101ab-1-Preliminary">
<Who>
<Date>2018-11-01T22:34:49</Date>
<Author>
<contactName>LIGO Scientific Collaboration and Virgo Collaboration</contactName>
</Author>
</Who>
<What>
<Param name="internal" dataType="int" value="0">
<Description>Indicates whether this event should be distributed to LSC/Virgo members only</Description>
</Param>
<Param name="Packet_Type" dataType="int" value="150">
<Description>The Notice Type number is assigned/used within GCN, eg type=150 is an LVC_PRELIMINARY notice</Description>
</Param>
<Param name="Pkt_Ser_Num" dataType="string" value="1">
<Description>A number that increments by 1 each time a new revision is issued for this event</Description>
</Param>
<Param name="GraceID" dataType="string" value="MS181101ab" ucd="meta.id">
<Description>Identifier in GraceDB</Description>
</Param>
<Param name="AlertType" dataType="string" value="Preliminary" ucd="meta.version">
<Description>VOEvent alert type</Description>
</Param>
<Param name="HardwareInj" dataType="int" value="0" ucd="meta.number">
<Description>Indicates that this event is a hardware injection if 1, no if 0</Description>
</Param>
<Param name="OpenAlert" dataType="int" value="1" ucd="meta.number">
<Description>Indicates that this event is an open alert if 1, no if 0</Description>
</Param>
<Param name="EventPage" dataType="string" value="https://example.org/superevents/MS181101ab/view/" ucd="meta.ref.url">
<Description>Web page for evolving status of this GW candidate</Description>
</Param>
<Param name="Instruments" dataType="string" value="H1,L1" ucd="meta.code">
<Description>List of instruments used in analysis to identify this event</Description>
</Param>
<Param name="FAR" dataType="float" value="9.11069936486e-14" ucd="arith.rate;stat.falsealarm" unit="Hz">
<Description>False alarm rate for GW candidates with this strength or greater</Description>
</Param>
<Param name="Group" dataType="string" value="CBC" ucd="meta.code">
<Description>Data analysis working group</Description>
</Param>
<Param name="Pipeline" dataType="string" value="gstlal" ucd="meta.code">
<Description>Low-latency data analysis pipeline</Description>
</Param>
<Param name="Search" dataType="string" value="MDC" ucd="meta.code">
<Description>Specific low-latency search</Description>
</Param>
<Group type="GW_SKYMAP" name="bayestar">
<Param name="skymap_fits" dataType="string" value="https://emfollow.docs.ligo.org/userguide/_static/bayestar.fits.gz" ucd="meta.ref.url">
<Description>Sky Map FITS</Description>
</Param>
</Group>
<Group type="Classification">
<Description>Source classification: binary neutron star (BNS), neutron star-black hole (NSBH), binary black hole (BBH), MassGap, or terrestrial (noise)</Description>
<Param name="BNS" dataType="float" value="0.95" ucd="stat.probability">
<Description>Probability that the source is a binary neutron star merger (both objects lighter than 3 solar masses)</Description>
</Param>
<Param name="NSBH" dataType="float" value="0.01" ucd="stat.probability">
<Description>Probability that the source is a neutron star-black hole merger (primary heavier than 5 solar masses, secondary lighter than 3 solar masses)</Description>
</Param>
<Param name="BBH" dataType="float" value="0.03" ucd="stat.probability">
<Description>Probability that the source is a binary black hole merger (both objects heavier than 5 solar masses)</Description>
</Param>
<Param name="MassGap" dataType="float" value="0.0" ucd="stat.probability">
<Description>Probability that the source has at least one object between 3 and 5 solar masses</Description>
</Param>
<Param name="Terrestrial" dataType="float" value="0.01" ucd="stat.probability">
<Description>Probability that the source is terrestrial (i.e., a background noise fluctuation or a glitch)</Description>
</Param>
</Group>
<Group type="Properties">
<Description>Qualitative properties of the source, conditioned on the assumption that the signal is an astrophysical compact binary merger</Description>
<Param name="HasNS" dataType="float" value="0.95" ucd="stat.probability">
<Description>Probability that at least one object in the binary has a mass that is less than 2.83 solar masses</Description>
</Param>
<Param name="HasRemnant" dataType="float" value="0.91" ucd="stat.probability">
<Description>Probability that a nonzero mass was ejected outside the central remnant object</Description>
</Param>
</Group>
</What>
<WhereWhen>
<ObsDataLocation>
<ObservatoryLocation id="LIGO Virgo"/>
<ObservationLocation>
<AstroCoordSystem id="UTC-FK5-GEO"/>
<AstroCoords coord_system_id="UTC-FK5-GEO">
<Time>
<TimeInstant>
<ISOTime>2018-11-01T22:22:46.654437</ISOTime>
</TimeInstant>
</Time>
</AstroCoords>
</ObservationLocation>
</ObsDataLocation>
</WhereWhen>
<How>
<Description>Candidate gravitational wave event identified by low-latency analysis</Description>
<Description>H1: LIGO Hanford 4 km gravitational wave detector</Description>
<Description>L1: LIGO Livingston 4 km gravitational wave detector</Description>
</How>
<Description>Report of a candidate gravitational wave event</Description>
</voe:VOEvent>
<?xml version="1.0" ?>
<voe:VOEvent xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:voe="http://www.ivoa.net/xml/VOEvent/v2.0"
xsi:schemaLocation="http://www.ivoa.net/xml/VOEvent/v2.0 http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd"
version="2.0" role="test" ivorn="ivo://gwnet/LVC#MS181101ab-1-Preliminary">
<Who>
<Date>2018-11-01T22:34:49</Date>
<Author>
<contactName>LIGO Scientific Collaboration and Virgo Collaboration</contactName>
</Author>
</Who>
<What>
<Param name="internal" dataType="int" value="0">
<Description>Indicates whether this event should be distributed to LSC/Virgo members only</Description>
</Param>
<Param name="Packet_Type" dataType="int" value="150">
<Description>The Notice Type number is assigned/used within GCN, eg type=150 is an LVC_PRELIMINARY notice</Description>
</Param>
<Param name="Pkt_Ser_Num" dataType="string" value="1">
<Description>A number that increments by 1 each time a new revision is issued for this event</Description>
</Param>
<Param name="GraceID" dataType="string" value="MS181101ab" ucd="meta.id">
<Description>Identifier in GraceDB</Description>
</Param>
<Param name="AlertType" dataType="string" value="Preliminary" ucd="meta.version">
<Description>VOEvent alert type</Description>
</Param>
<Param name="HardwareInj" dataType="int" value="0" ucd="meta.number">
<Description>Indicates that this event is a hardware injection if 1, no if 0</Description>
</Param>
<Param name="OpenAlert" dataType="int" value="1" ucd="meta.number">
<Description>Indicates that this event is an open alert if 1, no if 0</Description>
</Param>
<Param name="EventPage" dataType="string" value="https://example.org/superevents/MS181101ab/view/" ucd="meta.ref.url">
<Description>Web page for evolving status of this GW candidate</Description>
</Param>
<Param name="Instruments" dataType="string" value="H1,L1" ucd="meta.code">
<Description>List of instruments used in analysis to identify this event</Description>
</Param>
<Param name="FAR" dataType="float" value="9.11069936486e-14" ucd="arith.rate;stat.falsealarm" unit="Hz">
<Description>False alarm rate for GW candidates with this strength or greater</Description>
</Param>
<Param name="Group" dataType="string" value="CBC" ucd="meta.code">
<Description>Data analysis working group</Description>
</Param>
<Param name="Pipeline" dataType="string" value="gstlal" ucd="meta.code">
<Description>Low-latency data analysis pipeline</Description>
</Param>
<Param name="Search" dataType="string" value="MDC" ucd="meta.code">
<Description>Specific low-latency search</Description>
</Param>
<Group type="GW_SKYMAP" name="bayestar">
<Param name="skymap_fits" dataType="string" value="https://emfollow.docs.ligo.org/userguide/_static/bayestar.fits.gz" ucd="meta.ref.url">
<Description>Sky Map FITS</Description>
</Param>
</Group>
<Group type="Classification">
<Description>Source classification: binary neutron star (BNS), neutron star-black hole (NSBH), binary black hole (BBH), MassGap, or terrestrial (noise)</Description>
<Param name="BNS" dataType="float" value="0.95" ucd="stat.probability">
<Description>Probability that the source is a binary neutron star merger (both objects lighter than 3 solar masses)</Description>
</Param>
<Param name="NSBH" dataType="float" value="0.01" ucd="stat.probability">
<Description>Probability that the source is a neutron star-black hole merger (primary heavier than 5 solar masses, secondary lighter than 3 solar masses)</Description>
</Param>
<Param name="BBH" dataType="float" value="0.03" ucd="stat.probability">
<Description>Probability that the source is a binary black hole merger (both objects heavier than 5 solar masses)</Description>
</Param>
<Param name="MassGap" dataType="float" value="0.0" ucd="stat.probability">
<Description>Probability that the source has at least one object between 3 and 5 solar masses</Description>
</Param>
<Param name="Terrestrial" dataType="float" value="0.01" ucd="stat.probability">
<Description>Probability that the source is terrestrial (i.e., a background noise fluctuation or a glitch)</Description>
</Param>
</Group>
<Group type="Properties">
<Description>Qualitative properties of the source, conditioned on the assumption that the signal is an astrophysical compact binary merger</Description>
<Param name="HasNS" dataType="float" value="0.95" ucd="stat.probability">
<Description>Probability that at least one object in the binary has a mass that is less than 2.83 solar masses</Description>
</Param>
<Param name="HasRemnant" dataType="float" value="0.91" ucd="stat.probability">
<Description>Probability that a nonzero mass was ejected outside the central remnant object</Description>
</Param>
</Group>
</What>
<WhereWhen>
<ObsDataLocation>
<ObservatoryLocation id="LIGO Virgo"/>
<ObservationLocation>
<AstroCoordSystem id="UTC-FK5-GEO"/>
<AstroCoords coord_system_id="UTC-FK5-GEO">
<Time>
<TimeInstant>
<ISOTime>2018-11-01T22:22:46.654437</ISOTime>
</TimeInstant>
</Time>
</AstroCoords>
</ObservationLocation>
</ObsDataLocation>
</WhereWhen>
<How>
<Description>Candidate gravitational wave event identified by low-latency analysis</Description>
<Description>H1: LIGO Hanford 4 km gravitational wave detector</Description>
<Description>L1: LIGO Livingston 4 km gravitational wave detector</Description>
</How>
<Description>Report of a candidate gravitational wave event</Description>
</voe:VOEvent>
#!/usr/local/bin/python
# encoding: utf-8
"""
*Parse a VOEvent Packet and Print the Results in a Readable Format*
:Author:
David Young
:Date Created:
March 22, 2019
Usage:
voevent_reader
voevent_reader --option <argument> [<optional_argument>]
Options:
-h, --help show this help message
-v, --version show version
-s, --settings the settings file
"""
################# GLOBAL IMPORTS ####################
import sys
import os
from fundamentals import tools
def main(arguments=None):
"""
*The main function used when ``voevent_reader.py`` is run as a single script from the cl*
"""
# SETUP THE COMMAND-LINE UTIL SETTINGS
su = tools(
arguments=arguments,
docString=__doc__,
logLevel="DEBUG",
options_first=False,
projectName=False
)
arguments, settings, log, dbConn = su.setup()
# UNPACK REMAINING CL ARGUMENTS USING `EXEC` TO SETUP THE VARIABLE NAMES
# AUTOMATICALLY
for arg, val in arguments.iteritems():
if arg[0] == "-":
varname = arg.replace("-", "") + "Flag"
else:
varname = arg.replace("<", "").replace(">", "")
if isinstance(val, str) or isinstance(val, unicode):
exec(varname + " = '%s'" % (val,))
else:
exec(varname + " = %s" % (val,))
if arg == "--dbConn":
dbConn = val
log.debug('%s = %s' % (varname, val,))
import voeventparse as vp
with open("Preliminary-VOEvent.xml", 'rb') as alert:
alert = vp.load(alert)
print vp.prettystr(alert)
return
if __name__ == '__main__':
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment