autolens.plot.subplot_detection_fits#

subplot_detection_fits(fit_imaging_no_subhalo, fit_imaging_with_subhalo, output_path=None, output_format=None, colormap=None)[source]#

Produce a 6-panel subplot comparing imaging fits with and without a subhalo.

Displays residual maps and source-plane images in a 2 × 3 grid, with the top row corresponding to the no-subhalo baseline and the bottom row to the fit that includes the subhalo:

  • Top row (no subhalo):

    1. Normalised residual map.

    2. Chi-squared map.

    3. Source-plane image (plane 1).

  • Bottom row (with subhalo):

    1. Normalised residual map.

    2. Chi-squared map.

    3. Source-plane image (plane 1).

A visually improved source-plane reconstruction in the bottom row indicates that the subhalo is detected.

Parameters:
  • fit_imaging_no_subhalo (FitImaging) – The imaging fit from the model without a subhalo.

  • fit_imaging_with_subhalo (FitImaging) – The imaging fit from the model with a subhalo included.

  • 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.