QUERYSIMBAD
Name
QUERYSIMBAD
Purpose
Query the SIMBAD/NED/Vizier astronomical name resolver to obtain coordinates
Explanation
Uses the IDL SOCKET command to query either the SIMBAD or NED nameserver
over the Web to return J2000 coordinates. ; By default, QuerySimbad
first queries the Simbad database, then (if no match found) the NED
database, and then the Vizier database.
For details on the SIMBAD service, see http://simbad.u-strasbg.fr/Simbad
and for the NED service, see http://ned.ipac.caltech.edu/
Calling Sequence
QuerySimbad, name, ra, dec, [ id, Found=, /NED, /CADC, ERRMSG=, /VERBOSE]
Inputs
name - a scalar string containing the target name in SIMBAD (or NED)
nomenclature. For SIMBAD details see
http://vizier.u-strasbg.fr/cgi-bin/Dic-Simbad .
Outputs
ra - Right ascension of the target in J2000.0 in *degrees*, scalar
dec - declination of the target in degrees, scalar
Optional Input Keyword
/CFA - if set, then use the Simbad server at the Center for Astrophysics
rather than the default server in Strasbourg, France.
ERRMSG = If defined and passed, then any error messages will be
returned to the user in this parameter rather than
depending on the MESSAGE routine in IDL. If no errors are
encountered, then a null string is returned.
/NED - if set, then only the nameserver of the NASA Extragalactic database
is used to resolve the name and return coordinates. Note that
/NED cannot be used with Galactic objects
/VERBOSE - If set, then the HTTP-GET command is displayed
/PRINT - if set, then output coordinates are displayed at the terminal
By default, the coordinates are displayed if no output parameters
are supplied to QUERYSIMBAD
/SILENT - If set, then don't print warnings if multiple SIMBAD objects
correspond to the supplied name.
Optional Output
id - the primary SIMBAD (or NED) ID of the target, scalar string
As of June 2009, a more reliable ID seems to be found when using
CFA (/CFA) server.
Optional Keyword Output
found - set to 1 if the translation was successful, or to 0 if the
the object name could not be translated by SIMBAD or NED
Errmsg - if supplied, then any error messages are returned in this
keyword, rather than being printed at the terminal. May be either
a scalar or array.
Server - Character indicating which server was actually used to resolve
the object, 'S'imbad, 'N'ed or 'V'izier
Examples
(1) Display the J2000 coordinates for the ultracompact HII region
G45.45+0.06
IDL> QuerySimbad,'GAL045.45+00.06'
===>19 14 20.77 +11 09 3.6
Procedures Used
REPSTR(), WEBGET()
Notes
The actual query is made to the Sesame name resolver
( see http://cdsweb.u-strasbg.fr/doc/sesame.htx ). The Sesame
resolver first searches the Simbad name resolver, then NED and then
Vizier.
Modification History
Written by M. Feldt, Heidelberg, Oct 2001 <mfeldt@mpia.de>
Minor updates, W. Landsman August 2002
Added option to use NED server, better parsing of SIMBAD names such as
IRAS F10190+5349 W. Landsman March 2003
Turn off extended name search for NED server, fix negative declination
with /NED W. Landsman April 2003
Use Simbad Sesame sever, add /Verbose, /CADC keywords
B. Stecklum, TLS Tautenburg/ W. Landsman, Feb 2007
Update NED query to account for new IPAC format, A. Barth March 2007
Update NED query to account for another new IPAC format, A. Barth
July 2007
Update message when NED does not find object W.L. October 2008
Remove CADC keyword, add CFA keyword, warning if more than two
matches W.L. November 2008
Make NED queries through the Sesame server, add Server output
keyword W.L. June 2009
Don't get primary name if user didn't ask for it W.L. Aug 2009
Added /SILENT keyword W.L. Oct 2009
Added /PRINT keyword W.L. Oct 2011