VizierClass

class astroquery.vizier.VizierClass(columns=['*'], column_filters={}, catalog=None, keywords=None, ucd='', timeout=60, vizier_server='vizier.u-strasbg.fr', row_limit=50)[source]

Bases: astroquery.query.BaseQuery

Parameters
columnslist

List of strings

column_filtersdict
catalogstr or None
keywordsstr or None
ucdstring

“Unified Content Description” column descriptions. Specifying these will select only catalogs that have columns matching the column descriptions defined on the Vizier web pages. See http://vizier.u-strasbg.fr/vizier/vizHelp/1.htx#ucd and http://cds.u-strasbg.fr/w/doc/UCD/

Attributes Summary

catalog

The default catalog to search.

column_filters

Filters to run on the individual columns.

columns

Columns to include.

keywords

The set of keywords to filter the Vizier search

ucd

UCD criteria: see http://vizier.u-strasbg.fr/vizier/vizHelp/1.htx#ucd

valid_keywords

Methods Summary

find_catalogs(keywords[, include_obsolete, …])

Search Vizier for catalogs based on a set of keywords, e.g.

get_catalogs(*args, **kwargs)

Queries the service and returns a table object.

get_catalogs_async(catalog[, verbose, …])

Query the Vizier service for a specific catalog

query_constraints(*args, **kwargs)

Queries the service and returns a table object.

query_constraints_async([catalog, …])

Send a query to Vizier in which you specify constraints with keyword/value pairs.

query_object(*args, **kwargs)

Queries the service and returns a table object.

query_object_async(object_name[, catalog, …])

Serves the same purpose as query_object but only returns the HTTP response rather than the parsed result.

query_region(*args, **kwargs)

Queries the service and returns a table object.

query_region_async(coordinates[, radius, …])

Serves the same purpose as query_region but only returns the HTTP response rather than the parsed result.

Attributes Documentation

catalog

The default catalog to search. If left empty, will search all catalogs.

column_filters

Filters to run on the individual columns. See the Vizier website for details.

columns

Columns to include. The special keyword ‘all’ will return ALL columns from ALL retrieved tables.

keywords

The set of keywords to filter the Vizier search

ucd

UCD criteria: see http://vizier.u-strasbg.fr/vizier/vizHelp/1.htx#ucd

Examples

>>> Vizier.ucd = '(spect.dopplerVeloc*|phys.veloc*)'
valid_keywords

Methods Documentation

find_catalogs(keywords, include_obsolete=False, verbose=False, max_catalogs=None, return_type='votable')[source]

Search Vizier for catalogs based on a set of keywords, e.g. author name

Parameters
keywordslist or string

List of keywords, or space-separated set of keywords. From Vizier: “names or words of title of catalog. The words are and’ed, i.e. only the catalogues characterized by all the words are selected.”

include_obsoletebool, optional

If set to True, catalogs marked obsolete will also be returned.

max_catalogsint or None

The maximum number of catalogs to return. If None, all catalogs will be returned.

Returns
resource_dictdict

Dictionary of the “Resource” name and the VOTable resource object. “Resources” are generally publications; one publication may contain many tables.

Examples

>>> from astroquery.vizier import Vizier
>>> catalog_list = Vizier.find_catalogs('Kang W51')
>>> print(catalog_list)
{u'J/ApJ/706/83': <astropy.io.votable.tree.Resource at 0x108d4d490>,
 u'J/ApJS/191/232': <astropy.io.votable.tree.Resource at 0x108d50490>}
>>> print({k:v.description for k,v in catalog_list.items()})
{u'J/ApJ/706/83': u'Embedded YSO candidates in W51 (Kang+, 2009)',
 u'J/ApJS/191/232': u'CO survey of W51 molecular cloud (Bieging+, 2010)'}
get_catalogs(*args, **kwargs)

Queries the service and returns a table object.

Query the Vizier service for a specific catalog

Parameters
catalogstr, Resource, or list, optional

The catalog(s) that will be retrieved

Returns
tableA Table object.
get_catalogs_async(catalog, verbose=False, return_type='votable', get_query_payload=False)[source]

Query the Vizier service for a specific catalog

Parameters
catalogstr, Resource, or list, optional

The catalog(s) that will be retrieved

Returns
responseResponse

Returned if asynchronous method used

query_constraints(*args, **kwargs)

Queries the service and returns a table object.

Send a query to Vizier in which you specify constraints with keyword/value pairs.

See the vizier constraints page for details.

Parameters
catalogstr or list, optional

The catalog(s) which must be searched for this identifier. If not specified, all matching catalogs will be searched.

kwargsdict

Any key/value pairs besides “catalog” will be parsed as additional column filters.

Returns
tableA Table object.

Examples

>>> from astroquery.vizier import Vizier
>>> # note that glon/glat constraints here *must* be floats
>>> result = Vizier.query_constraints(catalog='J/ApJ/723/492/table1',
...                                   GLON='>49.0 & <51.0', GLAT='<0')
>>> result[result.keys()[0]].pprint()
    GRSMC      GLON   GLAT   VLSR  ... RD09 _RA.icrs _DE.icrs
------------- ------ ------ ------ ... ---- -------- --------
G049.49-00.41  49.49  -0.41  56.90 ... RD09   290.95    14.50
G049.39-00.26  49.39  -0.26  50.94 ... RD09   290.77    14.48
G049.44-00.06  49.44  -0.06  62.00 ... RD09   290.61    14.62
G049.04-00.31  49.04  -0.31  66.25 ... RD09   290.64    14.15
G049.74-00.56  49.74  -0.56  67.95 ... RD09   291.21    14.65
G050.39-00.41  50.39  -0.41  41.17 ... RD09   291.39    15.29
G050.24-00.61  50.24  -0.61  41.17 ... RD09   291.50    15.06
G050.94-00.61  50.94  -0.61  40.32 ... RD09   291.85    15.68
G049.99-00.16  49.99  -0.16  46.27 ... RD09   290.97    15.06
G049.44-00.06  49.44  -0.06  46.27 ... RD09   290.61    14.62
G049.54-00.01  49.54  -0.01  56.05 ... RD09   290.61    14.73
G049.74-00.01  49.74  -0.01  48.39 ... RD09   290.71    14.91
G049.54-00.91  49.54  -0.91  43.29 ... RD09   291.43    14.31
G049.04-00.46  49.04  -0.46  58.60 ... RD09   290.78    14.08
G049.09-00.06  49.09  -0.06  46.69 ... RD09   290.44    14.31
G050.84-00.11  50.84  -0.11  50.52 ... RD09   291.34    15.83
G050.89-00.11  50.89  -0.11  59.45 ... RD09   291.37    15.87
G050.44-00.41  50.44  -0.41  64.12 ... RD09   291.42    15.34
G050.84-00.76  50.84  -0.76  61.15 ... RD09   291.94    15.52
G050.29-00.46  50.29  -0.46  14.81 ... RD09   291.39    15.18
query_constraints_async(catalog=None, return_type='votable', cache=True, get_query_payload=False, **kwargs)[source]

Send a query to Vizier in which you specify constraints with keyword/value pairs.

See the vizier constraints page for details.

Parameters
catalogstr or list, optional

The catalog(s) which must be searched for this identifier. If not specified, all matching catalogs will be searched.

kwargsdict

Any key/value pairs besides “catalog” will be parsed as additional column filters.

Returns
responserequests.Response

The response of the HTTP request.

Examples

>>> from astroquery.vizier import Vizier
>>> # note that glon/glat constraints here *must* be floats
>>> result = Vizier.query_constraints(catalog='J/ApJ/723/492/table1',
...                                   GLON='>49.0 & <51.0', GLAT='<0')
>>> result[result.keys()[0]].pprint()
    GRSMC      GLON   GLAT   VLSR  ... RD09 _RA.icrs _DE.icrs
------------- ------ ------ ------ ... ---- -------- --------
G049.49-00.41  49.49  -0.41  56.90 ... RD09   290.95    14.50
G049.39-00.26  49.39  -0.26  50.94 ... RD09   290.77    14.48
G049.44-00.06  49.44  -0.06  62.00 ... RD09   290.61    14.62
G049.04-00.31  49.04  -0.31  66.25 ... RD09   290.64    14.15
G049.74-00.56  49.74  -0.56  67.95 ... RD09   291.21    14.65
G050.39-00.41  50.39  -0.41  41.17 ... RD09   291.39    15.29
G050.24-00.61  50.24  -0.61  41.17 ... RD09   291.50    15.06
G050.94-00.61  50.94  -0.61  40.32 ... RD09   291.85    15.68
G049.99-00.16  49.99  -0.16  46.27 ... RD09   290.97    15.06
G049.44-00.06  49.44  -0.06  46.27 ... RD09   290.61    14.62
G049.54-00.01  49.54  -0.01  56.05 ... RD09   290.61    14.73
G049.74-00.01  49.74  -0.01  48.39 ... RD09   290.71    14.91
G049.54-00.91  49.54  -0.91  43.29 ... RD09   291.43    14.31
G049.04-00.46  49.04  -0.46  58.60 ... RD09   290.78    14.08
G049.09-00.06  49.09  -0.06  46.69 ... RD09   290.44    14.31
G050.84-00.11  50.84  -0.11  50.52 ... RD09   291.34    15.83
G050.89-00.11  50.89  -0.11  59.45 ... RD09   291.37    15.87
G050.44-00.41  50.44  -0.41  64.12 ... RD09   291.42    15.34
G050.84-00.76  50.84  -0.76  61.15 ... RD09   291.94    15.52
G050.29-00.46  50.29  -0.46  14.81 ... RD09   291.39    15.18
query_object(*args, **kwargs)

Queries the service and returns a table object.

Serves the same purpose as query_object but only returns the HTTP response rather than the parsed result.

Parameters
object_namestr

The name of the identifier.

catalogstr or list, optional

The catalog(s) which must be searched for this identifier. If not specified, all matching catalogs will be searched.

radiusQuantity or None

A degree-equivalent radius (optional).

coordinate_systemstr or None

If the object name is given as a coordinate, you should use query_region, but you can specify a coordinate frame here instead (today, J2000, B1975, B1950, B1900, B1875, B1855, Galactic, Supergal., Ecl.J2000, )

Returns
tableA Table object.
query_object_async(object_name, catalog=None, radius=None, coordinate_frame=None, get_query_payload=False, return_type='votable', cache=True)[source]

Serves the same purpose as query_object but only returns the HTTP response rather than the parsed result.

Parameters
object_namestr

The name of the identifier.

catalogstr or list, optional

The catalog(s) which must be searched for this identifier. If not specified, all matching catalogs will be searched.

radiusQuantity or None

A degree-equivalent radius (optional).

coordinate_systemstr or None

If the object name is given as a coordinate, you should use query_region, but you can specify a coordinate frame here instead (today, J2000, B1975, B1950, B1900, B1875, B1855, Galactic, Supergal., Ecl.J2000, )

Returns
responseResponse

The response of the HTTP request.

query_region(*args, **kwargs)

Queries the service and returns a table object.

Serves the same purpose as query_region but only returns the HTTP response rather than the parsed result.

Parameters
coordinatesstr, astropy.coordinates object, or Table

The target around which to search. It may be specified as a string in which case it is resolved using online services or as the appropriate astropy.coordinates object. ICRS coordinates may also be entered as a string. If a table is used, each of its rows will be queried, as long as it contains two columns named _RAJ2000 and _DEJ2000 with proper angular units.

radiusconvertible to Angle

The radius of the circular region to query.

inner_radiusconvertible to Angle

When set in addition to radius, the queried region becomes annular, with outer radius radius and inner radius inner_radius.

widthconvertible to Angle

The width of the square region to query.

heightconvertible to Angle

When set in addition to width, the queried region becomes rectangular, with the specified width and height.

catalogstr or list, optional

The catalog(s) which must be searched for this identifier. If not specified, all matching catalogs will be searched.

Returns
tableA Table object.
query_region_async(coordinates, radius=None, inner_radius=None, width=None, height=None, catalog=None, get_query_payload=False, cache=True, return_type='votable')[source]

Serves the same purpose as query_region but only returns the HTTP response rather than the parsed result.

Parameters
coordinatesstr, astropy.coordinates object, or Table

The target around which to search. It may be specified as a string in which case it is resolved using online services or as the appropriate astropy.coordinates object. ICRS coordinates may also be entered as a string. If a table is used, each of its rows will be queried, as long as it contains two columns named _RAJ2000 and _DEJ2000 with proper angular units.

radiusconvertible to Angle

The radius of the circular region to query.

inner_radiusconvertible to Angle

When set in addition to radius, the queried region becomes annular, with outer radius radius and inner radius inner_radius.

widthconvertible to Angle

The width of the square region to query.

heightconvertible to Angle

When set in addition to width, the queried region becomes rectangular, with the specified width and height.

catalogstr or list, optional

The catalog(s) which must be searched for this identifier. If not specified, all matching catalogs will be searched.

Returns
responserequests.Response

The response of the HTTP request.