Skip to content

docs: record that edge-zeroing is deliberately scoped to the positive-only solver - #473

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/numerical-inversion-failures-7xsp1k
Aug 22, 2026
Merged

docs: record that edge-zeroing is deliberately scoped to the positive-only solver#473
Jammy2211 merged 1 commit into
mainfrom
claude/numerical-inversion-failures-7xsp1k

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Documentation only — no behaviour change, +16 lines across three files.

Why

use_edge_zeroed_pixels is consulted only when use_positive_only_solver is True. The positive-negative branch solves the full system regardless of its value.

But config/general.yaml lists the two as adjacent booleans with no hint of the dependency:

use_positive_only_solver: true      # If True, inversion's use a positive-only linear algebra solver...
use_edge_zeroed_pixels : true       # If True, the edge pixels of a pixelization are set to zero...

They read as independent switches. The nesting is only visible by reading the control flow in AbstractInversion.reconstruction.

That gap has real cost: it was mistaken for a bug — "a setting silently ignored" — twice deferred as work needing sign-off before touching the reconstruction path, and written up in three PyAutoMind documents as an open defect, before the author confirmed the scoping is deliberate. This PR closes the gap rather than leaving the next reader to repeat it.

Where

The three places a reader can arrive at this:

File Change
config/general.yaml the line itself now states the scoping and that it is intended — this is the file that reads as two independent switches
Settings.use_edge_zeroed_pixels gains a docstring stating the dependency and why it is called out
AbstractInversion.reconstruction a comment at the nesting site, saying explicitly not to "fix" it by hoisting the check out of the branch

The third is the one that matters most — it sits exactly where the wrong inference gets made.

Not covered here

Every workspace ships its own copy of config/general.yaml with the uncommented version of this line — confirmed in autolens_workspace/config/general.yaml:19 — and the workspace config is the one users actually read. Propagating the comment is a separate change across the workspace repos, recorded in PyAutoMind rather than done silently here.

Tests

test_autoarray/inversion/ — 346 passed. No code changed.


🤖 Generated with Claude Code

https://claude.ai/code/session_0133X4XhMV91SFjzV2mK4Ejh


Generated by Claude Code

…-only solver

use_edge_zeroed_pixels is consulted only when use_positive_only_solver is True.
The positive-negative branch solves the full system regardless of its value, so
the two are not independent switches -- but config/general.yaml lists them as
two adjacent booleans with no hint of the dependency, and the nesting is only
visible by reading the control flow in AbstractInversion.reconstruction.

That has already been mistaken for a bug ("a setting silently ignored") by
someone reading the branch without the context, twice deferred as work needing
sign-off, and written up in three places as a defect before the author
confirmed the scoping is deliberate. Documented in the three places a reader
can arrive at it:

- config/general.yaml -- the line itself now says the scoping exists and is
  intended, since this is the file that reads as two independent switches.
- Settings.use_edge_zeroed_pixels -- gains a docstring stating the dependency
  and why it is called out.
- AbstractInversion.reconstruction -- a comment at the nesting site itself,
  saying explicitly not to "fix" it by hoisting the check out of the branch.

Documentation only; no behaviour change. test_autoarray/inversion: 346 passed.

Not covered here: every workspace ships its own copy of config/general.yaml
with the uncommented version of this line (confirmed in autolens_workspace),
and the workspace config is the one users actually read. Propagating the
comment there is a separate change across the workspace repos, recorded in
PyAutoMind.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0133X4XhMV91SFjzV2mK4Ejh
@Jammy2211
Jammy2211 merged commit 0aa08d4 into main Aug 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants