get_icrs_coordinates#

astropy.coordinates.get_icrs_coordinates(name, parse=False, cache=False)[source]#

Retrieve an ICRS object by using Sesame to retrieve coordinates for the specified name. By default, this will search all available databases (SIMBAD, NED and VizieR) until a match is found. If you would like to specify the database, use the science state astropy.coordinates.name_resolve.sesame_database. You can also specify a list of servers to use for querying Sesame using the science state astropy.coordinates.name_resolve.sesame_url. This will try each one in order until a valid response is returned. By default, this list includes the main Sesame host and a mirror at vizier. The configuration item astropy.utils.data.Conf.remote_timeout controls the number of seconds to wait for a response from the server before giving up.

Parameters:
namestr

The name of the object to get coordinates for, e.g. 'M42'.

parsebool

Whether to attempt extracting the coordinates from the name by parsing with a regex. For objects catalog names that have J-coordinates embedded in their names eg: ‘CRTS SSS100805 J194428-420209’, this may be much faster than a sesame query for the same object name. The coordinates extracted in this way may differ from the database coordinates by a few deci-arcseconds, so only use this option if you do not need sub-arcsecond accuracy for coordinates.

cachebool, str, optional

Determines whether to cache the results or not. Passed through to download_file, so pass “update” to update the cached value.

Returns:
coordastropy.coordinates.ICRS object

The object’s coordinates in the ICRS frame.