neclib.coordinates.frame#

describe_frame(frame, /)[source]#

Get string representation of a frame.

Parameters:

frame (Union[BaseCoordinateFrame, Type[BaseCoordinateFrame]]) – Frame object to describe.

Return type:

String representation of the frame.

Examples

>>> neclib.coordinates.describe_frame(FK5)
'fk5'
>>> neclib.coordinates.describe_frame(AltAz())
'altaz'
>>> neclib.coordinates.describe_frame(
...     SkyOffsetFrame(origin=FK5("10deg", "0deg"), rotation="20deg")
... )
'origin=fk5(10deg, 0deg), rotation=20deg'
parse_frame(frame, /)[source]#

Parse a frame string and create a frame object.

Parameters:

frame (str) – String representation of coordinate frame.

Return type:

Parsed frame object.

Examples

>>> neclib.coordinates.parse_frame("fk5")
<class 'astropy.coordinates.builtin_frames.fk5.FK5'>
>>> neclib.coordinates.parse_frame("altaz")
<class 'astropy.coordinates.builtin_frames.altaz.AltAz'>
>>> neclib.coordinates.parse_frame("origin=FK5(10deg, 0deg), rotation=20deg")
<SkyOffsetFK5 Frame (equinox=J2000.000, rotation=20.0 deg, origin=<FK5 Coordinate
(equinox=J2000.000): (ra, dec) in deg
(10., 0.)>)>