Skip to content

Commit

Permalink
Correction to unit definitions, use CDS standard.
Browse files Browse the repository at this point in the history
  • Loading branch information
timstaley committed Jan 4, 2016
1 parent 7544a5a commit 4b74662
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="voevent-parse",
version="0.9.0",
version="0.9.1",
packages=['voeventparse', 'voeventparse.tests', 'voeventparse.tests.resources'],
package_data={'voeventparse':['tests/resources/*.xml']},
description="Convenience routines for parsing and manipulation of "
Expand Down
16 changes: 10 additions & 6 deletions voeventparse/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
# ############################
# Some useful string defs namespaced via a class container:

class roles(object):
class roles:
observation = 'observation'
prediction = 'prediction'
utility = 'utility'
test = 'test'


class sky_coord_system(object):
class sky_coord_system:
"""
Common coordinate system identifiers. See also :class:`.Position2D`.
Expand Down Expand Up @@ -53,12 +53,16 @@ class observatory_location(object):
geolunar = 'GEOLUN'


class coord_units(object):
"""Handy tags listing the unit names used by voeventparse."""
degrees = 'degrees'
class units:
"""
Unit abbreviations as defined by CDS (incomplete listing)
cf http://vizier.u-strasbg.fr/doc/catstd-3.2.htx
"""
degrees = 'deg'


class cite_types(object):
class cite_types:
"""Possible types of :func:`.Citation`"""
followup = 'followup'
supersedes = 'supersedes'
Expand Down
7 changes: 4 additions & 3 deletions voeventparse/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ class Position2D(namedtuple('Position2D', 'ra dec err units system')):
ra (float): Right ascension.
dec (float): Declination
err (float): Error radius.
units (:class:`.definitions.coord_units`): Coordinate units
units (str): Coordinate units, cf :class:`.definitions.units`
e.g. degrees, radians.
system (:class:`.definitions.sky_coord_system`): Co-ordinate system
e.g. UTC-FK5-GEO
system (str): Co-ordinate system, e.g. UTC-FK5-GEO
cf :class:`.definitions.sky_coord_system`
"""
pass # Just wrapping a namedtuple so we can assign a docstring.

Expand Down

0 comments on commit 4b74662

Please sign in to comment.