feat: polynomial vignetting, saturation, and chromatic vignetting corrections#871
Open
alextudorica wants to merge 6 commits into
Open
Conversation
…rk/fix-save_frame-disabled Fix save_frames disabled when absent from config bug
… corrections Extend the photometric calibration pipeline with three optional corrections that together reduce per-star scatter from 0.60 to 0.36 mag (40% improvement, cross-validated on 1.5M stars across 24 cameras): 1. Polynomial vignetting residual (r^2 + r^4) on top of cos^4, capturing higher-order vignetting the current model cannot fit (27% scatter reduction) 2. Saturation correction for bright stars (mag < break), compensating for flux clipping at the ADC ceiling during calibration star matching 3. Chromatic vignetting (position-dependent color term), stored in Platepar but not yet wired into pipeline callers (requires star colors from catalog) All corrections default to zero, preserving existing behavior for platepars without calibrated coefficients. New Platepar fields: vignetting_poly, saturation_slope, saturation_mag_break, chromatic_vignetting -- all with backward-compatible migration in loadFromDict. Pipeline callers wired: xyToRaDecPP, ApplyRecalibrate, SkyFit2, CalibrationReport, EventMonitor. The sigma-rejection loop in photometryFitRobust keeps per-star correction arrays in sync when outliers are removed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Motivation
Analysis of 1,455,601 matched stars across 24 cameras (287 camera-nights) shows:
The current cos^4 vignetting model leaves 0.30-0.60 mag of residual structure. A simple r^2 + r^4 polynomial captures this. Bright stars (mag < 5) show 0.1-0.3 mag saturation bias from ADC clipping. Chromatic vignetting (color term varying with FOV position) is a smaller effect (~0.05 mag) stored in Platepar but deferred for pipeline wiring (requires star colors from catalog).
Changes
Prerelease compatibility
Verified against prerelease branch: zero merge conflicts. The prerelease SkyFit2 band-ratio grid search has additional photometryFit calls that intentionally use default (no-correction) params -- the corrections are fixed per-camera and do not affect which band ratio minimizes scatter.