Skip to content

Commit fd339c7

Browse files
authored
Apply suggestions from code review
1 parent ca45e9c commit fd339c7

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

tutorials/euclid/Euclid_ERO.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ import matplotlib as mpl
9797
Next, we define some parameters for `Matplotlib` plotting.
9898

9999
```{code-cell} ipython3
100-
## 1. Plotting stuff
100+
# Plotting stuff
101101
mpl.rcParams['font.size'] = 14
102102
mpl.rcParams['axes.labelpad'] = 7
103103
mpl.rcParams['xtick.major.pad'] = 7
@@ -123,7 +123,7 @@ mpl.rcParams['hatch.linewidth'] = 1
123123
def_cols = plt.rcParams['axes.prop_cycle'].by_key()['color']
124124
```
125125

126-
## 2. Setting up the Environment
126+
## 1. Setting up the Environment
127127

128128
Next, we set up the environment. This includes
129129
* setting up an output data directory (will be created if it does not exist)
@@ -148,7 +148,7 @@ cutout_size = 1.5 * u.arcmin # cutout size
148148
coord = SkyCoord.from_name('NGC 6397')
149149
```
150150

151-
## 3. Search Euclid ERO Images
151+
## 2. Search Euclid ERO Images
152152

153153
Now, we search for the Euclid ERO images using the `astroquery` package.
154154
Note that the Euclid ERO images are no in the cloud currently, but we access them directly from IRSA using IRSA's *Simple Image Access* (SIA) methods.
@@ -227,7 +227,7 @@ Let's check out the summary table that we have created. We see that we have all
227227
summary_table
228228
```
229229

230-
## 4. Create Cutout Images
230+
## 3. Create Cutout Images
231231

232232
Now that we have a list of data products, we can create the cutouts. This is important as the full Euclid ERO images would be too large to run extraction and photometry software on them (they would simply fail due to memory issues).
233233

@@ -265,7 +265,7 @@ for ii,filt in tqdm(enumerate(filters)):
265265
hdu.header["FILTER"] = filt.upper()
266266
hdulcutout.append(hdu)
267267
268-
## 5. Save the HDUL cube:
268+
# Save the HDUL cube:
269269
hdulcutout.writeto("./data/euclid_images_test.fits", overwrite=True)
270270
```
271271

@@ -294,7 +294,7 @@ for ii,filt in enumerate(filters):
294294
plt.show()
295295
```
296296

297-
## 6. Extract Sources and Measure their Photometry on the VIS Image
297+
## 4. Extract Sources and Measure their Photometry on the VIS Image
298298

299299
Now that we have the images in memory (and on disk - but we do not need them, yet), we can measure the fluxes of the individual stars.
300300
Our simple photometry pipeline has different parts:
@@ -308,7 +308,7 @@ Our simple photometry pipeline has different parts:
308308
We start by extracting the sources using `sep`. We first isolate the data that we want to look at (the VIS image only).
309309

310310
```{code-cell} ipython3
311-
## 7. Get Data (this will be replaced later)
311+
# Get Data (this will be replaced later)
312312
img = hdulcutout["VIS_SCIENCE"].data
313313
hdr = hdulcutout["VIS_SCIENCE"].header
314314
img[img == 0] = np.nan
@@ -378,7 +378,7 @@ resimage = psfphot.make_residual_image(data = img-median, psf_shape = (9, 9))
378378
We now want to add the best-fit coordinates (R.A. and Decl.) to the VIS photometry catalog. For this, we have to convert the image coordinates into sky coordinates using the WCS information. We will need these coordinates because we want to use them as positional priors for the photometry measurement on the NISP images.
379379

380380
```{code-cell} ipython3
381-
## 8. Add coordinates to catalog
381+
# Add coordinates to catalog
382382
wcs1 = WCS(hdr) # VIS
383383
radec = wcs1.all_pix2world(phot["x_fit"],phot["y_fit"],0)
384384
phot["ra_fit"] = radec[0]
@@ -424,7 +424,7 @@ ax1.set_yscale('log')
424424
plt.show()
425425
```
426426

427-
## 9. Measure the Photometry on the NISP Images
427+
## 5. Measure the Photometry on the NISP Images
428428

429429
We now have the photometry and the position of sources on the VIS image. We can now proceed with similar steps on the NISP images. Because the NISP PSF and pixel scale are larger that those of the VIS images, we utilize the advantage of position prior-based forced photometry.
430430
For this, we use the positions of the VIS measurements and perform PSF fitting on the NISP image using these priors.
@@ -508,7 +508,7 @@ ax2.plot(phot2["x_fit"], phot2["y_fit"] , "o", markersize=8 , markeredgecolor="r
508508
plt.show()
509509
```
510510

511-
## 10. Load Gaia Catalog
511+
## 6. Load Gaia Catalog
512512

513513
We now load the Gaia sources at the location of the globular clusters. The goal is to compare the photometry of Gaia to the one derived above for the Euclid VIS and NISP images. This is scientifically useful, for example we can compute the colors of the stars in the Gaia optical bands and the Euclid near-IR bands.
514514
To search for Gaia sources, we use `astroquery` again.
@@ -563,7 +563,7 @@ ax2.set_title("NISP")
563563
plt.show()
564564
```
565565

566-
## 11. Match the Gaia Catalog to the VIS and NISP Catalogs
566+
## 7. Match the Gaia Catalog to the VIS and NISP Catalogs
567567

568568
Now, we match the Gaia source positions to the extracted sources in the VIS and NISP images.
569569

@@ -628,7 +628,7 @@ ax1.set_ylabel("I$_E$ [mag]")
628628
plt.show()
629629
```
630630

631-
## 12. Visualization with Firefly
631+
## 8. Visualization with Firefly
632632

633633
At the end of this Notebook, we demonstrate how we can visualize the images and catalogs created above in `Firefly`.
634634

0 commit comments

Comments
 (0)