"""This module simply serves to store the XML schema, a 'skeleton' VOEvent
xml document for creation of new instances, and various other minor definitions.
These values may be used in place of literal strings, to allow autocompletion
and document the fact that they are 'standardized' values.
"""
from __future__ import unicode_literals
from six import b
# ############################
# Some useful string defs namespaced via a class container:
class roles:
observation = 'observation'
prediction = 'prediction'
utility = 'utility'
test = 'test'
class sky_coord_system:
"""
Common coordinate system identifiers. See also :class:`.Position2D`.
This is not a simple combinatorial mix of all components, it's a
reproduction of the enumeration in the XML schema. Note some entries in the
schema enumeration are repeated, which leads me to think it may be flawed,
but that's an investigation for another day.
"""
gps_fk5_topo = 'GPS-FK5-TOPO'
gps_icrs_geo = 'GPS-ICRS-GEO'
gps_icrs_topo = 'GPS-ICRS-TOPO'
tdb_fk5_bary = 'TDB-FK5-BARY'
tdb_icrs_bary = 'TDB-ICRS-BARY'
tt_fk5_geo = 'TT-FK5-GEO'
tt_fk5_topo = 'TT-FK5-TOPO'
tt_icrs_geo = 'TT-ICRS-GEO'
tt_icrs_topo = 'TT-ICRS-TOPO'
utc_fk5_geo = 'UTC-FK5-GEO'
utc_fk5_topo = 'UTC-FK5-TOPO'
utc_icrs_geo = 'UTC-ICRS-GEO'
utc_icrs_topo = 'UTC-ICRS-TOPO'
class observatory_location(object):
"""Common generic values for the WhereWhen.ObservatoryLocation attribute."""
geosurface = 'GEOSURFACE'
geolunar = 'GEOLUN'
class units:
"""
Unit abbreviations as defined by CDS (incomplete listing)
cf http://vizier.u-strasbg.fr/doc/catstd-3.2.htx
"""
degree = 'deg'
degrees = degree #Alias for backwards compatibility. Singular otherwise.
arcsecond = 'arcsec'
milliarcsecond = 'mas'
day = 'd'
hour = 'h'
minute = 'min'
year = 'yr'
count = 'ct'
hertz = 'Hz'
jansky = 'Jy'
magnitude = 'mag'
class cite_types:
"""Possible types of :func:`.Citation`"""
followup = 'followup'
supersedes = 'supersedes'
retraction = 'retraction'
####################################
#: Skeleton XML for instantiating a new VOEvent tree
v2_0_skeleton_str = b"""
"""
####################################
#: VOEvent 2.0 schema for validation
#Schema downloaded from:
#http://www.ivoa.net/xml/VOEvent/VOEvent-v2.0.xsd
v2_0_schema_str = b"""
VOEvent is the root element for describing observations of immediate
astronomical events. For more information, see
http://www.ivoa.net/twiki/bin/view/IVOA/IvoaVOEvent. The event consists of at most one of
each of: Who, What, WhereWhen, How, Why, Citations, Description, and
Reference.
Who: Curation Metadata
Author information follows the IVOA curation information schema: the
organization responsible for the packet can have a title, short name or acronym, and a
logo. A contact person has a name, email, and phone number. Other contributors can also
be noted.
What: Event Characterization. This is the part of the data model that is
chosen by the Authoer of the event rather than the IVOA. There can be Params, that may be in
Groups, and Tables, and simpleTimeSeries. There can also be Description and Reference as
with most VOEvent elements.
What/Param definition. A Param has name, value, ucd, unit, dataType; and
may have Description and Reference.
What/Group definition: A group is a collection of Params, with name and
type attributes.
What/Table definition. This small Table has Fields for the column
definitions, and Data to hold the table data, with TR for row and TD for value of a table
cell.
WhereWhen: Space-Time Coordinates. Lots and lots of elements here, but the
import is that each event has these: observatory, sky_coord_system, time, timeError, longitude,
latitude, posError.
Part of WhereWhen
Part of WhereWhen
Part of WhereWhen
Part of WhereWhen
Part of WhereWhen
Part of WhereWhen
Part of WhereWhen
Part of WhereWhen
Part of WhereWhen
Part of WhereWhen
Part of WhereWhen
How: Instrument Configuration. Built with some Description and Reference
elements.
Why: Initial Scientific Assessment. Can make simple Concept/Name/Desc/Ref
for the inference or use multiple Inference containers for more semantic sophistication.
Why/Inference: A container for a more nuanced expression, including
relationships and probability.
Citations: Follow-up Observations. This section is a sequence of EventIVORN
elements, each of which has the IVORN of a cited event.
Citations/EventIVORN. The value is the IVORN of the cited event, the 'cite'
attribute is the nature of that relationship, choosing from 'followup', 'supersedes', or
'retraction'.
Reference: External Content. The payload is the uri, and the 'type'
describes the nature of the data under that uri. The Reference can also be named.
"""