Repository navigation
feat: overlay point-source positions on a dataset image - #780
Merged
Merged
Conversation
AnalysisPoint now stores the optional image= it already accepted. A new plot_image_with_points draws observed positions (and model positions after a fit) over it, emitted by VisualizerPoint before and after the fit, including on quick_update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ved rings A source-plane fit's model data is the source centre, which must not be drawn over the image. Observed positions become hollow white rings so the PSF peak and faint images stay visible. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
Follow-up commit b0ce0a3, found while rendering the autolens_visualization figures:
|
Collaborator
Author
|
Workspace PR: PyAutoLabs/autolens_workspace#591 |
This was referenced Oct 21, 2026
Merged
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.
Summary
For point-source modeling (e.g. a lensed quasar), passing an image of the dataset to
AnalysisPointnow gives a figure with the point positions clearly plotted over it. Before this change,AnalysisPoint(image=...)accepted the image and silently dropped it.The new
image_with_points.pngshows:Positions are placed with PyAutoArray's own overlay reflection (
_overlay_yx_for_origin), so they stay registered to the image.Closes part of #779; workspace and
autolens_visualizationfollow-ups come next.API Changes
AnalysisPointnow storesself.image. It is for visualization only and does not enter the likelihood.aplt.plot_image_with_points(image, dataset, fit=None, ...).PlotterPoint.image_with_points(...), gated byplots.yamlpoint_dataset.image_with_pointsandfit_point_dataset.image_with_points(both defaulttrue).VisualizerPointemits the figure before and after the fit, including onquick_update, whenever an image is supplied.See full details below.
Test Plan
pytest test_autolens/— 838 passed, 1 xfailed (local, worktree).image_with_points.png, and that the visualizer writes it before and after the fit (with and withoutquick_update) only when an image is given.Readiness
At ship time, Heart readiness was YELLOW (score 70):
The Heart door read RED at task start. The human authorized development to proceed on 2026-10-21 ("I override, go"). None of these reasons involve point-source code.
Full API Changes (for automation & release notes)
Added
autolens.plot.plot_image_with_points(image, dataset, fit=None, output_path=None, output_format=None, image_plane_lines=None, image_plane_line_colors=None, title_prefix=None)— writesimage_with_points.pngautolens.point.model.plotter.PlotterPoint.image_with_points(image, dataset, fit=None, image_plane_lines=None, image_plane_line_colors=None)plots.yaml:point_dataset.image_with_points: true,fit_point_dataset.image_with_points: trueChanged
AnalysisPoint.__init__now storesimageasself.image(previously accepted and discarded).Migration
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code