Chandra X-Ray Observatory
Skip to the navigation links
Last modified: August 2013

AHELP for CIAO 4.9


Context: contrib


Find the position of an astronomical object using NED or CDS.


from coords.resolver import identify_name
(ra, dec, coordsys) = identify_name(name)

ra and dec are in decimal degrees, coordsys is a string


The identify_name routine calls the Astronomical name resolver provided by the Canadian Astronomy Data Center (CADC). Given a name, it returns the Right Ascension, Declination, and coordinate system. If no position can be found then a ValueError is raised. This call requires a working internet connection, and so may fail (e.g. if the CADC service is temporarily unavailable).

Loading the routine

The routine can be loaded into a Python session or script by saying:

from coords.resolver import identify_name

Example 1

chips> from coords.resolver import identify_name
chips> (ra, dec, csys) = identify_name('sirius')
chips> print("RA={} Dec={} system={}".format(ra, dec, csys))
RA=101.28854 Dec=-16.71314 system=ICRS

Here we find the position of Sirius.

Example 2

(ra, dec, csys) = identify_name('made up name')
ValueError: No position found matching the name 'made up name'.

If a position is not recognized then a ValueError is raised.

Changes in the scripts 4.5.4 (August 2013) release

The routine now uses the service at rather than the more-specific version previously used:

See Also

coords_chandra, coords_format, coords_utils

Last modified: August 2013
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.