Advanced cross-catalog selection, API access to data, and more |
On this page... |
There are several interfaces to search, select, analyze, and download data from MAST. As powerful as the Portal is, other interfaces may be more capable or efficient for a given purpose. This page provides a brief introduction to public interfaces to the diverse MAST holdings.
Generally, the anticipated workflow for other interfaces is much like a Portal search:
A collection of web forms enables searches that can be constrained with mission-specific metadata. URLs for these forms follow one of the following pattern:
https://archive.stsci.edu/<mission>/search.php
where <mission> is one of: befs
, euve
, fuse
, hpol
, hst
, hut
, imaps
, iue
, swiftuvot
, tues
, uit
, wuppe
; or
https://archive.stsci.edu/<mission>/data_search/search.php
where <mission> is one of: k2
, kepler
. Here is the classic form for HST:
https://archive.stsci.edu/hst/search.php
Many more experienced users find using a custom script and one of the MAST application programming interfaces (APIs) to be more efficient and flexible, particularly if they already have a clear idea of which data are of interest (e.g., new data from an active observing program). The best approach depends upon the particular data collection. Ultimately the APIs call one of the MAST web services to search for data and perform other tasks (this is also true for the Portal itself). See the document MAST Web Services for details and usage recommendations.
The python library astroquery is an excellent way to access many different astronomical archives; astroquery.mast offers features specific to MAST holdings. This library wraps much of the messy syntax of calling web services directly, URL encoding, etc. and returns results as astropy tables which facilitates other operations. This library has methods for querying, filtering, and downloading data, as well as the ability to access MAST data in the cloud.
Finally, astroquery.mast provides access to select MAST catalogs, including: HSC, GALEX, GAIA, TESS, and PanSTARRS.
Many mission-specific searches (in effect, the mission-specific web forms mentioned above but adding parameters) can be executed via HTTP Get Requests. The advantages over astroquery.mast are:
Such requests use the following pattern:
https://archive.stsci.edu/<collection>
/search.php?action=Search<¶m=value>
where <collection>
is a MAST-defined code for a data collection and <¶m=value>
is a sequence of one or more parameters of the search, such as RA and Dec. The full set of possible parameters and values for each collection is given on the MAST Web Services page.
The query string must be URL encoded prior to being passed to the web service. |
MAST collections may be searched with Virtual Observatory (VO) protocols, which look very similar to MAST mission searches.
The output from a VO search is in VO Table format, which is based on XML. |
The base URL for a search within a given radius of a sky position is identical to the MAST mission searches, but adding a search radius parameter (SR=<value>
), and without the action=Search
parameter.
https://archive.stsci.edu/<collection>/search.php?SR=<val_rad>&RA=<val_ra>&DEC=<val_dec>
The base URL for a search of images from MAST missions and many HLSP collections (with a couple of exceptions) has the form:
https://archive.stsci.edu/siap/search.php?<param=value>
where parameters beyond the first must be separated with an ampersand (&
) character.
The base URL for a search of spectra from selected MAST missions has the form:
https://archive.stsci.edu/ssap/search2.php?<param=value>
The CasJobs interface features cross-matches, joins, and other SQL operations among several MAST catalogs, as well as personal (uploaded) catalogs. Results can be stored in a new table, and downloaded for local analysis.
A separate account is required to work in CasJobs. |
API access to many catalogs hosted by MAST is described on the Catalog/Image Webservices page. The URL pattern is:
http://gsss.stsci.edu/webservices/vo/CatalogSearch.aspx?<param=value>
where <param=value>
are specific parameters of the search, and the associated values. This provides access to the HLA, the Digital Sky Survey images, the Guide Star Catalog, and several others.
Custom search interfaces are available within individual select catalogs at Catalogs.MAST. These include: