Skip to content

[Sad Catapella N7][Scientific correctness] Image summaries can miscount saturated pixels across mixed-dtype Z/T planes #54

Closed

Description

@guijacquemet

Baseline and classification

Sad Catapella Normalization Batch 7, pinned f784c95e3049483f87466150ffc5764375fa631d. Confirmed source-level numerical/data-contract defect for a synthetic mixed-dtype image; no repository tests executed. Distinct from #51 (mixed RGB FOVs in fit).

Evidence

Counterexample

One logical source_relative_path='a.tif' with z=0 a uint8 plane whose values are all 100 (no pixel is 255), and z=1 a uint16 plane whose values are all 1000 (no pixel is 65535). Make exact one-value histograms for both. If uint8 is first, the summary's top=255; the uint16 plane's highest occupied singleton bin at 1000 is counted as saturated despite not being at its type maximum. The true saturated fraction is 0 for either plane's native dtype, but the algorithm can report a positive result. Swapping record order changes summary.dtype and behavior.

Fix and acceptance

Refuse mixed dtypes for one logical source image before pooling; report paths, Z/T planes and observed dtypes. Do not auto-convert dynamic ranges or guess bit depths. Optionally require global experiment dtype consistency only at the upstream preprocessing boundary (separate policy). Test both plane orders, uint8+uint16, uint16+int16, same-dtype varying Z/T, one all-nonfinite channel, and saturated type maxima. Ensure saturated fraction does not depend on input row ordering. No Numba opportunity.

Activity

  1. added a commit that references this issue on Nov 7, 2026
    42ff7e7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions