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 N7][Scientific QC] Inconsistent ImageSummary channel dimensions can omit repeat checks or raise IndexError #56
Normalization Batch 7, f784c95e3049483f87466150ffc5764375fa631d. Confirmed unchecked public input dimensions and control-flow inconsistency, distinct from #23 (RGB type contract) and #44 (plane coordinates). No tests executed.
Evidence
ImageSummary is a public dataclass with no __post_init__: the median, p_low, p_high, saturated_fraction, and exact tuples can have different lengths, and the declared dtype/fractions can be inappropriate.
_repeat_shifts() lines 229–249 iterates range(summaries[0].channel_count) for all repeats and indexes s.median[channel]. If the first summary has one channel but later repeats have two, C1 repeat-shift QC is silently omitted. If the first has two and a later repeat has one, it may raise an unrelated IndexError.
image_summaries() lines 165–171 validates channel counts for its own outputs, but that protection is bypassed for public direct ImageSummary inputs.
Fix and acceptance
At construction and/or the public QC entrypoint, require nonempty and consistent channel tuple lengths per summary, consistent channel cardinality among compared summaries (ideally across the supplied experiment), valid integer/float dtype and valid saturation fractions in [0,1] or None; ensure p_low <= p_high when both available, with explicit policy for absent values. Reject mismatches with source path, repeat and channel index rather than silently skipping or allowing IndexError. Test direct one-vs-two channel summaries in both orders, internally mismatched tuple lengths, empty/nonfinite channels, invalid fractions and ordinary image_summaries output. Numba offers no benefit.
Activity