@@ -35,13 +35,13 @@ Euclid Q1 data were released on-premises at IPAC and in the cloud via Amazon Web
35
35
## 2. Imports
36
36
- ` s3fs ` for browsing S3 buckets
37
37
- ` astropy ` for handling coordinates, units, FITS I/O, tables, images, etc.
38
- - ` astroquery ` for querying Euclid data products from IRSA
38
+ - ` astroquery ` for querying Euclid data products from IRSA
39
39
- ` matplotlib ` for visualization
40
40
- ` json ` for decoding JSON strings
41
41
42
42
``` {code-cell} ipython3
43
43
# Uncomment the next line to install dependencies if needed.
44
- # !pip install s3fs astropy astroquery matploltib
44
+ # !pip install s3fs astropy astroquery>=0.4.10 matploltib
45
45
```
46
46
47
47
``` {code-cell} ipython3
@@ -104,17 +104,11 @@ coord = SkyCoord.from_name(target_name)
104
104
search_radius = 10 * u.arcsec
105
105
```
106
106
107
- List all Simple Image Access (SIA) collections for IRSA:
107
+ List all Simple Image Access (SIA) collections for IRSA with names containing "euclid" :
108
108
109
109
``` {code-cell} ipython3
110
- collections = Irsa.list_collections(servicetype='SIA')
111
- len(collections)
112
- ```
113
-
114
- Filter to only those containing "euclid":
115
-
116
- ``` {code-cell} ipython3
117
- collections[['euclid' in v for v in collections['collection']]]
110
+ collections = Irsa.list_collections(servicetype='SIA', filter='euclid')
111
+ collections
118
112
```
119
113
120
114
As per "Data Products Overview" in [ user guide] ( https://irsa.ipac.caltech.edu/data/Euclid/docs/euclid_archive_at_irsa_user_guide.pdf ) and above table, we identify that MER Mosiacs are available as the following collection:
@@ -126,7 +120,7 @@ img_collection = 'euclid_DpdMerBksMosaic'
126
120
Now query this collection for our target's coordinates and search radius:
127
121
128
122
``` {code-cell} ipython3
129
- img_tbl = Irsa.query_sia(pos=(coord, search_radius), collection=img_collection).to_table()
123
+ img_tbl = Irsa.query_sia(pos=(coord, search_radius), collection=img_collection)
130
124
img_tbl
131
125
```
132
126
@@ -182,9 +176,9 @@ for row in euclid_sci_img_tbl:
182
176
183
177
with fits.open(f's3://{s3_fpath}', fsspec_kwargs={"anon": True}) as hdul:
184
178
print(f'Retrieving cutout for {filter_name} ...')
185
- cutout = Cutout2D(hdul[0].section,
186
- position=coord,
187
- size=cutout_size,
179
+ cutout = Cutout2D(hdul[0].section,
180
+ position=coord,
181
+ size=cutout_size,
188
182
wcs=WCS(hdul[0].header))
189
183
cutouts.append(cutout)
190
184
filters.append(filter_name)
@@ -231,12 +225,8 @@ Once the catalogs are available as Parquet files in the cloud, we can efficientl
231
225
First, list the Euclid catalogs provided by IRSA:
232
226
233
227
``` {code-cell} ipython3
234
- catalogs = Irsa.list_catalogs(full=True).to_table()
235
- len(catalogs)
236
- ```
237
-
238
- ``` {code-cell} ipython3
239
- catalogs[['euclid' in v for v in catalogs['schema_name']]]
228
+ catalogs = Irsa.list_catalogs(full=True, filter='euclid')
229
+ catalogs
240
230
```
241
231
242
232
From this table, we can extract the MER catalog name. We also see several other interesting catalogs, let's also extract spectral file association catalog for retrieving spectra later.
0 commit comments