Skip to content

Commit

Permalink
Add to TOC, rename, minor changes to address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
snbianco committed Jan 29, 2025
1 parent 029eb0c commit e3dbddd
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 21 deletions.
1 change: 1 addition & 0 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ parts:
- file: notebooks/multi_mission/large_downloads/large_downloads.ipynb
- file: notebooks/multi_mission/historic_quasar_observations/historic_quasar_observations.ipynb
- file: notebooks/multi_mission/wildcard_searches/wildcard_searches.ipynb
- file: notebooks/multi_mission/missions_mast_search/missions_mast_search.ipynb
- file: notebooks/multi_mission/display_footprints/display_footprints.ipynb

- caption: PanSTARRS
Expand Down
2 changes: 2 additions & 0 deletions notebooks/multi_mission/astroquery.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ The [`astroquery.mast` readthedocs](https://astroquery.readthedocs.io/en/latest/
| Beginner ZCut | The `zcut` feature enables you to request cutouts from [various deep field surveys](https://mast.stsci.edu/zcut/). |
| Large Downloads | When downloading large datasets, you may encounter timeout errors. This Notebook demonstrates robust queries that are less likely to encounter these issues. |
| Historic Quasar Observations | Much of the data in MAST is archival; from no longer operational missions. Learn to check for archival coverage of your target and analyze the results. |
| Searching for Mission-Specific Data with Astroquery | Learn the basic workflow for searching mission datasets, retrieving data products, and
downloading data products with the `MastMissions` class, a wrapper around the [MAST Search API.](https://mast.stsci.edu/search/docs/) |
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@
"\n",
"Welcome! This tutorial explores the capabilities of the `astroquery.mast.MastMissions` class, a versatile tool for accessing and working with datasets hosted by the [Mikulski Archive for Space Telescopes (MAST)](https://archive.stsci.edu/). `MastMissions` is a Python wrapper for the [MAST Search API](https://mast.stsci.edu/search/docs/), which allows you to search for mission-specific dataset metadata and data products. This data is also findable through the [MAST Search UI](https://mast.stsci.edu/search/ui/#/).\n",
"\n",
"The following missions/products are available for search at time of writing:\n",
"The following missions/products are available for search as of January 2025:\n",
"\n",
"- [Hubble Space Telescope](https://www.stsci.edu/hst) (`hst`)\n",
"- [James Webb Space Telescope](https://www.stsci.edu/jwst) (`jwst`)\n",
"- [High Level Science Products](https://outerspace.stsci.edu/display/MASTDOCS/About+HLSPs)\n",
" - [COS Legacy Archive Spectroscopic SurveY](https://archive.stsci.edu/hlsp/classy) (`classy`)\n",
" - [Hubble UV Legacy Library of Young Stars as Essential Standards](https://archive.stsci.edu/hlsp/ullyses) (`ullyses`)\n",
"\n",
"In this notebook, we will walk through the basic workflow for searching datasets, retrieving data products, and downloading data products. This workflow will look very similar to the one used with the [`astroquery.mast.Observations`](https://astroquery.readthedocs.io/en/latest/mast/mast_obsquery.html) class, detailed in our [\"Searching MAST using astroquery.mast\" notebook](https://github.com/spacetelescope/mast_notebooks/blob/main/notebooks/multi_mission/beginner_search/beginner_search.ipynb). There are a few key differences to note, and you should use the class that is best suited for your unique goals:\n",
"In this notebook, we will walk through the basic workflow for searching datasets, retrieving data products, and downloading data products. This workflow will look very similar to the one used with the [`astroquery.mast.Observations`](https://astroquery.readthedocs.io/en/latest/mast/mast_obsquery.html) class, detailed in our [\"Searching MAST using astroquery.mast\" notebook](https://spacetelescope.github.io/mast_notebooks/notebooks/multi_mission/beginner_search/beginner_search.html). There are a few key differences to note, and you should use the class that is best suited for your unique goals:\n",
"\n",
"* *API*: `MastMissions` uses the [Mast Search API](https://mast.stsci.edu/search/docs/) while `Observations` uses the [MAST Portal API](https://mast.stsci.edu/api/v0/).\n",
"* *Collection*: `MastMissions` can only perform queries on a single collection, or \"mission\", at a time. `Observations` uses the [Common Archive Observation Model (CAOM)](https://mast.stsci.edu/vo-tap/api/v0.1/caom/) and can run queries across every available observational collection at the same time.\n",
Expand All @@ -96,7 +96,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 1,
"metadata": {
"slideshow": {
"slide_type": "fragment"
Expand All @@ -122,7 +122,7 @@
"source": [
"## Querying for Datasets from Missions-MAST\n",
"\n",
"In order to make queries on Missions-MAST metadata, we will have to perform some setup. We will instantiate an object of the `astroquery.mast.MastMissions` class and assign its `mission` attribute. The object can be used to search mission dataset metadata by object name, sky position, or other criteria.\n",
"In order to make queries on Missions-MAST metadata, we will have to perform some setup. We will initialize an object of the `astroquery.mast.MastMissions` class and assign its `mission` attribute. The object can be used to search mission dataset metadata by object name, sky position, or other criteria.\n",
"\n",
"The default value for `mission` is `hst`, meaning that queries will be run on Hubble dataset metadata. The searchable metadata for Hubble encompasses all information that was previously accessible through the original HST web search form. The metadata for Hubble and all other available missions is also available through the [MAST Search UI](https://mast.stsci.edu/search/ui/#/).\n",
"\n",
Expand All @@ -146,7 +146,7 @@
"source": [
"### Search Parameters\n",
"\n",
"When writing queries, keyword arguments can be used to specify output characteristics and filter on values like instrument, exposure type, and proposal ID. The available column names for a mission are returned by the `get_column_list` function. Below, we will print out the name, data type, and description for the first 10 columns in HST metadata."
"When writing queries, keyword arguments can be used to specify output characteristics and filter on fields like instrument, exposure type, and proposal ID. The available column names for a mission are returned by the `get_column_list` function. Below, we will print out the name, data type, and description for the first 10 columns in HST metadata."
]
},
{
Expand Down Expand Up @@ -201,7 +201,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"There were 681 total results, meaning that 681 HST datasets were targeting the Crab Nebula. Now, let's try refining our search a bit more.\n",
"There were over 600 total results, meaning that hundreds of HST datasets were targeting the Crab Nebula. Now, let's try refining our search a bit more.\n",
"\n",
"- Each dataset is associated with a celestial coordinate, given by `sci_ra` (right ascension) and `sci_dec` (declination). By default, the query returns all datasets that fall within 3 arcminutes from the object's coordinates. Let's set the `radius` parameter to be 1 arcminute instead.\n",
"- Say that we're not interested in the first 4 results. We can assign `offset` to skip a certain number of rows.\n",
Expand Down Expand Up @@ -256,7 +256,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"19 HST datasets fall within our cone search. In other words, their target coordinates are within 10 arcseconds of the coordinates that we defined."
"The above datasets fall within our cone search. In other words, their target coordinates are within 10 arcseconds of the coordinates that we defined."
]
},
{
Expand Down Expand Up @@ -532,7 +532,7 @@
"# Filter products \n",
"filtered = missions.filter_products(products,\n",
" extension='fits', # FITS file extension\n",
" type='science',\n",
" type='science', # Science data\n",
" file_suffix=['ASN', 'JIF']) # Association files OR jitter information files\n",
"\n",
"# Display results\n",
Expand Down Expand Up @@ -612,18 +612,18 @@
"source": [
"### Exclusive Data Access\n",
"\n",
"Some data may not be publicly available. To [download proprietary data](https://astroquery.readthedocs.io/en/latest/mast/mast.html#accessing-proprietary-data), you will need a [MyST Account](https://proper.stsci.edu/proper/authentication/auth) with proper permissions. You will also need to provide an [API token](https://auth.mast.stsci.edu/info). \n",
"Some data may not be publicly available and will require [authentication and authorization](https://outerspace.stsci.edu/display/MASTDOCS/Using+MAST+APIs#UsingMASTAPIs-authAuth.MAST). To [download proprietary data with Astroquery](https://astroquery.readthedocs.io/en/latest/mast/mast.html#accessing-proprietary-data), you will need a [MyST Account](https://proper.stsci.edu/proper/authentication/auth) with proper permissions. You will also need to provide an [API token](https://auth.mast.stsci.edu/info). \n",
"\n",
"You can use the `login` function to authenticate yourself. After executing the following cell, you should be prompted to enter your token."
"You can use the `login` function to authenticate yourself. After uncommenting and executing the following cell, you should be prompted to enter your token."
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"#missions.login()"
"# missions.login()"
]
},
{
Expand Down Expand Up @@ -680,7 +680,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"This query returned 168 JWST datasets. Now, let's try it with a different data collection. We'll reassign the `mission` attribute on the `multi_mission` object to be `'ullyses'` and run the same query."
"This query returned over 160 JWST datasets. Now, let's try it with a different data collection. We'll reassign the `mission` attribute on the `multi_mission` object to be `'ullyses'` and run the same query."
]
},
{
Expand All @@ -701,7 +701,7 @@
"source": [
"# Query ULLYSES for NGC 346\n",
"results = multi_mission.query_object('NGC 346',\n",
" radius=0.2) # Search within a 0.5 arcminute radius\n",
" radius=0.2) # Search within a 0.2 arcminute radius\n",
"\n",
"# Display results\n",
"print(f'Total number of datasets: {len(results)}')\n",
Expand All @@ -712,7 +712,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Notice that this query only returned 2 datasets. The result tables also look very different in terms of data and column keywords. This is because each query is being performed on a different data collection!"
"Notice that this query returned only a few datasets. The result tables also look very different in terms of data and column keywords. This is because each query is being performed on a different data collection!"
]
},
{
Expand All @@ -728,14 +728,15 @@
"- Filter used is F150W, F105W, or F110W\n",
"- Declination is greater than 0 degrees\n",
"- Exposure time is between 1000 and 2000 seconds\n",
"- Target name contains the string \"GAL\"\n",
"- Skip the first 5 entries\n",
"- Sort by exposure time in descending order\n",
"- Limit the results to 3 datasets"
]
},
{
"cell_type": "code",
"execution_count": 47,
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -755,7 +756,7 @@
},
{
"cell_type": "code",
"execution_count": 48,
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -778,7 +779,7 @@
},
{
"cell_type": "code",
"execution_count": 49,
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -798,7 +799,7 @@
},
{
"cell_type": "code",
"execution_count": 50,
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -961,8 +962,8 @@
"\n",
"**Author(s):** Sam Bianco <br>\n",
"**Keyword(s):** Tutorial, Astroquery, MastMissions <br>\n",
"**First published:** December 2024 <br>\n",
"**Last updated:** December 2024 <br>\n",
"**First published:** January 2025 <br>\n",
"**Last updated:** January 2025 <br>\n",
"\n",
"***\n",
"[Top of Page](#top)\n",
Expand Down

0 comments on commit e3dbddd

Please sign in to comment.