Centre the PSF-star box on a KDE peak of the FWHM preselection - #934
cailmdaley wants to merge 3 commits into
Conversation
mode() now returns the peak of a Gaussian kernel density estimate with a 0.1 px bandwidth, about the stellar-locus width, instead of an iterative histogram zoom whose bins depended on the sample's extremes and count. On 80 CCDs of exposures 2114045p and 2254826p the box centre's bootstrap spread drops from 0.03-0.04 px to 0.01 px, and adding or removing three objects at the preselection edges moves it by at most 0.003 px (0.24 px before). Small-N behaviour is unchanged: median below 20, -1 when empty. Closes #928 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NsPvmF43rzKrb5eYPNR3Ki
…ocus Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NsPvmF43rzKrb5eYPNR3Ki
|
We have no aspiration to byte for byte continuity with the public selection. we want to develop the most reasonable and a robust approach to creating the star box. so how is the original 0.2 pixel width set and why did we choose 0.1? and is there some way to choose this based on the data? please develop a reasonable approach to choosing the width (this is a decision for astra) |
The star box was mode +- 0.2 px for every CCD, a constant from the original 2019 SETools config (Guinot+22 quotes it as 0.04 arcsec). The locus width varies 0.06-0.26 px per CCD with seeing and focal-plane position, so the fixed box cut broad corner loci and was loose on sharp ones. stellar_locus() returns the KDE peak and the peak's half-maximum width as a Gaussian sigma with the 0.1 px kernel removed in quadrature; locus_width() exposes the width to SETools expressions. The box is now mode +- 3 * locus_width. k = 3 is where the next half-sigma shell stops adding mostly stars against the size-independent MU_MAX - MAG_AUTO star sequence on 79 CCDs (0.53 and 0.69 arcsec seeing): 98.9% / 89.1% of locus stars kept at 2.7% / 5.6% contamination, against 95.6% / 80.9% and 1.7% / 3.0% for +-0.2 px. The bandwidth stays fixed: tying it to each CCD's width lets galaxies pull peak and width away on poor-seeing CCDs. The star_selection_box decision gains the locus_scaled_box option as default, with the Guinot+22 box kept as mode_centred_box, and pins the bandwidth, floor and small-N threshold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019ELqMATt4MWS8TiVFrSLFA
|
The box is now ±3σ̂, where σ̂ is each CCD's measured locus width. It's recorded in
The extra contamination is mostly at 21–22 mag, where FWHM stops separating stars from galaxies even under the old box. I filed that as #935 (a faint limit for PSF stars) rather than shrinking k. The PR description has the full table. Claude Opus 5.5 on behalf of Cail |
Closes #928
What changes. The PSF-star box is now
mode ± 3·locus_width, measured on each CCD's preselected FWHM_IMAGE. It replaces a fixed ±0.2 px box around a histogram-zoom mode.stellar_locus()instr_handler.pyreturns two numbers. The mode is the peak of a Gaussian KDE with a 0.1 px bandwidth. The locus width is the peak's half-maximum width converted to a Gaussian σ, with the kernel removed in quadrature.Why.
Evidence. SExtractor on the 80 CCDs of 2114045p (0.53″ seeing) and 2254826p (0.69″). The truth set is the size-independent MU_MAX−MAG_AUTO star sequence at 18–20.5 mag, on 79 CCDs.
SEToolsrun matches the study replica on all 80 CCDs, and no CCD falls below the 22-star gate.Still open.
Record and tests.
star_selection_boxaddslocus_scaled_box(default) beside Guinot+22'smode_centred_box, and pinsLOCUS_BANDWIDTH,LOCUS_WIDTH_FLOORandLOCUS_MIN_SIZE.tests/unit/test_str_mode.py(95 tests) covers width recovery from 0.05 to 0.2 px, box proportionality, robustness to a galaxy tail, the guard against an adjacent bump, and the committed setools expression. Each of 8 injected bugs fails at least one test.astra validatepasses. A cross-family review (GPT) found no defects.Study, figures (
star_box_width.png,faint_and_spatial.png) and scripts:candide:/n17data/cdaley/scratch/fwhm-mode/width/.Claude Opus 5.5 on behalf of Cail
🤖 Generated with Claude Code