Skip to content

fix(psf): deterministic star train/validation split; align tile STAR_THRESH with the 80% convention - #873

Open
cailmdaley wants to merge 1 commit into
developfrom
fix/psf-star-sample-determinism
Open

fix(psf): deterministic star train/validation split; align tile STAR_THRESH with the 80% convention#873
cailmdaley wants to merge 1 commit into
developfrom
fix/psf-star-sample-determinism

Conversation

@cailmdaley

Copy link
Copy Markdown
Contributor

Two small fixes to how the PSF star sample is built, found while auditing the scientific decisions embedded in the pipeline configs.

1. Seed the train/validation split. SETools._make_rand_split drew the 80/20 star split from unseeded np.random, so the star sample entering the PSF model — and everything downstream of it — differed between identical runs. The split is now a permutation seeded from the unit's file number: deterministic per CCD, independent of processing order, same philosophy as ngmix's SEED_FROM_POSITION. (This changes the realized split once — equivalent to one more random draw, now frozen.)

2. STAR_THRESH 20 → 22 in the tile PSF-interp configs. fdc8655 (2020) deliberately raised the per-CCD acceptance threshold to 22 to account for the 80% training split, but only in config_exp_psfex.ini (the validation pass). The tile configs that feed galaxies kept the stale 20, so the science path admits CCDs under the pre-split standard while validation gates at 22. We think the right fix is to align on 22.

Both change outputs slightly (a new frozen split; CCDs with 20–21 accepted stars now excluded, matching validation).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Jrs8TeTCccRMC45QVGKPeY

…THRESH with the 80% convention

The 80/20 star split drew from unseeded np.random, so the PSF star sample
differed between identical runs; it is now a permutation seeded from the
unit's file number (SEED_FROM_POSITION philosophy). The tile PSF-interp
configs kept the pre-split STAR_THRESH=20 that fdc8655 raised to 22 in the
validation config; align the science path on 22.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jrs8TeTCccRMC45QVGKPeY
cailmdaley added a commit that referenced this pull request Aug 29, 2026
#873 aligned the tile PSF-interp threshold with the 80/20 split convention
in example/cfis, the only place those configs exist on develop. This branch
carries a committed fork of that chain under workflow/config/cfis (#848 D2),
so the science path the Snakemake run actually reads kept the stale 20 after
the cherry-pick. Mirror it.

The general hazard: every science-config change landing against example/cfis
must be mirrored here until the two chains are unified.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VUNNyG8tw6Mdbvo4SVNrhp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant