MAST Catalogs

Catalogs hosted at MAST (HSC, Pan-STARRS, TIC, GAIA, …).

  • Module name: mast_catalogs

  • Python class: astroquery.mast.Catalogs

  • Functions: 19

Call any function below with the astroquery_execute MCP tool. Descriptions are taken from the upstream astroquery/astropy docstrings.

Function

Summary

authenticated

Catalogs.authenticated

clear_cache

Removes all cache files.

disable_cloud_dataset

Deprecated: v0.4.8

download_hsc_spectra

Download one or more Hubble Source Catalog spectra.

enable_cloud_dataset

Deprecated: v0.4.8

get_hsc_spectra

Queries the service and returns a table object.

get_hsc_spectra_async

Returns all Hubble Source Catalog spectra.

login

Log into the MAST portal.

logout

Log out of current MAST session.

query_criteria

Queries the service and returns a table object.

query_criteria_async

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

query_hsc_matchid

Queries the service and returns a table object.

query_hsc_matchid_async

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

query_object

Queries the service and returns a table object.

query_object_async

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

query_region

Queries the service and returns a table object.

query_region_async

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

reset_cache_location

Resets the cache location to the default astropy cache

resolve_object

Resolves an object name to a position on the sky.

Functions

authenticated

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="authenticated",
    params={},
)
CatalogsClass.authenticated()

clear_cache

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="clear_cache",
    params={},
)
CatalogsClass.clear_cache()

Removes all cache files.

disable_cloud_dataset

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="disable_cloud_dataset",
    params={},
)
CatalogsClass.disable_cloud_dataset()

Deprecated since version v0.4.8: This function is non-operational and will be removed in a future release.

Disables downloading public files from S3 instead of MAST.

download_hsc_spectra

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="download_hsc_spectra",
    params={"spectra": "<spectra>"},
)
CatalogsClass.download_hsc_spectra(spectra, *, download_dir=None, cache=True, curl_flag=False)

Download one or more Hubble Source Catalog spectra.

Parameters:
  • spectra (Table or Row) – One or more HSC spectra to be downloaded.

  • download_dir (str, 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 ‘.’.

  • cache (bool, 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_flag (bool, 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:

response

Return type:

list of Response

enable_cloud_dataset

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="enable_cloud_dataset",
    params={},
)
CatalogsClass.enable_cloud_dataset(provider='AWS', profile=None, verbose=True)

Deprecated since version v0.4.8: This function is non-operational and will be removed in a future release.

Enable downloading public files from S3 instead of MAST. Requires the boto3 library to function.

Parameters:
  • provider (str) – Which cloud data provider to use. We may in the future support multiple providers, though at the moment this argument is ignored.

  • profile (str) – Profile to use to identify yourself to the cloud provider (usually in ~/.aws/config).

  • verbose (bool) – Default True. Logger to display extra info and warning.

get_hsc_spectra

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="get_hsc_spectra",
    params={},
)
CatalogsClass.get_hsc_spectra(*args, **kwargs)

Queries the service and returns a table object.

Returns all Hubble Source Catalog spectra.

Parameters:
  • pagesize (int, optional) – Can be used to override the default pagesize. E.g. when using a slow internet connection.

  • page (int, optional) – Can be used to override the default behavior of all results being returned to obtain one specific page of results.

Returns:

table

Return type:

A `~astropy.table.Table object.`

get_hsc_spectra_async

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="get_hsc_spectra_async",
    params={},
)
CatalogsClass.get_hsc_spectra_async(*, pagesize=None, page=None)

Returns all Hubble Source Catalog spectra.

Parameters:
  • pagesize (int, optional) – Can be used to override the default pagesize. E.g. when using a slow internet connection.

  • page (int, optional) – Can be used to override the default behavior of all results being returned to obtain one specific page of results.

Returns:

response

Return type:

list of Response

login

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="login",
    params={},
)
CatalogsClass.login(token=None, store_token=False, reenter_token=False)

Log into the MAST portal.

Parameters:
  • token (string, optional) – Default is None. The token to authenticate the user. This can be generated at https://ssoportal.stsci.edu/idp/profile/SAML2/Redirect/SSO?execution=e1s1 If not supplied, it will be prompted for if not in the keyring or set via $MAST_API_TOKEN

  • store_token (bool, optional) – Default False. If true, MAST token will be stored securely in your keyring.

  • reenter_token (bool, optional) – Default False. Asks for the token even if it is already stored in the keyring or $MAST_API_TOKEN environment variable. This is the way to overwrite an already stored password on the keyring.

logout

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="logout",
    params={},
)
CatalogsClass.logout()

Log out of current MAST session.

query_criteria

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="query_criteria",
    params={},
)
CatalogsClass.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:
  • catalog (str) – The catalog to be queried.

  • pagesize (int, optional) – Can be used to override the default pagesize. E.g. when using a slow internet connection.

  • page (int, optional) – Can be used to override the default behavior of all results being returned to obtain one specific page of results.

  • resolver (str, optional) – The resolver to use when resolving a named target into coordinates. Valid options are “SIMBAD” and “NED”. If not specified, the default resolver order will be used. Please see the STScI Archive Name Translation Application (SANTA) for more information. Default is None.

  • **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 fields listed in the column documentation for the catalog being queried. 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] For catalogs available through Catalogs.MAST (PanSTARRS), the Column Name is the keyword, and the argument should be either an acceptable value for that parameter, or a list consisting values, or tuples of decorator, value pairs (decorator, value). In addition, columns may be used to select the return columns, consisting of a list of column names. Results may also be sorted through the query with the parameter sort_by composed of either a single Column Name to sort ASC, or a list of Column Nmaes to sort ASC or tuples of Column Name and Direction (ASC, DESC) to indicate sort order (Column Name, DESC). Detailed information of Catalogs.MAST criteria usage can be found here.

Returns:

table

Return type:

A `~astropy.table.Table object.`

query_criteria_async

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="query_criteria_async",
    params={"catalog": "<catalog>"},
)
CatalogsClass.query_criteria_async(catalog, *, pagesize=None, page=None, resolver=None, **criteria)

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

Parameters:
  • catalog (str) – The catalog to be queried.

  • pagesize (int, optional) – Can be used to override the default pagesize. E.g. when using a slow internet connection.

  • page (int, optional) – Can be used to override the default behavior of all results being returned to obtain one specific page of results.

  • resolver (str, optional) – The resolver to use when resolving a named target into coordinates. Valid options are “SIMBAD” and “NED”. If not specified, the default resolver order will be used. Please see the STScI Archive Name Translation Application (SANTA) for more information. Default is None.

  • **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 fields listed in the column documentation for the catalog being queried. 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] For catalogs available through Catalogs.MAST (PanSTARRS), the Column Name is the keyword, and the argument should be either an acceptable value for that parameter, or a list consisting values, or tuples of decorator, value pairs (decorator, value). In addition, columns may be used to select the return columns, consisting of a list of column names. Results may also be sorted through the query with the parameter sort_by composed of either a single Column Name to sort ASC, or a list of Column Nmaes to sort ASC or tuples of Column Name and Direction (ASC, DESC) to indicate sort order (Column Name, DESC). Detailed information of Catalogs.MAST criteria usage can be found here.

Returns:

response

Return type:

list of Response

query_hsc_matchid

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="query_hsc_matchid",
    params={},
)
CatalogsClass.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:
  • match (int or Row) – The matchID or HSC entry to return matches for.

  • version (int, optional) – The HSC version to match against. Default is v3.

  • pagesize (int, optional) – Can be used to override the default pagesize. E.g. when using a slow internet connection.

  • page (int, optional) – Can be used to override the default behavior of all results being returned to obtain one specific page of results.

Returns:

table

Return type:

A `~astropy.table.Table object.`

query_hsc_matchid_async

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="query_hsc_matchid_async",
    params={"match": "<match>"},
)
CatalogsClass.query_hsc_matchid_async(match, *, version=3, pagesize=None, page=None)

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

Parameters:
  • match (int or Row) – The matchID or HSC entry to return matches for.

  • version (int, optional) – The HSC version to match against. Default is v3.

  • pagesize (int, optional) – Can be used to override the default pagesize. E.g. when using a slow internet connection.

  • page (int, optional) – Can be used to override the default behavior of all results being returned to obtain one specific page of results.

Returns:

response

Return type:

list of Response

query_object

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="query_object",
    params={},
)
CatalogsClass.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:
  • objectname (str) – The name of the target around which to search.

  • radius (str or Quantity object, optional) – Default 0.2 degrees. The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 0.2 deg.

  • catalog (str, optional) – Default HSC. The catalog to be queried.

  • pagesize (int, 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.

  • page (int, optional) – Default None. Can be used to override the default behavior of all results being returned to obtain a specific page of results.

  • version (int, optional) – Version number for catalogs that have versions. Default is highest version.

  • resolver (str, optional) – The resolver to use when resolving a named target into coordinates. Valid options are “SIMBAD” and “NED”. If not specified, the default resolver order will be used. Please see the STScI Archive Name Translation Application (SANTA) for more information. Default is None.

  • **criteria – 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. For catalogs available through Catalogs.MAST (PanSTARRS), the Column Name is the keyword, and the argument should be either an acceptable value for that parameter, or a list consisting values, or tuples of decorator, value pairs (decorator, value). In addition, columns may be used to select the return columns, consisting of a list of column names. Results may also be sorted through the query with the parameter sort_by composed of either a single Column Name to sort ASC, or a list of Column Nmaes to sort ASC or tuples of Column Name and Direction (ASC, DESC) to indicate sort order (Column Name, DESC). Detailed information of Catalogs.MAST criteria usage can be found here.

Returns:

table

Return type:

A `~astropy.table.Table object.`

query_object_async

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="query_object_async",
    params={"objectname": "<objectname>"},
)
CatalogsClass.query_object_async(objectname, *, radius=<Quantity 0.2 deg>, catalog='Hsc', pagesize=None, page=None, version=None, resolver=None, **criteria)

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

Parameters:
  • objectname (str) – The name of the target around which to search.

  • radius (str or Quantity object, optional) – Default 0.2 degrees. The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 0.2 deg.

  • catalog (str, optional) – Default HSC. The catalog to be queried.

  • pagesize (int, 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.

  • page (int, optional) – Default None. Can be used to override the default behavior of all results being returned to obtain a specific page of results.

  • version (int, optional) – Version number for catalogs that have versions. Default is highest version.

  • resolver (str, optional) – The resolver to use when resolving a named target into coordinates. Valid options are “SIMBAD” and “NED”. If not specified, the default resolver order will be used. Please see the STScI Archive Name Translation Application (SANTA) for more information. Default is None.

  • **criteria – 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. For catalogs available through Catalogs.MAST (PanSTARRS), the Column Name is the keyword, and the argument should be either an acceptable value for that parameter, or a list consisting values, or tuples of decorator, value pairs (decorator, value). In addition, columns may be used to select the return columns, consisting of a list of column names. Results may also be sorted through the query with the parameter sort_by composed of either a single Column Name to sort ASC, or a list of Column Nmaes to sort ASC or tuples of Column Name and Direction (ASC, DESC) to indicate sort order (Column Name, DESC). Detailed information of Catalogs.MAST criteria usage can be found here.

Returns:

response

Return type:

list of Response

query_region

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="query_region",
    params={},
)
CatalogsClass.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:
  • coordinates (str or coordinates object) – The target around which to search. It may be specified as a string or as the appropriate coordinates object.

  • radius (str or Quantity object, optional) – Default 0.2 degrees. The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 0.2 deg.

  • catalog (str, optional) – Default HSC. The catalog to be queried.

  • version (int, optional) – Version number for catalogs that have versions. Default is highest version.

  • pagesize (int, 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.

  • page (int, optional) – Default None. Can be used to override the default behavior of all results being returned to obtain a specific page of results.

  • **criteria – 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. For catalogs available through Catalogs.MAST (PanSTARRS), the Column Name is the keyword, and the argument should be either an acceptable value for that parameter, or a list consisting values, or tuples of decorator, value pairs (decorator, value). In addition, columns may be used to select the return columns, consisting of a list of column names. Results may also be sorted through the query with the parameter sort_by composed of either a single Column Name to sort ASC, or a list of Column Nmaes to sort ASC or tuples of Column Name and Direction (ASC, DESC) to indicate sort order (Column Name, DESC). Detailed information of Catalogs.MAST criteria usage can be found here.

Returns:

table

Return type:

A `~astropy.table.Table object.`

query_region_async

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="query_region_async",
    params={"coordinates": "<coordinates>"},
)
CatalogsClass.query_region_async(coordinates, *, radius=<Quantity 0.2 deg>, catalog='Hsc', version=None, pagesize=None, page=None, **criteria)

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

Parameters:
  • coordinates (str or coordinates object) – The target around which to search. It may be specified as a string or as the appropriate coordinates object.

  • radius (str or Quantity object, optional) – Default 0.2 degrees. The string must be parsable by Angle. The appropriate Quantity object from units may also be used. Defaults to 0.2 deg.

  • catalog (str, optional) – Default HSC. The catalog to be queried.

  • version (int, optional) – Version number for catalogs that have versions. Default is highest version.

  • pagesize (int, 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.

  • page (int, optional) – Default None. Can be used to override the default behavior of all results being returned to obtain a specific page of results.

  • **criteria – 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. For catalogs available through Catalogs.MAST (PanSTARRS), the Column Name is the keyword, and the argument should be either an acceptable value for that parameter, or a list consisting values, or tuples of decorator, value pairs (decorator, value). In addition, columns may be used to select the return columns, consisting of a list of column names. Results may also be sorted through the query with the parameter sort_by composed of either a single Column Name to sort ASC, or a list of Column Nmaes to sort ASC or tuples of Column Name and Direction (ASC, DESC) to indicate sort order (Column Name, DESC). Detailed information of Catalogs.MAST criteria usage can be found here.

Returns:

response

Return type:

list of Response

reset_cache_location

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="reset_cache_location",
    params={},
)
CatalogsClass.reset_cache_location()

Resets the cache location to the default astropy cache

resolve_object

Call via MCP

astroquery_execute(
    module_name="mast_catalogs",
    function_name="resolve_object",
    params={"objectname": "<objectname>"},
)
CatalogsClass.resolve_object(objectname, *, resolver=None, resolve_all=False)

Resolves an object name to a position on the sky.

Parameters:
  • objectname (str) – Name of astronomical object to resolve.

  • resolver (str, optional) – The resolver to use when resolving a named target into coordinates. Valid options are “SIMBAD” and “NED”. If not specified, the default resolver order will be used. Please see the STScI Archive Name Translation Application (SANTA) for more information. If resolve_all is True, this parameter will be ignored. Default is None.

  • resolve_all (bool, optional) – If True, will try to resolve the object name using all available resolvers (“NED”, “SIMBAD”). Function will return a dictionary where the keys are the resolver names and the values are the resolved coordinates. Default is False.

Returns:

response – If resolve_all is False, returns a SkyCoord object with the resolved coordinates. If resolve_all is True, returns a dictionary where the keys are the resolver names and the values are SkyCoord objects with the resolved coordinates.

Return type:

SkyCoord, dict