ngmix PSF fitter: drop the galaxy prior, adopt a metadetect-style dedicated PSF fit
Maintainers usually reply within 5 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Inspect the ngmix module's current shared fitter setup, then compare it with metadetect's get_gauss_psf_runner in fitting.py. Done means the PSF uses its own gauss fitter with no galaxy prior and a moments-based guesser, while the galaxy fitter remains unchanged.
Written by the indexing model from the issue text.
Description
Longer-term follow-up to #749. The ngmix module fits the PSF with model="gauss" but using the galaxy shape prior, so the PSF fit is partly prior-driven (the #749 concern). The acute problem is mitigated by giving the PSF fit a proper weight map, and the prior — in Axel's words — "is not ideal but not completely wrong," so this is not a merge blocker. The clean fix is a dedicated PSF fitter that doesn't borrow the galaxy prior at all.
Axel's suggestion (#749 comment):
The prior is not ideal to fit the PSF but it is not completely wrong either. I would put that as a lower priority given that it still works and simplify things. Otherwise you can define a better PSF fitter like they do in metadetect here.
What metadetect does there (get_gauss_psf_runner): a gauss Fitter with no prior, paired with a SimplePSFGuesser(guess_from_moms=True) that initializes from the PSF's own adaptive moments — distinct from the galaxy fitter (get_gauss_obj_runner), which is the one that carries the prior. The PSF and galaxy fits are deliberately separate, and the PSF fit never sees the galaxy prior.
Improvement: give the ngmix module its own PSF fitter on the same pattern — model="gauss", no galaxy prior, a moments-based guesser — replacing the current shared-prior setup.
Priority: low (post-ngmix-v2.0; not blocking the merge).
— Claude on behalf of Cail
- Dominant language
- Python
- Stars
- 18
- Forks
- 14
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 11
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CosmoStat/shapepipe
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 5 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 5 days
-
One ShapePipe workflow for data and image simsPossibly taken @martinkilbinger claimed this 13 days ago. Open
CosmoStat/shapepipe#891 · 1 comment · 2 assignees ·
Maintainers usually reply within 5 days
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
Maintainers usually reply within 5 days
-
Weighted vs unweighted m-bias disagree in the latest image-sim runsPossibly taken @martinkilbinger claimed this 17 days ago. Open
CosmoStat/shapepipe#885 · 4 comments · 2 assignees ·
Maintainers usually reply within 5 days
All issues in CosmoStat/shapepipe
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
gradio-app/gradio#13895 ·
Maintainers usually reply within 1 day
-
build-error
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
spack/spack-packages#6713 ·
Maintainers usually reply within 1 day
-
Use issue templatesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ActivityWatch/activitywatch#1464 · 1 reaction ·
Maintainers usually reply within 1 day
-
[Bug]: The ckg tool drops the return type of every decorated Python method in class search resultsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bytedance/trae-agent#483 ·
Maintainers usually reply within 1 day