Last modified: January 2023

URL: https://cxc.cfa.harvard.edu/ciao/ahelp/identify_name.html
AHELP for CIAO 4.16

identify_name

Context: contrib

Synopsis

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

Syntax

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

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

Description

The identify_name routine calls the Astronomical name resolver provided by the Canadian Astronomy Data Center (CADC), or if this is not working, the Sesame service from the Centre de Données astronomiques de Strasbourg.

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 both services are temporarily unavailable).

Loading the routine

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

from coords.resolver import identify_name

Examples

Example 1

>>> from coords.resolver import identify_name
>>> (ra, dec, csys) = identify_name('sirius')
>>> print(f"RA={ra} Dec={dec} system={csys}")
RA=101.2885408 Dec=-16.71314278 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.15.1 (January 2023) release

The identify_name should better handle the case of unknown names or one of the name servers being temporarily down when the ciao-install version of CIAO does not work with the system SSL libraries.

Changes in the scripts 4.12.2 (April 2020) release

The routine now falls back to using the Sesame service from Simbad if the CADC server fails.

Changes in the scripts 4.10.3 (October 2018) release

The routine now uses the service at http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/cadc-target-resolver rather than http://www1.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/NameResolver because problems were seen with the automatic redirects for some queries.

Changes in the scripts 4.5.4 (August 2013) release

The routine now uses the service at http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/NameResolver rather than the more-specific version previously used: http://www1.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/NameResolver.

See Also

contrib
coords_chandra, coords_format, coords_gratings, coords_utils