MAST Queries (
The Mikulski Archive for Space Telescopes (MAST) is a NASA funded project made to collect and archive a variety of scientific data to support the astronomical community. The data housed in MAST includes science and engineering data, with a primary focus on data sets in the optical, ultraviolet, and near-infrared parts of the spectrum, from over 20 space-based missions. MAST offers single mission-based queries as well as cross-mission queries. Astroquery’s astroquery.mast module is one tool used to query and access the data in this Archive.
astroquery.mast offers 3 main services:
CatalogsClass, and Cutouts. MastClass allows direct programatic access
to the MAST Portal. Along with
ObservationsClass, it is used to query
MAST observational data. The Catalogs class is used to query MAST catalog data. The
available catalogs include the Pan-STARRS and Hubble Source catalogs along with a few others
listed under the Catalog Queries section of this page. Lastly, Cutouts, a newer addition to
astroquery.mast, provides access to full-frame image cutouts of Transiting Exoplanet Survey
Satellite (TESS), MAST Hubble Advanced Product (HAP),and deep-field images, through
ZcutClass respectively. For a full description of MAST query options,
please read the MAST API Documentation.
This module can be used to query the Barbara A. Mikulski Archive for Space Telescopes (MAST). Below are examples of the types of queries that can be used, and how to access data products.
- Observation Queries
- Mission Searches
- Catalog Queries
- Image Cutouts
- MAST Queries
Accessing Proprietary Data¶
If a token is not supplied, the user will be prompted to enter one.
To view tokens accessible through your account, visit https://auth.mast.stsci.edu
>>> from astroquery.mast import Observations ... >>> my_session = Observations.login(token="12348r9w0sa2392ff94as841") INFO: MAST API token accepted, welcome User Name [astroquery.mast.core] ... >>> sessioninfo = Observations.session_info() eppn: firstname.lastname@example.org ezid: uname ...
* For security tokens should not be typed into a terminal or Jupyter notebook
but instead input using a more secure method such as
MAST tokens expire after 10 days of inactivity, at which point the user must generate a new token. If
the key is used within that time, the token’s expiration pushed back to 10 days. A token’s max
age is 60 days, afterward the user must generate a token.
store_token argument can be used to store the token securely in the user’s keyring.
This token can be overwritten using the
To logout before a session expires, the
logout method may be used.
The Space Telescope Science Institute Notebooks Repository includes many examples that use Astroquery.
MAST Query Tool¶
Module to query the Barbara A. Mikulski Archive for Space Telescopes (MAST).
MAST Observations query class.
MAST catalog query class.
MastMissions search class.
MAST query class.
MAST TESS FFI cutout query class.
MAST ZCUT cutout query class.
MAST Hubble Advanced Product (HAP) cutout query class.
Configuration parameters for