autolens.plot.plot_point_solver#
- plot_point_solver(solver, tracer, source_plane_coordinate, positions=None, plane_redshift=None, image_plane_lines=None, output_path=None, output_format=None, title_prefix=None, animate=False, filename='point_solver')[source]#
Plot how the
PointSolverrefines its triangle tiling to find the multiple images of a point source.The figure (
point_solver.png) is a 2x2 subplot of steps 0, 1, 2 and the final step on one fixed extent spanning the source’s images: the triangles tested, kept (blue), kept then rejected bymagnification_threshold(hatched), the neighbour rim (orange) and the triangles up-sampled for the next step (green), with the critical curves, the observed positions and the solved images. When the solver’s triangles are too small to draw on that extent the steps are re-solved on a coarse display grid. See the module docstring for the full legend.With
animate=Truethe same panels are written as a looping GIF (point_solver.gif), one step per frame (FRAME_SECONDSeach, the final step held longer), viamatplotlib.animationandPillowWriter(no ffmpeg needed). Without anoutput_paththeFuncAnimationis returned instead, e.g. for display in a notebook.The solve is repeated with NumPy whatever the solver’s backend, as the JAX path pads and hides the steps.
- Parameters:
solver – The
PointSolverwhose refinement is shown.tracer – The tracer that ray-traces the triangles to the source plane.
source_plane_coordinate (
Tuple[float,float]) – The (y,x) source-plane coordinate of the point source.positions – The observed (y,x) positions, drawn as hollow circles.
plane_redshift (
Optional[float]) – The redshift of the source’s plane, for multi-plane lenses (e.g. clusters).Noneis the last plane.image_plane_lines – Pre-computed critical-curve lines;
Nonecomputes the source plane’s own curves,[]draws none.output_path (
Optional[str]) – Directory in which to save the figure. IfNonethe still is shown (and the animation returned).output_format (
str) – Image format of the still, passed tosave_figure. The animation is always a GIF.title_prefix (
str) – Text prepended to every panel title.animate (
bool) – IfTruewrite the GIF animation instead of the still.filename (
str) – The file name (without extension) of the output.