@@ -35,13 +35,13 @@ Euclid Q1 data were released on-premises at IPAC and in the cloud via Amazon Web
3535## 2. Imports
3636- ` s3fs ` for browsing S3 buckets
3737- ` 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
3939- ` matplotlib ` for visualization
4040- ` json ` for decoding JSON strings
4141
4242``` {code-cell} ipython3
4343# 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
4545```
4646
4747``` {code-cell} ipython3
@@ -104,17 +104,11 @@ coord = SkyCoord.from_name(target_name)
104104search_radius = 10 * u.arcsec
105105```
106106
107- List all Simple Image Access (SIA) collections for IRSA:
107+ List all Simple Image Access (SIA) collections for IRSA with names containing "euclid" :
108108
109109``` {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
118112```
119113
120114As 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'
126120Now query this collection for our target's coordinates and search radius:
127121
128122``` {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)
130124img_tbl
131125```
132126
@@ -182,9 +176,9 @@ for row in euclid_sci_img_tbl:
182176
183177 with fits.open(f's3://{s3_fpath}', fsspec_kwargs={"anon": True}) as hdul:
184178 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,
188182 wcs=WCS(hdul[0].header))
189183 cutouts.append(cutout)
190184 filters.append(filter_name)
@@ -231,12 +225,8 @@ Once the catalogs are available as Parquet files in the cloud, we can efficientl
231225First, list the Euclid catalogs provided by IRSA:
232226
233227``` {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
240230```
241231
242232From 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