Skip to content

fix: AnalysisPoint.__init__ kwargs passthrough#506

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/point-source-jax-viz
May 14, 2026
Merged

fix: AnalysisPoint.__init__ kwargs passthrough#506
Jammy2211 merged 1 commit into
mainfrom
feature/point-source-jax-viz

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

PyAutoLens AnalysisPoint.__init__ defined its own explicit signature without **kwargs, so any kwarg not in its named-parameter list (notably use_jax_for_visualization from the autofit base Analysis) raised TypeError instead of being forwarded to super.

This left use_jax_for_visualization=True silently unusable on al.AnalysisPoint despite:

This PR adds **kwargs to the parameter list and forwards it in the super().__init__() call. The AgAnalysis parent already accepts and forwards **kwargs (confirmed via #500's interferometer test plan), so this just plugs the gap in the subclass override.

Discovered during planning for autolens_workspace_test #90 (Phase 1B of the JAX visualization roadmap). The workspace_test scripts (point_source/visualization.py + visualization_jax.py + modeling_visualization_jit.py) ship as a sibling PR on autolens_workspace_test.

API Changes

al.AnalysisPoint.__init__ gains a **kwargs passthrough — strictly additive. Any caller that previously worked is unaffected. New: callers can now pass use_jax_for_visualization=True (or any other kwarg accepted by the autofit base Analysis) without TypeError.

See full details below.

Test Plan

  • pytest test_autolens/point/ test_autolens/analysis/ — all pass
Full API Changes (for automation & release notes)

Changed Signature

  • al.AnalysisPoint.__init__ now accepts **kwargs and forwards them to super().__init__(). Strictly additive — no existing call site is affected.

Migration

None required. Callers that previously passed only the named arguments continue to work.

Follow-ups not in this PR

  • ag.AnalysisInterferometer.__init__ — same **kwargs gap on the autogalaxy side. Deferred to Phase 1C of the JAX visualization roadmap (PyAutoPrompt/autogalaxy_workspace_test/jax_viz_dataset_coverage.md).

🤖 Generated with Claude Code

AnalysisPoint's explicit __init__ omitted **kwargs, so any kwarg not
in its named-parameter list (notably use_jax_for_visualization from
the autofit base Analysis) raised TypeError instead of being forwarded
to super.

This left use_jax_for_visualization=True silently unusable on
al.AnalysisPoint despite the point visualizer dispatching via
fit_for_visualization (autolens/point/model/visualizer.py:67).

Mirrors the AnalysisInterferometer fix in PR #500.

The autolens_workspace_test point_source scripts (visualization.py,
visualization_jax.py, modeling_visualization_jit.py) follow in
PyAutoLabs/autolens_workspace_test#90 sibling PR.

ag.AnalysisInterferometer has the same **kwargs gap on the autogalaxy
side; deferred to Phase 1C of the JAX visualization roadmap.
@Jammy2211
Copy link
Copy Markdown
Collaborator Author

Workspace PR: PyAutoLabs/autolens_workspace_test#91

@Jammy2211 Jammy2211 merged commit 1778b63 into main May 14, 2026
5 checks passed
@Jammy2211 Jammy2211 deleted the feature/point-source-jax-viz branch May 14, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant