autolens.plot.subplot_sensitivity_tracer_images#

subplot_sensitivity_tracer_images(mask, tracer_perturb, tracer_no_perturb, source_image, output_path=None, output_format=None, colormap=None, use_log10=False)#

Produce a 6-panel subplot comparing a perturbed and unperturbed tracer.

This is the primary diagnostic plot for subhalo sensitivity analysis. The six panels show:

  1. Full lensed model image from the perturbed tracer.

  2. Lensed source image (perturbed tracer) with critical curves.

  3. Unlensed source image in the source plane with caustics.

  4. Convergence map of the perturbed tracer.

  5. Lensed source image from the unperturbed (no-subhalo) tracer with its critical curves.

  6. Residual map: (perturbed lensed source) − (unperturbed lensed source).

Critical curves and caustics are computed from the unmasked grid derived from mask; failures are handled gracefully so that the subplot is still produced even if curve computation fails.

Parameters:
  • mask (aa.Mask2D) – The imaging mask used to derive the unmasked grid and to build the image-plane Grid2D.

  • tracer_perturb (Tracer) – The tracer with the perturbing substructure (e.g. a subhalo).

  • tracer_no_perturb (Tracer) – The baseline tracer without any substructure perturbation.

  • source_image (Array2D) – A pixelated source-plane image passed to image_2d_via_input_plane_image_from for both tracers.

  • output_path (Optional[str]) – Directory in which to save the figure. If None the figure is not saved to disk.

  • output_format (str) – Image format passed to save_figure.

  • colormap (Optional[str]) – Matplotlib colormap name.

  • use_log10 (bool) – If True the colour scale is applied on a log10 stretch.