1# -*- coding: utf-8 -*- 2# Licensed under a 3-clause BSD style license - see LICENSE.rst 3 4from astropy.utils.decorators import format_doc 5from astropy.coordinates import representation as r 6from astropy.coordinates.baseframe import BaseCoordinateFrame, RepresentationMapping, base_doc 7 8__all__ = ['BaseRADecFrame'] 9 10 11doc_components = """ 12 ra : `~astropy.coordinates.Angle`, optional, keyword-only 13 The RA for this object (``dec`` must also be given and ``representation`` 14 must be None). 15 dec : `~astropy.coordinates.Angle`, optional, keyword-only 16 The Declination for this object (``ra`` must also be given and 17 ``representation`` must be None). 18 distance : `~astropy.units.Quantity` ['length'], optional, keyword-only 19 The Distance for this object along the line-of-sight. 20 (``representation`` must be None). 21 22 pm_ra_cosdec : `~astropy.units.Quantity` ['angular speed'], optional, keyword-only 23 The proper motion in Right Ascension (including the ``cos(dec)`` factor) 24 for this object (``pm_dec`` must also be given). 25 pm_dec : `~astropy.units.Quantity` ['angular speed'], optional, keyword-only 26 The proper motion in Declination for this object (``pm_ra_cosdec`` must 27 also be given). 28 radial_velocity : `~astropy.units.Quantity` ['speed'], optional, keyword-only 29 The radial velocity of this object. 30""" 31 32 33@format_doc(base_doc, components=doc_components, footer="") 34class BaseRADecFrame(BaseCoordinateFrame): 35 """ 36 A base class that defines default representation info for frames that 37 represent longitude and latitude as Right Ascension and Declination 38 following typical "equatorial" conventions. 39 """ 40 frame_specific_representation_info = { 41 r.SphericalRepresentation: [ 42 RepresentationMapping('lon', 'ra'), 43 RepresentationMapping('lat', 'dec') 44 ] 45 } 46 47 default_representation = r.SphericalRepresentation 48 default_differential = r.SphericalCosLatDifferential 49