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 PointSolver refines 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 by magnification_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=True the same panels are written as a looping GIF (point_solver.gif), one step per frame (FRAME_SECONDS each, the final step held longer), via matplotlib.animation and PillowWriter (no ffmpeg needed). Without an output_path the FuncAnimation is 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 PointSolver whose 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). None is the last plane.

  • image_plane_lines – Pre-computed critical-curve lines; None computes the source plane’s own curves, [] draws none.

  • output_path (Optional[str]) – Directory in which to save the figure. If None the still is shown (and the animation returned).

  • output_format (str) – Image format of the still, passed to save_figure. The animation is always a GIF.

  • title_prefix (str) – Text prepended to every panel title.

  • animate (bool) – If True write the GIF animation instead of the still.

  • filename (str) – The file name (without extension) of the output.