Skip to content

Commit b6e3763

Browse files
authored
Merge pull request #157 from Caltech-IPAC/spherex-psf-update
2 parents 03f995b + 914f52a commit b6e3763

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tutorials/spherex/spherex_psf.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ Each of the 121 PSFs is responsible for one of these zones.
166166
The PSF header therefore includes the center position of these zones as well as the width of the zones.
167167
These center coordinate are specified with `XCTR_i` and `YCTR_i`, respectively, where i = 1...121.
168168
The widths are specified with `XWID_i` and `YWID_i`, respectively, where again i = 1...121.
169-
The zones have equal widths and are arranged in an even grid.
170-
In principle, the zones can have any size, but this arrangement is enough to capture well the changes of the PSF size and structure with wavelength and spatial coordinates.
169+
The zones have approximately equal widths and are arranged in an even grid.
170+
The size of the zones is sufficient to capture well the changes of the PSF size and structure with wavelength and spatial coordinates.
171171

172172
The goal of this tutorial now is to find the PSF corresponding to our input coordinates of interest.
173173

@@ -234,10 +234,10 @@ for zone_id in xctr.keys():
234234
```
235235

236236
Once we have created this dictionary with zone pixel coordinates, we can simply search for the closest zone center to the coordinates of interest.
237-
For this we first add the distance between zone center coordinates and coordinates of interest to the table
237+
For this we first add the distance between zone center coordinates and coordinates of interest to the table. (Note that the x,y coordinates of the PSF zone centers are in 1,1 convention, therefore we have to subtract 1 pixels.)
238238

239239
```{code-cell} ipython3
240-
tab["distance"] = np.sqrt((tab["x"] - xpix_orig)**2 + (tab["y"] - ypix_orig)**2)
240+
tab["distance"] = np.sqrt((tab["x"]-1 - xpix_orig)**2 + (tab["y"]-1 - ypix_orig)**2)
241241
```
242242

243243
Then we can sort the table and pick the closest zone to coordinates of interest.
@@ -256,7 +256,7 @@ print(f"The PSF zone corresponding to coordinates of interest is {psf_cube_plane
256256
Now that we know which zone corresponds to coordinates of interest, we can extract it and plot it.
257257

258258
```{code-cell} ipython3
259-
psf = psfcube[psf_cube_plane]
259+
psf = psfcube[psf_cube_plane-1]
260260
261261
fig = plt.figure(figsize=(5, 5))
262262
ax1 = fig.add_subplot(1, 1, 1)

0 commit comments

Comments
 (0)