Commit 413c5dd
refactor: route size conversions through cs_util.size
The Gaussian size conversions are now sourced from cs_util.size, the
single source of truth shared with sp_validation, instead of being
re-derived locally:
- ngmix.py get_noise window: np.sqrt(guess[4]/2) -> cs_size.T_to_sigma
(guess[4] is the ngmix area parameter T = 2 sigma^2; bit-exact).
- make_cat.py PSF_FWHM: galaxy.sigma_to_fwhm -> cs_size.sigma_to_fwhm
(bare conversion, no pixel_scale).
- utilities/galaxy.sigma_to_fwhm becomes a thin wrapper that keeps the
pixel_scale rescaling and ShapePipe input validation but delegates
the bare 2*sqrt(2 ln 2) factor to cs_util.size; this preserves its
second caller (spread_model.py, which uses pixel_scale) and the
test_utilities contract. Matches the old hard-coded 2.35482004503
constant to <1e-11 relative.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent dfac162 commit 413c5dd
3 files changed
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | | - | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
728 | | - | |
| 728 | + | |
729 | 729 | | |
730 | 730 | | |
731 | 731 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
970 | 971 | | |
971 | 972 | | |
972 | 973 | | |
973 | | - | |
| 974 | + | |
974 | 975 | | |
975 | 976 | | |
976 | 977 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| |||
89 | 95 | | |
90 | 96 | | |
91 | 97 | | |
92 | | - | |
93 | | - | |
94 | | - | |
| 98 | + | |
0 commit comments