VizierClass¶
- class astroquery.vizier.VizierClass(*, columns=['*'], column_filters={}, catalog=None, keywords=None, ucd='', timeout=60, vizier_server='vizier.cds.unistra.fr', row_limit=50)[source]¶
Bases:
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 https://vizier.cds.unistra.fr/vizier/vizHelp/1.htx#ucd and https://vizier.cds.unistra.fr/vizier/doc/UCD/
- vizier_serverstring
Name of the VizieR mirror to use. (This parameter’s default is set from a configuration object.)
- timeoutnumber
timeout for connecting to server (This parameter’s default is set from a configuration object.)
- row_limitint
Maximum number of rows that will be fetched from the result (set to -1 for unlimited). (This parameter’s default is set from a configuration object.)
Attributes Summary
The default catalog to search.
Filters to run on the individual columns.
Columns to include.
The set of keywords to filter the Vizier search
UCD criteria: see https://vizier.cds.unistra.fr/vizier/vizHelp/1.htx#ucd
Methods Summary
find_catalogs
(keywords, *[, ...])Search Vizier for catalogs based on a set of keywords, e.g. author name.
get_catalog_metadata
(*[, catalog, ...])Get a VizieR's catalog metadata.
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, *[, ...])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 https://vizier.cds.unistra.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') >>> catalog_list OrderedDict([('J/ApJ/684/1143', </>), ('J/ApJ/736/87', </>) ... ]) >>> print({k:v.description for k,v in catalog_list.items()}) {'J/ApJ/684/1143': 'BHB candidates in the Milky Way (Xue+, 2008)', 'J/ApJ/736/87': 'Abundances in G-type stars with exoplanets (Kang+, 2011)', 'J/ApJ/738/79': "SDSS-DR8 BHB stars in the Milky Way's halo (Xue+, 2011)", 'J/ApJ/760/12': 'LIGO/Virgo gravitational-wave (GW) bursts with GRBs (Abadie+, 2012)', ...}
- get_catalog_metadata(*, catalog=None, get_query_payload=False)[source]¶
Get a VizieR’s catalog metadata.
- Parameters:
- catalogstr, optional
The catalog identifier. It usually looks like ‘III/55’ for big surveys or ‘J/ApJ/811/67’ for catalogs linked to a published paper. When this parameter is not provided, the function looks for the metadata of the catalog property of the Vizier class instance (
catalog
).- get_query_payloadbool, optional
When True, returns the dict of HTTP request parameters. This does not execute the search for metadata.
- Returns:
Table
A table with the following columns: - title - authors - abstract (the abstract of the article, modified to explain the data more specifically) - origin_article (the bibcode of the associated article) - webpage (a link to VizieR, contains more information about the catalog) - created (date of creation of the catalog in VizieR) - updated (date of the last modification applied to the entry, this is often metadata, with no appearance in the history tap on the webpage but sometimes also data erratum, which will appear in the history tab) - waveband - doi (the catalog doi when it exists)
Examples
>>> from astroquery.vizier import Vizier >>> Vizier(catalog="I/324").get_catalog_metadata() <Table length=1> title authors ... waveband doi object object ... object object ----------------------------------- ----------------------- ... -------- ------ The Initial Gaia Source List (IGSL) Smart R.L.; Nicastro L. ... --
>>> from astroquery.vizier import Vizier >>> Vizier.get_catalog_metadata(catalog="J/ApJS/173/185") <Table length=1> title ... doi object ... object ------------------------------------------ ... -------------------------------- GALEX ultraviolet atlas of nearby galaxies ... doi:10.26093/cds/vizier.21730185
- 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.
- tableA
- 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:
- response
Response
Returned if asynchronous method used
- response
- 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.
- cachebool
Defaults to True. If set overrides global caching behavior. See caching documentation.
- Returns:
- tableA
Table
object.
- tableA
Examples
>>> from astroquery.vizier import Vizier >>> # note that glon/glat constraints here *must* be floats >>> result = Vizier(row_limit=3).query_constraints(catalog='J/ApJ/723/492/table1', ... GLON='>49.0 & <51.0', GLAT='<0.0') >>> result[result.keys()[0]].pprint() GRSMC GLON GLAT VLSR DelV ... alpha Note RD09 _RA.icrs _DE.icrs deg deg km / s km / s ... deg deg ------------- ------ ------ ------ ------ ... ------ ---- ---- -------- -------- G049.49-00.41 49.49 -0.41 56.90 9.12 ... 0.73 i RD09 290.9536 14.4992 G049.39-00.26 49.39 -0.26 50.94 3.51 ... 0.16 i RD09 290.7682 14.4819 G049.44-00.06 49.44 -0.06 62.00 3.67 ... 0.17 i RD09 290.6104 14.6203
- 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.
- cachebool
Defaults to True. If set overrides global caching behavior. See caching documentation.
- Returns:
- response
requests.Response
The response of the HTTP request.
- response
Examples
>>> from astroquery.vizier import Vizier >>> # note that glon/glat constraints here *must* be floats >>> result = Vizier(row_limit=3).query_constraints(catalog='J/ApJ/723/492/table1', ... GLON='>49.0 & <51.0', GLAT='<0.0') >>> result[result.keys()[0]].pprint() GRSMC GLON GLAT VLSR DelV ... alpha Note RD09 _RA.icrs _DE.icrs deg deg km / s km / s ... deg deg ------------- ------ ------ ------ ------ ... ------ ---- ---- -------- -------- G049.49-00.41 49.49 -0.41 56.90 9.12 ... 0.73 i RD09 290.9536 14.4992 G049.39-00.26 49.39 -0.26 50.94 3.51 ... 0.16 i RD09 290.7682 14.4819 G049.44-00.06 49.44 -0.06 62.00 3.67 ... 0.17 i RD09 290.6104 14.6203
- 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.
- radius
Quantity
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, )- cachebool
Defaults to True. If set overrides global caching behavior. See caching documentation.
- Returns:
- tableA
Table
object.
- tableA
- 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.
- radius
Quantity
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, )- cachebool
Defaults to True. If set overrides global caching behavior. See caching documentation.
- Returns:
- response
Response
The response of the HTTP request.
- response
- 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.At least one of
radius
orwidth
must be specified.- Parameters:
- coordinatesstr,
astropy.coordinates
object, orTable
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 radiusradius
and inner radiusinner_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 specifiedwidth
andheight
.- catalogstr or list, optional
The catalog(s) which must be searched for this identifier. If not specified, all matching catalogs will be searched.
- column_filters: dict, optional
Constraints on columns of the result. The dictionary contains the column name as keys, and the constraints as values.
- framestr, optional
The frame to use for the request. It should be ‘fk5’, ‘icrs’, or ‘galactic’. This choice influences the the orientation of box requests.
- cachebool
Defaults to True. If set overrides global caching behavior. See caching documentation.
- coordinatesstr,
- Returns:
- tableA
Table
object.
- tableA
- query_region_async(coordinates, *, radius=None, inner_radius=None, width=None, height=None, catalog=None, get_query_payload=False, cache=True, return_type='votable', column_filters={}, frame='fk5')[source]¶
Serves the same purpose as
query_region
but only returns the HTTP response rather than the parsed result.At least one of
radius
orwidth
must be specified.- Parameters:
- coordinatesstr,
astropy.coordinates
object, orTable
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 radiusradius
and inner radiusinner_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 specifiedwidth
andheight
.- catalogstr or list, optional
The catalog(s) which must be searched for this identifier. If not specified, all matching catalogs will be searched.
- column_filters: dict, optional
Constraints on columns of the result. The dictionary contains the column name as keys, and the constraints as values.
- framestr, optional
The frame to use for the request. It should be ‘fk5’, ‘icrs’, or ‘galactic’. This choice influences the the orientation of box requests.
- cachebool
Defaults to True. If set overrides global caching behavior. See caching documentation.
- coordinatesstr,
- Returns:
- response
requests.Response
The response of the HTTP request.
- response