Skip to content

Commit 99babf5

Browse files
authored
Merge pull request #293 from Caltech-IPAC/fix_issue-289_Mar2026
Bug fix and update in calculation of PSF zones
2 parents 9097a68 + 98d369d commit 99babf5

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

tutorials/spherex/spherex_psf.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
---
2+
authors:
3+
- name: Vandana Desai
4+
- name: Jessica Krick
5+
- name: Andreas Faisst
6+
- name: "Brigitta Sipőcz"
7+
- name: Troy Raen
28
jupytext:
39
text_representation:
410
extension: .md
@@ -9,12 +15,6 @@ kernelspec:
915
display_name: Python 3 (ipykernel)
1016
language: python
1117
name: python3
12-
authors:
13-
- name: Vandana Desai
14-
- name: Jessica Krick
15-
- name: Andreas Faisst
16-
- name: Brigitta Sipőcz
17-
- name: Troy Raen
1818
---
1919

2020
# Understanding and Extracting the PSF Extension in a SPHEREx Cutout
@@ -576,10 +576,11 @@ for zone_id in xctr.keys():
576576
```
577577

578578
Once we have created this dictionary with zone pixel coordinates, we can simply search for the closest zone center to the coordinates of interest.
579-
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.)
579+
For this we first add the distance between zone center coordinates and coordinates of interest to the table.
580+
Note that the zone pixel center coordinates are 0-based, while their _names_ in the header (for example `XCTR_n`) are 1-based.
580581

581582
```{code-cell} ipython3
582-
tab["distance"] = np.sqrt((tab["x"]-1 - xpix_orig)**2 + (tab["y"]-1 - ypix_orig)**2)
583+
tab["distance"] = np.sqrt((tab["x"] - xpix_orig)**2 + (tab["y"] - ypix_orig)**2)
583584
```
584585

585586
Then we can sort the table and pick the closest zone to coordinates of interest.
@@ -630,8 +631,9 @@ To use this PSF for forward modeling or fitting, you must:
630631

631632
## About this notebook
632633

633-
**Updated:** 13 March 2026
634+
**Updated:** 25 March 2026
634635

635636
**Contact:** Contact [IRSA Helpdesk](https://irsa.ipac.caltech.edu/docs/help_desk.html) with questions or problems.
636637

637638
**Runtime:** Approximately 30 seconds.
639+

0 commit comments

Comments
 (0)