Skip to content

[Sad Catapella N7][Scientific QC] Entirely nonfinite channels produce no warning and are labelled Histogram_Exact=true #57

Closed

Description

@guijacquemet

Baseline and classification

Normalization Batch 7 at f784c95e3049483f87466150ffc5764375fa631d. Confirmed existing deliberate blank-statistics policy, but an unassessed-measurement diagnostic gap requiring a scientific contract decision rather than claiming an accidental regression. Distinct from #22 (zero-MAD reference skipped) and #46 (malformed nonfinite tail moments). No tests executed.

Evidence

Scientific impact

An entirely nonfinite channel (all NaN/±inf) can yield a summary row with missing intensities and Histogram_Exact_Ci=True, and if other metrics are in range, intensity_checks returns no warning. A user consuming only warnings cannot distinguish 'healthy' from 'channel unassessable'. The absence of valid pixels is not a biological zero signal.

Proposed policy/acceptance

Add a distinct channel-specific diagnostic such as no_finite_intensity_pixels / intensity_unassessable, with affected image and channel, and ensure calling bricks present it clearly. Define exactness for missing channels: prefer None / not-applicable if schema evolution permits, or keep True with an explicit paired availability field and prominent warning; do not silently infer a valid zero. Compare with fitting's planes_without_finite_pixels warning to avoid duplicated notifications. Add all-NaN, all-infinite, one missing channel, partly missing Z/T, no-spread-but-finite, and clean image tests. This is scientific communication/QC, not a Numba task.

Activity

  1. guijacquemet commented on Nov 3, 2026

    @guijacquemet
    ContributorAuthor

    This is still valid at f784c95: summaries.py:187 sets exact.append(True) for a channel with no finite pixels, and no warning is emitted.

    #62 fixes part of it:

    • ImageSummary.exact, and so Histogram_Exact_C<i>, is now None (blank) for such a channel.
    • A new unchecked_channels(summaries) returns one channel_without_finite_pixels warning per affected image and channel, with Issue.channel set.
    • The tests are in tests/test_parameter_checks.py; they cover all-NaN, all-+inf, all--inf, partly-NaN, flat and clean channels.

    The new warning is deliberately not added to intensity_checks. morphobricks-preprocessing (notebook_plots.py:261-263) counts issues in a dict that holds only the four existing codes, so a fifth code would raise KeyError. Its text report (intensity.py:262) also lists only those four.

    What remains is in preprocessing: call unchecked_channels and add the new code to INTENSITY_CODES. I'm leaving this issue open until preprocessing presents the warning.


    Generated by Claude Code

  2. guijacquemet commented on Nov 3, 2026

    @guijacquemet
    ContributorAuthor

    Adopted in morphobricks-preprocessing PR #145, merge commit a6eea53a7ce63b71757b3544fb05a76a4f90feb8. The pin is on tag v0.3.3 (320f304). check_intensities now adds unchecked_channels(summaries), so a channel with no finite pixels gives the warning channel_without_finite_pixels in the run result, the discovery report, CLI run and the notebook (its own tile). CLI check reads no pixels, so it does not show it. Regression tests are in tests/test_unchecked_channels.py.


    Generated by Claude Code

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