Skip to content

Bucket A (2/2): refuse invalid parameters and channel indices; report unchecked channels - #62

Merged
guijacquemet merged 2 commits into
mainfrom
claude/bucket-a-2
Nov 3, 2026
Merged

guijacquemet merged 2 commits into
mainfrom
claude/bucket-a-2

Conversation

@guijacquemet

@guijacquemet guijacquemet commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Bucket-A integrity fixes, parameter side. The statistics side is #61. The two PRs merge cleanly; combined, fitting.py is 599 lines.

Fixes #36, fixes #38. Refs #37, refs #57. Both are partly fixed and stay open; the reasons are below.

Changes

Evidence

🤖 Generated with Claude Code

https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc

Bucket-A integrity fixes for the parameter side of the brick. Valid inputs
give bit-identical outputs.

- New parameter_checks module: Parameters and NormalizationParameters refuse
  a non-finite offset and a scale that is not finite and above zero when
  made, naming the channel or method (#36).
- Channel indices of Parameters and Parameters.select must be whole numbers
  0 or above; booleans, fractions, whole floats and text are refused instead
  of truncated by int() (#38).
- Parameters.from_columns refuses a normalization_scope that is not one of
  the contract's scopes (#37, first part; comparing it with the settings'
  scope would break CellPatcher's parameters_from_row and the contract's own
  round-trip test, so it is left to an owner decision).
- image_summaries gives Histogram_Exact None, not True, for a channel without
  finite pixels; new unchecked_channels returns a
  channel_without_finite_pixels warning for each such channel, separate from
  the four intensity_checks codes the calling bricks list (#57).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G3qp9AxjpGPw9xfWAUJNqc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants