CatalogsClass

class astroquery.mast.CatalogsClass[source]

Bases: astroquery.mast.MastClass

MAST catalog query class.

Class for querying MAST catalog data.

Methods Summary

download_hsc_spectra(spectra[, …])

Download one or more Hubble Source Catalog spectra.

get_hsc_spectra(*args, **kwargs)

Queries the service and returns a table object.

get_hsc_spectra_async([pagesize, page])

Returns all Hubble Source Catalog spectra.

query_criteria(*args, **kwargs)

Queries the service and returns a table object.

query_criteria_async(catalog[, pagesize, page])

Given an set of filters, returns a list of catalog entries.

query_hsc_matchid(*args, **kwargs)

Queries the service and returns a table object.

query_hsc_matchid_async(match[, version, …])

Returns all the matches for a given Hubble Source Catalog MatchID.

query_object(*args, **kwargs)

Queries the service and returns a table object.

query_object_async(objectname[, radius, …])

Given an object name, returns a list of catalog entries.

query_region(*args, **kwargs)

Queries the service and returns a table object.

query_region_async(coordinates[, radius, …])

Given a sky position and radius, returns a list of catalog entries.

Methods Documentation

download_hsc_spectra(spectra, download_dir=None, cache=True, curl_flag=False)[source]

Download one or more Hubble Source Catalog spectra.

Parameters
spectraTable or astropy.table.Row

One or more HSC spectra to be downloaded.

download_dirstr, optional

Specify the base directory to download spectra into. Spectra will be saved in the subdirectory download_dir/mastDownload/HSC. If download_dir is not specified the base directory will be ‘.’.

cachebool, optional

Default is True. If file is found on disc it will not be downloaded again. Note: has no affect when downloading curl script.

curl_flagbool, optional

Default is False. If true instead of downloading files directly, a curl script will be downloaded that can be used to download the data files at a later time.

Returns
responselist of Response
get_hsc_spectra(*args, **kwargs)

Queries the service and returns a table object.

Returns all Hubble Source Catalog spectra.

Parameters
pagesizeint, optional

Can be used to override the default pagesize. E.g. when using a slow internet connection.

pageint, optional

Can be used to override the default behavior of all results being returned to obtain one sepcific page of results.

Returns
tableA Table object.
get_hsc_spectra_async(pagesize=None, page=None)[source]

Returns all Hubble Source Catalog spectra.

Parameters
pagesizeint, optional

Can be used to override the default pagesize. E.g. when using a slow internet connection.

pageint, optional

Can be used to override the default behavior of all results being returned to obtain one sepcific page of results.

Returns
responselist of Response
query_criteria(*args, **kwargs)

Queries the service and returns a table object.

Given an set of filters, returns a list of catalog entries. See column documentation for specific catalogs here.

Parameters
pagesizeint, optional

Can be used to override the default pagesize. E.g. when using a slow internet connection.

pageint, optional

Can be used to override the default behavior of all results being returned to obtain one specific page of results.

**criteria

Criteria to apply. At least one non-positional criteria must be supplied. Valid criteria are coordinates, objectname, radius (as in query_region and query_object), and all observation fields listed here. The Column Name is the keyword, with the argument being one or more acceptable values for that parameter, except for fields with a float datatype where the argument should be in the form [minVal, maxVal]. For non-float type criteria wildcards maybe used (both * and % are considered wildcards), however only one wildcarded value can be processed per criterion. RA and Dec must be given in decimal degrees, and datetimes in MJD. For example: filters=[“FUV”,”NUV”],proposal_pi=”Ost*”,t_max=[52264.4586,54452.8914]

Returns
tableA Table object.
query_criteria_async(catalog, pagesize=None, page=None, **criteria)[source]

Given an set of filters, returns a list of catalog entries. See column documentation for specific catalogs here.

Parameters
pagesizeint, optional

Can be used to override the default pagesize. E.g. when using a slow internet connection.

pageint, optional

Can be used to override the default behavior of all results being returned to obtain one specific page of results.

**criteria

Criteria to apply. At least one non-positional criteria must be supplied. Valid criteria are coordinates, objectname, radius (as in query_region and query_object), and all observation fields listed here. The Column Name is the keyword, with the argument being one or more acceptable values for that parameter, except for fields with a float datatype where the argument should be in the form [minVal, maxVal]. For non-float type criteria wildcards maybe used (both * and % are considered wildcards), however only one wildcarded value can be processed per criterion. RA and Dec must be given in decimal degrees, and datetimes in MJD. For example: filters=[“FUV”,”NUV”],proposal_pi=”Ost*”,t_max=[52264.4586,54452.8914]

Returns
responselist of Response
query_hsc_matchid(*args, **kwargs)

Queries the service and returns a table object.

Returns all the matches for a given Hubble Source Catalog MatchID.

Parameters
matchint or Row

The matchID or HSC entry to return matches for.

versionint, optional

The HSC version to match against. Default is v3.

pagesizeint, optional

Can be used to override the default pagesize. E.g. when using a slow internet connection.

pageint, optional

Can be used to override the default behavior of all results being returned to obtain one sepcific page of results.

Returns
tableA Table object.
query_hsc_matchid_async(match, version=3, pagesize=None, page=None)[source]

Returns all the matches for a given Hubble Source Catalog MatchID.

Parameters
matchint or Row

The matchID or HSC entry to return matches for.

versionint, optional

The HSC version to match against. Default is v3.

pagesizeint, optional

Can be used to override the default pagesize. E.g. when using a slow internet connection.

pageint, optional

Can be used to override the default behavior of all results being returned to obtain one sepcific page of results.

Returns
responselist of Response
query_object(*args, **kwargs)

Queries the service and returns a table object.

Given an object name, returns a list of catalog entries. See column documentation for specific catalogs here.

Parameters
objectnamestr

The name of the target around which to search.

radiusstr or Quantity object, optional

Default 0.2 degrees. The string must be parsable by astropy.coordinates.Angle. The appropriate Quantity object from astropy.units may also be used. Defaults to 0.2 deg.

catalogstr, optional

Default HSC. The catalog to be queried.

pagesizeint, optional

Default None. Can be used to override the default pagesize for (set in configs) this query only. E.g. when using a slow internet connection.

pageint, optional

Defaulte None. Can be used to override the default behavior of all results being returned to obtain a specific page of results.

**kwargs

Catalog-specific keyword args. These can be found in the service documentation. for specific catalogs. For example one can specify the magtype for an HSC search.

Returns
tableA Table object.
query_object_async(objectname, radius=<Quantity 0.2 deg>, catalog='Hsc', pagesize=None, page=None, **kwargs)[source]

Given an object name, returns a list of catalog entries. See column documentation for specific catalogs here.

Parameters
objectnamestr

The name of the target around which to search.

radiusstr or Quantity object, optional

Default 0.2 degrees. The string must be parsable by astropy.coordinates.Angle. The appropriate Quantity object from astropy.units may also be used. Defaults to 0.2 deg.

catalogstr, optional

Default HSC. The catalog to be queried.

pagesizeint, optional

Default None. Can be used to override the default pagesize for (set in configs) this query only. E.g. when using a slow internet connection.

pageint, optional

Defaulte None. Can be used to override the default behavior of all results being returned to obtain a specific page of results.

**kwargs

Catalog-specific keyword args. These can be found in the service documentation. for specific catalogs. For example one can specify the magtype for an HSC search.

Returns
responselist of Response
query_region(*args, **kwargs)

Queries the service and returns a table object.

Given a sky position and radius, returns a list of catalog entries. See column documentation for specific catalogs here.

Parameters
coordinatesstr or astropy.coordinates object

The target around which to search. It may be specified as a string or as the appropriate astropy.coordinates object.

radiusstr or Quantity object, optional

Default 0.2 degrees. The string must be parsable by astropy.coordinates.Angle. The appropriate Quantity object from astropy.units may also be used. Defaults to 0.2 deg.

catalogstr, optional

Default HSC. The catalog to be queried.

versionint, optional

Version number for catalogs that have versions. Default is highest version.

pagesizeint, optional

Default None. Can be used to override the default pagesize for (set in configs) this query only. E.g. when using a slow internet connection.

pageint, optional

Default None. Can be used to override the default behavior of all results being returned to obtain a specific page of results.

**kwargs

Other catalog-specific keyword args. These can be found in the (service documentation)[https://mast.stsci.edu/api/v0/_services.html] for specific catalogs. For example one can specify the magtype for an HSC search.

Returns
tableA Table object.
query_region_async(coordinates, radius=<Quantity 0.2 deg>, catalog='Hsc', version=None, pagesize=None, page=None, **kwargs)[source]

Given a sky position and radius, returns a list of catalog entries. See column documentation for specific catalogs here.

Parameters
coordinatesstr or astropy.coordinates object

The target around which to search. It may be specified as a string or as the appropriate astropy.coordinates object.

radiusstr or Quantity object, optional

Default 0.2 degrees. The string must be parsable by astropy.coordinates.Angle. The appropriate Quantity object from astropy.units may also be used. Defaults to 0.2 deg.

catalogstr, optional

Default HSC. The catalog to be queried.

versionint, optional

Version number for catalogs that have versions. Default is highest version.

pagesizeint, optional

Default None. Can be used to override the default pagesize for (set in configs) this query only. E.g. when using a slow internet connection.

pageint, optional

Default None. Can be used to override the default behavior of all results being returned to obtain a specific page of results.

**kwargs

Other catalog-specific keyword args. These can be found in the (service documentation)[https://mast.stsci.edu/api/v0/_services.html] for specific catalogs. For example one can specify the magtype for an HSC search.

Returns
responselist of Response