Repository navigation
feat: forward arcsec_after_decimal through plot_array - #612
Merged
Merged
Conversation
`autogalaxy.util.plot_utils.plot_array` has an explicit keyword signature and no `**kwargs`, so it has to name the new autoarray parameter to pass it on. Adding it here is what makes the option reachable as `aplt.plot_array(..., arcsec_after_decimal=True)` from both `autogalaxy.plot` and `autolens.plot`, which re-export this exact function. Requires the matching PyAutoArray change (PyAutoArray#546). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019mofs7R3chP12wzoCPjnaw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Downstream leg of PyAutoLabs/PyAutoArray#546 — see PyAutoLabs/PyAutoArray#547.
Merge PyAutoLabs/PyAutoArray#547 first. This PR forwards a keyword that only exists on
autoarray.plot.plot_arrayonce that PR lands; against an older autoarray it raisesTypeError: plot_array() got an unexpected keyword argument— but only when a caller actually passesarcsec_after_decimal, since the default isNoneand it is forwarded unconditionally.Summary
autogalaxy.util.plot_utils.plot_arraywrapsautoarray.plot.plot_arraywith an explicit keyword signature and no**kwargs, so it has to name a parameter in order to pass it on. This addsarcsec_after_decimaland forwards it.That wrapper is also what
autolens.plotre-exports (autolens/plot/__init__.py:12importsplot_arrayfromautogalaxy.util.plot_utils), so this one-line forward is what makes the originating request's acceptance criterion —aplt.plot_array(array=array, arcsec_after_decimal=True)— work for both galaxy and lens users. PyAutoLens itself needs no change.API Changes
autogalaxy.util.plot_utils.plot_arraygains one optional trailing keyword,arcsec_after_decimal=None, forwarded verbatim toautoarray.plot.plot_array.Trueplaces the arcsecond″over the decimal point (3.″8),Falseforces the suffix form (3.8"),None(the default) reads theticks.symbol_over_decimalconfig flag.Purely additive and appended last, so no positional call site is affected and default behaviour is unchanged.
See full details below.
Test Plan
test_plot_array_mask.py,test_plot_norm.py,mat_wrap/test_visuals.py) → 22 passed, run against the branch checkout of PyAutoArrayArray2D, reading tick labels back off the axes:True→['-1.″9', '0.″0', '1.″9'];NoneandFalse→['-1.9"', '0.0"', '1.9"']; the PNG is written in all three casesaplt.plot_array is plot_utils.plot_array→True, and the signature carriesarcsec_after_decimal→TrueFull API Changes (for automation & release notes)
Added
autogalaxy.util.plot_utils.plot_array(..., arcsec_after_decimal=None)— forwards the per-call arcsecond tick-label override toautoarray.plot.plot_array. Also reaches lens users unchanged via theautolens.plotre-export.Removed
Migration
conf.instance[...]["ticks"]["symbol_over_decimal"], then restore itaplt.plot_array(array=array, arcsec_after_decimal=True)Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_019mofs7R3chP12wzoCPjnaw
Generated by Claude Code