PSFEx native sampling leaves a g1 residual on sub-0.5″ exposures; PSF consumers assume PSF_SAMP = 1
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start with psfex_interp.py and the PSFExInterpolator.interpsfex entry point; inspect how it reads PSF_SAMP and find its existing tests. The proposed guard should reject sampling values other than 1, with a test that covers the rejection. Later sampling support and the bounded galaxy shear pilot require separate validation; completion criteria for those are not specified in the issue.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Claude Opus on behalf of Cail; investigation by GPT-6.1 Sol.
On the best-seeing exposures, PSFEx at native sampling (PSF_SAMPLING 1) leaves a coherent g1 residual. Our PSF consumers assume unit sampling, so the obvious config fix would silently break them.
The residual shows up at exposure level once the mean PSF FWHM is below ≈0.5″ (≈2.7 px). 286 of the 15,523 v2 validation exposures (1.8%) are that sharp; 2,504 (16%) are below 0.6″. Above ≈0.5″ the median residual is flat at zero, so a blanket seeing cut isn't warranted.

For one exposure, 2780860 (18BD97, 2 Sept 2022, 0.50″), against a same-region control at 0.70″:
- Production gives Δg1 = −4.0×10⁻³; the control gives −0.2×10⁻³. The rerun reproduces production's PSFEx basis exactly.
- PSFEx at 0.5-px sampling (101×101 model) gives −1.3×10⁻³ with centered validation stamps. Rendered at each validation star's sub-pixel phase, it gives −0.02 to +0.26×10⁻³, depending on the Lanczos kernel: consistent with zero.
- Phase-matching the native model alone brings it to −1.0 to −2.7×10⁻³ (kernel-dependent). On the control, all four conventions agree, so pixel phase matters only once the stars are undersampled.

Why PSF_SAMPLING 0 (auto) is not the fix: with SAMPLE_AUTOSELECT N, PSFEx assumes a nominal 6-px FWHM and picks 1.28 px per model pixel, which is coarser. And any sampling other than 1 breaks the consumers:
PSFExInterpolator.interpsfex(psfex_interp.py) returns the rawPSF_MASKgrid and ignoresPSF_SAMP.- PSF validation attaches the CCD's native WCS to that grid. On a 0.5-sampled model it measures ΔT/T = −0.75: twice the linear size, four times the area.
- The
galaxy_psfstore carries the array without sampling metadata, and ngmix'smake_ngmix_observationbuilds the PSF Jacobian from the image WCS.
Proposed:
- A guard, now:
psfex_interpraises ifPSF_SAMP ≠ 1, with a test. It protects every consumer until sampling is supported. - For run 2:
psfex_interpemits native-pixel effective-PSF stamps with an explicit centering convention. Then validate sampling 0.5 / size 101 as the candidate configuration. - For run 1: flag the sub-0.5″ exposures for diagnostics. Measure the galaxy shear bias on a bounded pilot (a few nights, paired ngmix fits) before any rerun. The galaxy-level effect is unmeasured; the star residual does not set it.
Possibly related: #956, a ~0.4% PSF size residual on P3 tiles, measured with phase-shifted models. Not the same measurement.
Report, data and reproduction: Nibi /scratch/cdaley/psf-undersampling/REPORT.md.
- Lenguaje dominante
- Python
- Estrellas
- 18
- Forks
- 14
- Merge medio
- 4 d 16 h
- PR fusionados (30 d)
- 35
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CosmoStat/shapepipe
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 2 días
-
PSF star selection needs a deep-sky-object veto: M33, M101, M13 and M92 enter the PSF star sampleAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 2 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Los mantenedores suelen responder en 2 días
Todos los issues de CosmoStat/shapepipe
Issues similares
-
Add `openai_safety_identifier`, the replacement for the `user` field that `openai_user` sendsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pydantic/pydantic-ai#12091 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Enhance blog readabilityAbiertoCSS enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pychess/pychess-variants#2448 ·
Los mantenedores suelen responder en 1 día
-
Bump locked PyTensor so Apple clang 21 does not pass -ld64Posiblemente ocupada @drbenvincent la tomó hoy. Abiertobug dev ops
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 2 días
-
ai_p2 bug comp-datalake
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
ClickHouse/ClickHouse#128306 · 1 comentario ·
Los mantenedores suelen responder en 1 día