You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Sad Catapella N6][Contract consistency] RGB Parameters.select permits invalid channel subsets that cannot round-trip through from_columns #50
Sad Catapella normalization Batch 6 at f784c95e3049483f87466150ffc5764375fa631d. Confirmed public-API inconsistency by source inspection; no repository test executed. This is distinct from #38 (fractional channel coercion) and #23 (allowed RGB dtypes).
Evidence
Parameters.select() lines 132–159 accepts a subset of any stored channel indices, without distinguishing RGB from fluorescence. A fitted three-channel rgb percentile 1-99.8 parameter set can become a one-channel RGB parameter object with channels=(2,).
tests/test_rgb.py lines 191–220 cover full RGB round trips and malformed subset columns, but never call select on RGB parameters.
Minimal deterministic repro
p = Parameters('rgb percentile 1-99.8','image','g',True,(1.,)*3,(4.,)*3); p.select([2]) currently returns an object that applies to one grayscale channel and serializes, but Parameters.from_columns(p.select([2]).to_columns(), NormalizationSettings(image_type='rgb')) raises an RGB column validation error.
Scientific impact / decision
RGB relies on one jointly fitted RGB normalization: leaving one RGB channel separated can be interpreted as a legitimate independent RGB patch, contrary to the consumer contract. Silent accept at one boundary and refusal at the next produces inconsistent run behavior.
Fix and acceptance
Prefer rejecting Parameters.select with a proper RGB-specific error when a strict subset of (0,1,2) is requested; allow selecting all channels unchanged. If the consortium explicitly wants post-fit RGB channel extraction, instead add a versioned, documented provenance distinction so serialization and consumers support it consistently—never silently coerce a subset back to a full RGB group. Add direct select, apply, to/from-columns, all-channel selection, fluorescence subset, CellPatcher cross-brick regression tests. Do not modify the shared-channel percentile algorithm. No Numba role.
Activity
Refuse RGB Parameters.select of a strict subset of R, G and B (#50)