CooSys#
- class astropy.io.votable.tree.CooSys(ID=None, equinox=None, epoch=None, system=None, id=None, config=None, pos=None, refposition=None, **extra)[source]#
Bases:
SimpleElement
COOSYS element: defines a coordinate system.
The keyword arguments correspond to setting members of the same name, documented below.
Attributes Summary
[required] The XML ID of the COOSYS element, used for cross-referencing.
Specifies the epoch of the positions.
A parameter required to fix the equatorial or ecliptic systems (as e.g. "J2000" as the default "eq_FK5" or "B1950" as the default "eq_FK4").
The list of reference frames recognized in the IVOA vocabulary.
Specifies the type of coordinate system.
Methods Summary
Convert the coosys element into an astropy built-in frame.
Attributes Documentation
- ID#
[required] The XML ID of the COOSYS element, used for cross-referencing. May be
None
or a string conforming to XML ID syntax.
- epoch#
Specifies the epoch of the positions. It must be a string specifying an astronomical year.
- equinox#
A parameter required to fix the equatorial or ecliptic systems (as e.g. “J2000” as the default “eq_FK5” or “B1950” as the default “eq_FK4”).
- reference_frames#
The list of reference frames recognized in the IVOA vocabulary.
This is described at http://www.ivoa.net/rdf/refframe
- Returns:
set
[python:str
]The labels of the IVOA reference frames.
- system#
Specifies the type of coordinate system.
Valid choices are given by
reference_frames
Methods Documentation
- to_astropy_frame()[source]#
Convert the coosys element into an astropy built-in frame.
This only reads the system and equinox attributes.
- Returns:
BaseCoordinateFrame
An astropy built-in frame corresponding to the frame described by the COOSYS element.
Notes
If the correspondence is not straightforward, this method raises an error. In that case, you can refer to the IVOA reference frames definition and the list of astropy’s frames and deal with the conversion manually.
Examples
>>> from astropy.io.votable.tree import CooSys >>> coosys = CooSys(system="ICRS", epoch="J2020") >>> # note that coosys elements also contain the epoch >>> coosys.to_astropy_frame() <ICRS Frame>