Skip to content

Commit d15333b

Browse files
committed
fixing coord
1 parent 0add399 commit d15333b

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

tutorials/euclid_access/Euclid_ERO.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Exploring Star Clusters in the Euclid ERO Data
33
***
44

5-
## Learning Goals
5+
## Learning Goals
66
By the end of this tutorial, you will be able to:
77

88
• Access the Euclid ERO images using `astroquery`
@@ -15,7 +15,7 @@ By the end of this tutorial, you will be able to:
1515

1616
• Visualize the Euclid ERO image and the Gaia catalog in `Firefly`
1717

18-
18+
1919
## Introduction
2020
Euclid is a European Space Agency (ESA) space mission with NASA participation, to study the geometry and nature of the dark Universe. As part of its first observations, Euclid publicly released so-called *Early Release Observations* (ERO) targeting some press-worthy targets on the sky such as star clusters or local galaxies.
2121

@@ -138,7 +138,7 @@ Note that the Euclid ERO images are no in the cloud currently, but we access the
138138

139139
**Note:** The following only works for combined images (either extended or point source stacks). This would not work if there are multiple, let's say, H-band images of Euclid at a given position. Therefore, no time domain studies here (which is anyway not one of the main goals of Euclid).
140140

141-
The IRSA SIA products can be listed via
141+
The IRSA SIA products can be listed via
142142
```
143143
Irsa.list_collections(servicetype='SIA')
144144
```
@@ -230,7 +230,7 @@ for ii,filt in tqdm(enumerate(filters)):
230230

231231
with fits.open(image_tab['access_url'][sel[0]], use_fsspec=True) as hdul:
232232
tmp = Cutout2D(hdul[0].section, position=coord, size=cutout_size, wcs=WCS(hdul[0].header)) # create cutout
233-
233+
234234

235235
if (product == "science") & (ii == 0): # if science image, then create a new hdu.
236236
hdu0 = fits.PrimaryHDU(data = tmp.data, header=hdul[0].header)
@@ -304,8 +304,8 @@ mask = np.isnan(img)
304304
Next, we compute the background statistics what will be used by `sep` to extract the sources above a certain threshold.
305305

306306
```python
307-
mean, median, std = sigma_clipped_stats(img, sigma=3.0)
308-
print(np.array((mean, median, std)))
307+
mean, median, std = sigma_clipped_stats(img, sigma=3.0)
308+
print(np.array((mean, median, std)))
309309
```
310310

311311
Finally, we perform object detection with `sep`. There are also modules in `photutils` to do that, however, we found that `sep` works best here. We output the number of objects found on the image.
@@ -323,7 +323,7 @@ flux, fluxerr, flag = sep.sum_circle(img-median, objects['x'], objects['y'],r=3.
323323

324324
Now, we use the `photutils` Python package to perform PSF fitting. Here we assume a simple Gaussian with a FWHM given by `psf_fwhm` as PSF.
325325

326-
**Note:** We use a Gaussian PSF here for simplicity. The photometry can be improved by using a pixelated PSF measured directly from the Euclid images (for example by stacking stars).
326+
**Note:** We use a Gaussian PSF here for simplicity. The photometry can be improved by using a pixelated PSF measured directly from the Euclid images (for example by stacking stars).
327327

328328
```python
329329
psf_fwhm = 0.16 # PSF FWHM in arcsec
@@ -407,7 +407,7 @@ plt.show()
407407

408408
## Measure the Photometry on the NISP Images
409409

410-
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.
410+
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.
411411
For this, we use the positions of the VIS measurements and perform PSF fitting on the NISP image using these priors.
412412

413413
The steps below are almost identical to the ones applied to the VIS images.
@@ -430,8 +430,8 @@ mask2 = np.isnan(img2)
430430
... and we also get some statistics on the sky background.
431431

432432
```python
433-
mean2, median2, std2 = sigma_clipped_stats(img2, sigma=3.0)
434-
print(np.array((mean2, median2, std2)))
433+
mean2, median2, std2 = sigma_clipped_stats(img2, sigma=3.0)
434+
print(np.array((mean2, median2, std2)))
435435
```
436436

437437
Now, we need to obtain the (x,y) image coordinates on the NISP image that correspond to the extracted sources on the VIS image. We use the WCS information from the NISP image for this case and apply it to the sky coordinates obtained on the VIS image.
@@ -502,7 +502,6 @@ Gaia.ROW_LIMIT = -1
502502
Next, we request the Gaia catalog around the position of the globular cluster. We use the same size as the cutout size.
503503

504504
```python
505-
coord = SkyCoord(ra=ra, dec=dec, unit=(u.degree, u.degree), frame='icrs')
506505
gaia_objects = Gaia.query_object_async(coordinate=coord, radius = cutout_size/2)
507506
print("Number of Gaia stars found: {}".format(len(gaia_objects)))
508507
```
@@ -620,7 +619,7 @@ The following line will open a new `Firefly` GUI in a separate tab **inside** th
620619
# Uncomment when using within Jupyter Lab with jupyter_firefly_extensions installed
621620
# fc = FireflyClient.make_lab_client()
622621

623-
# Uncomment for contexts other than the above
622+
# Uncomment for contexts other than the above
624623
fc = FireflyClient.make_client(url="https://irsa.ipac.caltech.edu/irsaviewer")
625624
```
626625

0 commit comments

Comments
 (0)