Skip to content

Commit a48b982

Browse files
committed
MAINT: fixing up some heading level inconsistencies and other heading and note cleanups
1 parent b495de0 commit a48b982

File tree

1 file changed

+24
-17
lines changed

1 file changed

+24
-17
lines changed

tutorials/euclid_access/4_Euclid_intro_PHZ_catalog.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ kernelspec:
1111
name: python3
1212
---
1313

14-
# Euclid Quick Release 1: PHZ catalog matching to MER images
14+
# Introduction to Euclid Q1 PHZ catalog
1515

1616
+++
1717

@@ -69,8 +69,6 @@ from firefly_client import FireflyClient
6969
import pyvo as vo
7070
```
7171

72-
# Introduction to Euclid Q1 PHZ catalog
73-
7472
+++
7573

7674
## 1. Find the MER Tile ID that corresponds to a given RA and Dec
@@ -110,7 +108,7 @@ df_im_euclid=df_im_irsa[ (df_im_irsa['dataproduct_subtype']=='science') & (df_i
110108
df_im_euclid.head()
111109
```
112110

113-
## Choose the VIS image and pull the filename and tileID
111+
Choose the VIS image and pull the filename and tileID
114112

115113
```{code-cell} ipython3
116114
filename=df_im_euclid[df_im_euclid['energy_bandpassname']=='VIS']['access_url'].to_list()[0]
@@ -119,7 +117,7 @@ tileID=re.search(r'TILE\s*(\d{9})', filename).group(1)
119117
print('The MER tile ID for this object is :',tileID)
120118
```
121119

122-
## 2. Download PHZ catalog from IRSA directly to this notebook
120+
## 2. Download PHZ catalog from IRSA
123121

124122
```{code-cell} ipython3
125123
## Use IRSA to search for catalogs
@@ -141,6 +139,7 @@ table_1dspectra= 'euclid.objectid_spectrafile_association_q1'
141139
```
142140

143141
### Learn some information about the table:
142+
144143
- How many columns are there?
145144
- List the column names
146145

@@ -154,21 +153,25 @@ for col in columns:
154153
print(f'{f"{col.name}":30s} {col.unit} {col.description}') ## Currently no descriptions
155154
```
156155

157-
## Note that the phz catalog contains 67 columns, below are a few highlights:
156+
The PHZ catalog contains 67 columns, below are a few highlights:
158157

159158
- object_id
160159
- flux_vis_unif, flux_y_unif, flux_j_unif, flux_h_unif
161160
- median redshift (phz_median)
162161
- phz_classification
163162
- phz_90_int1, phz_90_int2 (The phz PDF interval containing 90% of the probability, upper and lower values)
164163

165-
We note that the phz_catalog on IRSA has more columns than it does on the ESA archive. This is because the ESA catalog stores some information in one column (for example, phz_90_int is stored as [lower, upper], rather than in two separate columns)
164+
```{note}
165+
The phz_catalog on IRSA has more columns than it does on the ESA archive.
166+
This is because the ESA catalog stores some information in one column (for example, phz_90_int is stored as [lower, upper], rather than in two separate columns).
166167
167-
The fluxes are different from the fluxes derived in the MER catalog. The _unif fluxes are: "Unified flux recomputed after correction from galactic extinction and filter shifts"
168+
The fluxes are different from the fluxes derived in the MER catalog.
169+
The _unif fluxes are: "Unified flux recomputed after correction from galactic extinction and filter shifts".
170+
```
168171

169172
+++
170173

171-
## Find some galaxies between 1.4 and 1.6 at a selected RA and Dec
174+
### Find some galaxies between 1.4 and 1.6 at a selected RA and Dec
172175

173176
We specify the following conditions on our search:
174177
- We select just the galaxies where the flux is greater than zero, to ensure the appear in all four of the Euclid MER images.
@@ -179,7 +182,7 @@ We specify the following conditions on our search:
179182

180183
+++
181184

182-
### Search based on tileID
185+
Search based on ``tileID``:
183186

184187
```{code-cell} ipython3
185188
adql = f"SELECT DISTINCT mer.object_id,mer.ra, mer.dec, phz.flux_vis_unif, phz.flux_y_unif, \
@@ -212,21 +215,24 @@ df_g_irsa.head()
212215

213216
## 3. Read in the MER image from IRSA directly
214217

218+
215219
```{code-cell} ipython3
216220
print(filename)
217221
```
218222

219-
```{code-cell} ipython3
220-
##Download the MER image -- note this file is about 1.46 GB
223+
Download the MER image -- note this file is about 1.46 GB
221224

225+
```{code-cell} ipython3
222226
fname = download_file(filename, cache=True)
223227
hdu_mer_irsa = fits.open(fname)
224228
head_mer_irsa = hdu_mer_irsa[0].header
225229
226230
print(hdu_mer_irsa.info())
227231
```
228232

229-
#### Now you've downloaded this large file, if you would like to save it to disk, uncomment the following cell
233+
```{tip}
234+
Now you've downloaded this large file, if you would like to save it to disk, uncomment the following cell
235+
```
230236

231237
```{code-cell} ipython3
232238
# download_path='/yourlocalpath/'
@@ -258,7 +264,7 @@ df_g_irsa['y_pix']=xy_irsa[1]
258264
df_g_irsa
259265
```
260266

261-
## Pull the spectra on the top brightest source based on object ID
267+
Pull the spectra on the top brightest source based on object ID
262268

263269
```{code-cell} ipython3
264270
df_g_irsa_sort=df_g_irsa.sort_values(by='flux_vis_unif',ascending=False)
@@ -303,6 +309,7 @@ with fits.open(BytesIO(response.content), memmap=True) as hdul:
303309
```
304310

305311
```{code-cell} ipython3
312+
306313
## Now the data are read in, show an image
307314
308315
plt.plot(df_obj_irsa['WAVELENGTH'], df_obj_irsa['SIGNAL'])
@@ -313,7 +320,7 @@ plt.ylabel('Flux (erg / (Angstrom s cm2))')
313320
plt.title('Object ID is '+str(obj_id))
314321
```
315322

316-
## Lets cut out a very small patch of the MER image to see what this galaxy looks like
323+
Let's cut out a very small patch of the MER image to see what this galaxy looks like
317324

318325
```{code-cell} ipython3
319326
## How large do you want the image cutout to be?
@@ -326,7 +333,7 @@ dec = df_g_irsa[df_g_irsa['object_id']==obj_id]['dec'].iloc[0]
326333
coords_cutout = SkyCoord(ra, dec, unit=(u.deg,u.deg), frame='icrs')
327334
```
328335

329-
### Use fsspec to download a cutout of the fits file
336+
Use ``fsspec`` to obtain a cutout of the fits file
330337

331338
```{code-cell} ipython3
332339
hdu = fits.open(filename, use_fsspec=True)
@@ -352,7 +359,7 @@ plt.imshow(new_hdu.data, cmap='gray', origin='lower',
352359
colorbar = plt.colorbar()
353360
```
354361

355-
# 5. Load the image on Firefly to be able to interact with the data directly
362+
## 5. Load the image on Firefly to be able to interact with the data directly
356363

357364
+++
358365

0 commit comments

Comments
 (0)