feat(util): GATNoiseProfile — Poisson–Gaussian noise estimator (design + plan) - #176
Draft
Xander-git wants to merge 2 commits into
Draft
Xander-git wants to merge 2 commits into
Xander-git wants to merge 2 commits into
Conversation
Fitted profile in util/ estimating GAT (gain, mu, read_sigma) from one or pooled images; scalar gray/detect_mat modes plus per-channel linear-light rgb mode for CBM3D; extends ColorDenoise to consume per-channel params. ColorCheckerProfile move to util deferred to a later PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B36TYF2QFiCxVEHttg6h7M
Bite-sized TDD tasks: util skeleton + io constant, NLF fit math, patch extraction, scalar fit, per-channel rgb fit, gat_params/configure, JSON round-trip, dashboard, ColorDenoise per-channel params, lint/type/docs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B36TYF2QFiCxVEHttg6h7M
Xander-git
marked this pull request as ready for review
July 1, 2026 21:37
Xander-git
marked this pull request as draft
July 1, 2026 21:37
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
Design spec + implementation plan for
GATNoiseProfile, a fitted Poisson–Gaussian noise estimator inphenotypic.utilthat produces GAT parameters(gain, mu, read_sigma)for the existing GAT-aware denoisers. Docs only so far — implementation to follow (draft).The repo already applies the GAT (
sdk_/_anscombe.py,_GATSupportMixin,ColorDenoise) but the params default to a neutral 1/0/0 "blank" that users must hand-set. This adds a data-driven estimator.What's here
docs/superpowers/specs/2026-06-30-gat-noise-profile-design.md— design specdocs/superpowers/plans/2026-06-30-gat-noise-profile.md— 10 TDD implementation tasksDesign highlights
ColorCheckerProfile(fit → serialize → dashboard), outside the ImageOperation/pipeline framework, living inutil/(it produces params, it is not a corrector).Var = gain·mean + bover weakly-textured local windows, pooled across one or many images; slope → gain, intercept → read_sigma.gray/detect_mat(scalar) andrgb(per-channel, linear-light) for CBM3D — grounded in the per-channel VST → opponent-transform ordering (Foi 2008; Mäkitalo & Foi 2013; Dabov et al. 2007).dark_roi/dark_mask(no genuine photon≈0 zones in these plates), else a flagged prior.gat_params()/configure(op); extendsColorDenoiseto accept per-channel params (no_anscombe.pychange — it already broadcasts).Deferred / out of scope
None-sentinel auto-estimation, auto dark-region discovery.ColorCheckerProfileintoutil/— separate PR (large blast radius).Status
Draft — implementation of the 10-task plan is pending.
🤖 Generated with Claude Code