parse_coordinates

astroquery.utils.parse_coordinates(coordinates, *, return_frame=None)[source]

Takes a string or astropy.coordinates object. Checks if the string is parsable as an astropy.coordinates object or is a name that is resolvable. Otherwise asserts that the argument is an astropy.coordinates object.

Parameters:
coordinatesstr or astropy.coordinates object

Astronomical coordinate

return_frameastropy.coordinates frame

The frame to return the coordinates in. If None and coordinates is a string, the frame will be ICRS. If coordinates is an astropy.coordinates object, the frame will be the same as the input object.

Returns:
coordinatesa subclass of astropy.coordinates.BaseCoordinateFrame
Raises:
astropy.units.UnitsError
TypeError