Skip to content

refactor: delegate norm_from to the shared autoarray helper - #587

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/autoarray-shared-log-norm-c12ges
Aug 24, 2026
Merged

refactor: delegate norm_from to the shared autoarray helper#587
Jammy2211 merged 1 commit into
mainfrom
claude/autoarray-shared-log-norm-c12ges

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Companion to PyAutoLabs/PyAutoArray#489 (issue PyAutoLabs/PyAutoArray#488).

norm_from was added by #586 as a faithful copy of the colour-norm block in autoarray's plot_array — the third copy of logic that had already diverged across the three sites. PyAutoArray#489 makes that block one shared helper, so this becomes a thin delegate rather than a third copy.

autogalaxy may import autoarray (the dependency direction is fine; the reverse is not), and the name stays autogalaxy's so the Clicker / Scribbler callers added in #586 keep working unchanged.

Library-first: PyAutoArray#489 must merge before this. This PR's tests pass against main too — the helper it delegates to is behaviour-identical to what this function already implemented — but the import target only exists once #489 lands.

API Changes

None. autogalaxy.util.plot_utils.norm_from(array, use_log10=False, vmin=None, vmax=None) keeps its name, signature and return contract; only its body changes, from a copy of the logic to a call into autoarray.plot.utils.norm_from.

Behaviour here is unchanged: the log10-floor path this function already implemented is the one the autoarray helper implements. The two deliberate behaviour changes in #489 both land on plot_inversion_reconstruction, which this repo does not call.

Test Plan

  • test_autogalaxy/gui/test_plot_norm.py — 9 passed, file untouched. This is the test fix: make the GUI helpers' colour scale constructible through the public API #586 added to pin the behaviour, so its staying green unmodified is the evidence that the delegation is faithful.
  • test_autogalaxy full suite against the PyAutoArray#489 branch — 1119 passed, 1 skipped
  • Clicker / Scribbler call sites unchanged and covered by the suite

Ran on Python 3.12 only — the authoring session had no 3.13 environment. CI covers 3.13.

Full API Changes (for automation & release notes)

Removed

  • Nothing.

Added

  • Nothing.

Migration

  • None. The change is internal to autogalaxy.util.plot_utils.norm_from; the docstring now points at autoarray.plot.utils.norm_from for the behaviour and for which of the three divergences was resolved which way.

Generated by the PyAutoLabs agent workflow.


Generated by Claude Code

…ray#488)

`norm_from` was added by #586 as a faithful copy of the colour-norm block in
autoarray's plot_array. PyAutoArray#488 makes that block one shared helper
(autoarray.plot.utils.norm_from), so this becomes a thin delegate rather than
a third copy: autogalaxy may import autoarray, and the name stays autogalaxy's
so the Clicker/Scribbler callers added in #586 keep working unchanged.

Behaviour is unchanged here — the autoarray helper's log10-floor path is the
one this function already implemented. test_autogalaxy/gui/test_plot_norm.py,
which pins that behaviour, is green untouched (9 passed); full suite 1119
passed, 1 skipped against the PyAutoArray#488 branch.

Library-first: PyAutoArray#488 merges before this.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DamasCoRrENvgiRkU5WHHW
@Jammy2211
Jammy2211 merged commit 0c7bc62 into main Aug 24, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the claude/autoarray-shared-log-norm-c12ges branch August 25, 2026 18:16
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.

1 participant