You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This notebook tutorial demonstrates the process of querying IRSA's Simple Image Access (SIA) service for AllWISE Atlas images, making a cutout image (thumbnail), and displaying the cutout.
23
+
# Searching for AllWISE Images with SIA v2
22
24
23
25
+++
24
26
25
-
26
-
27
27
## Learning Goals
28
28
29
29
By the end of this tutorial, you will:
30
30
31
-
* Learn how to search the NASA Astronomical Virtual Observatory Directory web portal for a service that provides access to IRSA's WISE AllWISE Atlas (L3a) coadded images.
32
-
*Use the Python pyvo package to identify which of IRSA's AllWISE Atlas images cover a specified coordinate.
33
-
*Download one of the identified images.
31
+
* Learn how to access IRSA's WISE AllWISE Atlas (L3a) coadded images via the Simple Image Access (SIA) service.
32
+
*Identify which of IRSA's AllWISE Atlas images cover a specified coordinate.
33
+
*Visualize one of the identified images using Firefly.
34
34
* Create and display a cutout of the downloaded image.
35
35
36
36
+++
@@ -41,51 +41,49 @@ The AllWISE program builds upon the work of the successful Wide-field Infrared S
41
41
42
42
https://irsa.ipac.caltech.edu/Missions/wise.html
43
43
44
-
The [NASA/IPAC Infrared Science Archive (IRSA)](https://irsa.ipac.caltech.edu) at Caltech is the archive for AllWISE images and catalogs. The AllWISE Atlas images that are the subject of this tutorial are made accessible via the [International Virtual Observatory Alliance (IVOA)](https://ivoa.net)[Simple Image Access (SIA)](https://wiki.ivoa.net/internal/IVOA/SiaInterface/SIA-V2-Analysis.pdf) protocol. IRSA's AllWISE SIA service is registered in the NASA Astronomical Virtual Observatory (NAVO) [Directory](https://vao.stsci.edu). Based on the registered information, the Python package [pyvo](https://pyvo.readthedocs.io) can be used to query the SEIP SIA service for a list of images that meet specified criteria, and standard Python libraries can be used to download and manipulate the images.
45
-
Other datasets at IRSA are available through other SIA services:
44
+
The [NASA/IPAC Infrared Science Archive (IRSA)](https://irsa.ipac.caltech.edu) at Caltech is the archive for AllWISE images and catalogs. The AllWISE Atlas images that are the subject of this tutorial are made accessible via the [International Virtual Observatory Alliance (IVOA)](https://ivoa.net)[Simple Image Access (SIA)](https://www.ivoa.net/documents/SIA/) protocol.
IRSA supports both SIA v1 and SIA v2 protocols. The version used depends on the specific dataset. This IRSA [website](https://irsa.ipac.caltech.edu/ibe/sia.html) provides information on which version each service uses and how to access them. Further information on how to access IRSA data with different techniques is available [here](https://irsa.ipac.caltech.edu/docs/program_interface/api_images.html). This tutorial uses SIA v2 for AllWISE Atlas images.
49
+
```
49
50
50
51
+++
51
52
52
53
## Imports
53
-
54
-
-`pyvo` for querying IRSA's AllWISE Atlas SIA service
54
+
-`numpy` for working with tables
55
55
-`astropy.coordinates` for defining coordinates
56
56
-`astropy.nddata` for creating an image cutout
57
57
-`astropy.wcs` for interpreting the World Coordinate System header keywords of a fits file
58
58
-`astropy.units` for attaching units to numbers passed to the SIA service
59
59
-`matplotlib.pyplot` for plotting
60
-
-`astropy.utils.data` for downloading files
61
60
-`astropy.io` to manipulate FITS files
61
+
-`firefly_client` for visualizing images
62
+
-`astroquery.ipac.irsa` for IRSA data access
63
+
-`astropy.visualization` for color stretch display
62
64
63
65
```{code-cell} ipython3
64
66
# Uncomment the next line to install dependencies if needed.
## Section 2 - Lookup and define a service for AllWISE Atlas images
95
+
## 2. Discover AllWISE Atlas images
98
96
99
97
+++
100
98
101
-
Start at STScI VAO Registry at https://vao.stsci.edu/keyword-search/
99
+
IRSA provides Simple Image Access (SIA) services for various datasets. A list of available datasets and their access URLs can be found [here](https://irsa.ipac.caltech.edu/ibe/sia.html).
100
+
This tutorial uses SIA v2 for AllWISE Atlas images.
101
+
To search for other datasets on SIA v2, try changing the filter string.
102
+
Or remove the filter keyword altogether to get a full list of available SIA v2 datasets at IRSA.
102
103
103
-
Limit by Publisher "NASA/IPAC Infrared Science Archive" and Capability Type "Simple Image Access Protocol" then search on "AllWISE Atlas"
104
-
105
-
Locate the SIA2 URL https://irsa.ipac.caltech.edu/ibe/sia/wise/allwise/p3am_cdd?
104
+
First we need to know the name of the dataset on the IRSA system.
Look at a list of the column names included in this table.
132
+
127
133
```{code-cell} ipython3
128
-
im_table.to_table().colnames
134
+
im_table.colnames
129
135
```
130
136
137
+
Look at the unique values in one of the columns.
138
+
131
139
```{code-cell} ipython3
132
-
im_table.to_table()['sia_bp_id']
140
+
print(np.unique(im_table['energy_bandpassname']))
133
141
```
134
142
135
-
## Section 4 - Locate and download an image of interest
143
+
## 4.Locate and visualize an image of interest
136
144
137
-
+++
145
+
We start by filtering the image results for the W3 band images.
146
+
Then look at the header of one of the resulting W3 band images of our target star.
147
+
Finally, we create an interactive FITS display of the W3 image(s) by [using Firefly](https://caltech-ipac.github.io/firefly_client/index.html), an open-source interactive visualization tool for astronomical data.
148
+
To understand how to open the Firefly viewer in a new tab from your Python notebook, refer to [this documentation](https://caltech-ipac.github.io/firefly_client/usage/initializing-vanilla.html) on how to initialize FireflyClient.
138
149
139
-
Let's search the image results for the W3 band image.
150
+
You can put the URL from the column "access_url" into a browser to download the file.
151
+
Or you can work with it in Python, as shown below.
140
152
141
153
```{code-cell} ipython3
142
-
for i in range(len(im_table)):
143
-
if im_table[i]['sia_bp_id'] == 'W3':
144
-
break
145
-
print(im_table[i].getdataurl())
154
+
w3_mask = im_table['energy_bandpassname'] == 'W3'
155
+
w3_table = im_table[w3_mask]
146
156
```
147
157
148
-
Download the image and open it in Astropy
158
+
Lets look at the access_url of the first one.
159
+
Then use Astropy to examine the header of the URL from the previous step,
**Runtime:** As of the date above, this notebook takes about 20 seconds to run to completion on a machine with 8GB RAM and 4 CPU.
224
+
This runtime is dependent on archive servers which means runtime will vary for users.
201
225
202
226
+++
203
227
204
-
Please include the following in any published material that makes use of the WISE data products:
228
+
## Citations
205
229
206
-
"This publication makes use of data products from the Wide-field Infrared Survey Explorer, which is a joint project of the University of California, Los Angeles, and the Jet Propulsion Laboratory/California Institute of Technology, funded by the National Aeronautics and Space Administration."
230
+
**Astropy:**
231
+
This work made use of [Astropy](http://www.astropy.org) a community-developed core Python package and an ecosystem of tools and resources for astronomy (Astropy Collaboration et al., 2013, Astropy Collaboration et al., 2018, Astropy Collaboration et al.,2022).
207
232
208
-
Please also cite the dataset Digital Object Identifier (DOI): [10.26131/IRSA153](https://www.ipac.caltech.edu/doi/irsa/10.26131/IRSA153)
233
+
**Astroquery:**
234
+
This work made use of [Astroquery](https://astroquery.readthedocs.io/en/latest/) a set of tools for querying astronomical web forms and databases (Ginsburg, Sipőcz, Brasseur et al 2019.).
209
235
210
-
```{code-cell} ipython3
211
-
212
-
```
236
+
**WISE:**
237
+
This publication makes use of data products from the Wide-field Infrared Survey Explorer, which is a joint project of the University of California, Los Angeles, and the Jet Propulsion Laboratory/California Institute of Technology, funded by the National Aeronautics and Space Administration."
238
+
Digital Object Identifier (DOI): [10.26131/IRSA153](https://www.ipac.caltech.edu/doi/irsa/10.26131/IRSA153)
0 commit comments