Skip to content

Commit f796809

Browse files
committed
MAINT: removing dev notes
1 parent 4802690 commit f796809

File tree

1 file changed

+16
-32
lines changed

1 file changed

+16
-32
lines changed

tutorials/euclid_access/4_Euclid_intro_PHZ_catalog.md

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ kernelspec:
1919

2020
+++
2121

22-
By the end of this tutorial, you will:
22+
By the end of this tutorial, you will:
2323
- Understand the basic characteristics of Euclid Q1 photo-z catalog and how to match it with MER mosaics.
2424
- Understand what PHZ catalogs are available and how to view the columns in those catalogs.
2525
- How to query with ADQL in the PHZ catalog to find galaxies between a redshift of 1.4 and 1.6.
@@ -89,13 +89,13 @@ coord = SkyCoord(ra, dec, unit='deg', frame='icrs')
8989
This searches specifically in the euclid_DpdMerBksMosaic "collection" which is the MER images and catalogs.
9090

9191
```{code-cell} ipython3
92-
irsa_service= vo.dal.sia2.SIA2Service('https://irsadev.ipac.caltech.edu/SIA')
92+
irsa_service= vo.dal.sia2.SIA2Service('https://irsa.ipac.caltech.edu/SIA')
9393
9494
image_table = irsa_service.search(pos=(coord, search_radius), collection='euclid_DpdMerBksMosaic').to_table()
9595
```
9696

9797
```{note}
98-
This table lists all MER mosaic images available in this position. These mosaics include the Euclid VIS, Y, J, H images, as well as ground-based telescopes which have been put on the same pixel scale. For more information, see the [Euclid documentation at IPAC](https://euclid.caltech.edu/page/euclid-faq-tech/).
98+
This table lists all MER mosaic images available in this position. These mosaics include the Euclid VIS, Y, J, H images, as well as ground-based telescopes which have been put on the same pixel scale. For more information, see the [Euclid documentation at IPAC](https://euclid.caltech.edu/page/euclid-faq-tech/).
9999
```
100100

101101
```{code-cell} ipython3
@@ -123,14 +123,14 @@ print('The MER tile ID for this object is :',tileID)
123123
```{code-cell} ipython3
124124
## Use IRSA to search for catalogs
125125
126-
service = vo.dal.TAPService("https://irsadev.ipac.caltech.edu/TAP")
126+
service = vo.dal.TAPService("https://irsa.ipac.caltech.edu/TAP")
127127
128128
129-
## Search for all tables in IRSA labled as euclid_q1
129+
## Search for all tables in IRSA labled as euclid_q1
130130
tables = service.tables
131131
for tablename in tables.keys():
132132
if "tap_schema" not in tablename and "euclid_q1" in tablename:
133-
tables[tablename].describe()
133+
tables[tablename].describe()
134134
```
135135

136136
```{code-cell} ipython3
@@ -169,7 +169,7 @@ The fluxes are different from the fluxes derived in the MER catalog. The _unif f
169169

170170
## Find some galaxies between 1.4 and 1.6 at a selected RA and Dec
171171

172-
We specify the following conditions on our search:
172+
We specify the following conditions on our search:
173173
- We select just the galaxies where the flux is greater than zero, to ensure the appear in all four of the Euclid MER images.
174174
- Select only objects in a circle (search radius selected below) around our selected RA and Dec
175175
- phz_classification =2 means we select only galaxies
@@ -215,26 +215,10 @@ df_g_irsa.head()
215215
print(filename)
216216
```
217217

218-
```{code-cell} ipython3
219-
######### TEMP
220-
######## Note to testers, for now we need to replace the irsa.ipac.caltech.edu url with irsadev
221-
######## This will not be the same after the data are made public so this cell will be deleted at that time
222-
def add_dev_to_domain(domain):
223-
parts = domain.split('.', 1) # Split at the first dot
224-
if len(parts) == 2:
225-
return f"{parts[0]}dev.{parts[1]}"
226-
return domain
227-
228-
filename_dev = add_dev_to_domain(filename)
229-
print(filename_dev)
230-
231-
#####################
232-
```
233-
234218
```{code-cell} ipython3
235219
##Download the MER image -- note this file is about 1.46 GB
236220
237-
fname = download_file(filename_dev, cache=True)
221+
fname = download_file(filename, cache=True)
238222
hdu_mer_irsa = fits.open(fname)
239223
head_mer_irsa = hdu_mer_irsa[0].header
240224
@@ -257,7 +241,7 @@ im_mer_irsa=hdu_mer_irsa[0].data
257241
```{code-cell} ipython3
258242
## Plot a quick simple plot to show the full MER image, large FOV!
259243
260-
plt.imshow(im_mer_irsa, cmap='gray', origin='lower',
244+
plt.imshow(im_mer_irsa, cmap='gray', origin='lower',
261245
norm=ImageNormalize(im_mer_irsa, interval=PercentileInterval(99.9), stretch=AsinhStretch()))
262246
colorbar = plt.colorbar()
263247
```
@@ -284,7 +268,7 @@ df_g_irsa['y_pix']=xy_irsa[1]
284268
```
285269

286270
```{code-cell} ipython3
287-
## Save the dataframe as a csv
271+
## Save the dataframe as a csv
288272
# df_g_irsa.to_csv("./df_table_irsa.csv", index=False)
289273
```
290274

@@ -293,7 +277,7 @@ df_g_irsa
293277
```
294278

295279
```{code-cell} ipython3
296-
## Plot MER catalog sources on the Euclid VIS image
280+
## Plot MER catalog sources on the Euclid VIS image
297281
298282
plt.imshow(im_mer_irsa, cmap='gray', origin='lower', norm=ImageNormalize(im_mer_irsa, interval=PercentileInterval(99.9), stretch=LogStretch()))
299283
colorbar = plt.colorbar()
@@ -316,7 +300,7 @@ df_g_irsa_sort[0:3]
316300
```{code-cell} ipython3
317301
obj_id=df_g_irsa_sort['object_id'].iloc[1]
318302
319-
## Pull the data on these objects
303+
## Pull the data on these objects
320304
adql_object = f"SELECT * \
321305
FROM {table_1dspectra} \
322306
WHERE objectid = {obj_id} \
@@ -330,7 +314,7 @@ df2
330314

331315
```{code-cell} ipython3
332316
## Create the full filename/url
333-
irsa_url='https://irsadev.ipac.caltech.edu/'
317+
irsa_url='https://irsa.ipac.caltech.edu/'
334318
335319
file_url=irsa_url+df2['uri'].iloc[0]
336320
file_url
@@ -378,7 +362,7 @@ coords_cutout = SkyCoord(ra, dec, unit=(u.deg,u.deg), frame='icrs')
378362
### Use fsspec to download a cutout of the fits file
379363

380364
```{code-cell} ipython3
381-
hdu = fits.open(filename_dev, use_fsspec=True)
365+
hdu = fits.open(filename, use_fsspec=True)
382366
383367
header = hdu[0].header
384368
```
@@ -396,7 +380,7 @@ new_hdu.header.update(cutout_data.wcs.to_header())
396380
```{code-cell} ipython3
397381
## Plot a quick simple plot to show the cutout on the galaxy
398382
399-
plt.imshow(new_hdu.data, cmap='gray', origin='lower',
383+
plt.imshow(new_hdu.data, cmap='gray', origin='lower',
400384
norm=ImageNormalize(im_mer_irsa, interval=PercentileInterval(99.9), stretch=AsinhStretch()))
401385
colorbar = plt.colorbar()
402386
```
@@ -425,7 +409,7 @@ Note this can take a while to upload the full MER image.
425409
```{code-cell} ipython3
426410
fc = FireflyClient.make_client('https://irsa.ipac.caltech.edu/irsaviewer')
427411
428-
fc.show_fits(url=filename_dev)
412+
fc.show_fits(url=filename)
429413
430414
fc.align_images(lock_match=True)
431415
```

0 commit comments

Comments
 (0)