Skip to content

Commit 914f52a

Browse files
authored
Refine PSF zone descriptions and distance calculation
Clarified the description of zone sizes and their arrangement in the PSF header. Updated the explanation for calculating distances to zone centers (subtract 1 from the PSF cutout centers).
1 parent b73277a commit 914f52a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tutorials/spherex/spherex_psf.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ Each of the 121 PSFs is responsible for one of these zones.
161161
The PSF header therefore includes the center position of these zones as well as the width of the zones.
162162
These center coordinate are specified with `XCTR_i` and `YCTR_i`, respectively, where i = 1...121.
163163
The widths are specified with `XWID_i` and `YWID_i`, respectively, where again i = 1...121.
164-
The zones have equal widths and are arranged in an even grid.
165-
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.
164+
The zones have approximately equal widths and are arranged in an even grid.
165+
The size of the zones is sufficient to capture well the changes of the PSF size and structure with wavelength and spatial coordinates.
166166

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

@@ -229,10 +229,10 @@ for zone_id in xctr.keys():
229229
```
230230

231231
Once we have created this dictionary with zone pixel coordinates, we can simply search for the closest zone center to the coordinates of interest.
232-
For this we first add the distance between zone center coordinates and coordinates of interest to the table
232+
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.)
233233

234234
```{code-cell} ipython3
235-
tab["distance"] = np.sqrt((tab["x"] - xpix_orig)**2 + (tab["y"] - ypix_orig)**2)
235+
tab["distance"] = np.sqrt((tab["x"]-1 - xpix_orig)**2 + (tab["y"]-1 - ypix_orig)**2)
236236
```
237237

238238
Then we can sort the table and pick the closest zone to coordinates of interest.

0 commit comments

Comments
 (0)