autolens.plot.subplot_detection_imaging#

subplot_detection_imaging(result, fit_imaging_with_subhalo, output_path=None, output_format=None, colormap=None, use_log10=False, use_log_evidences=True, relative_to_value=0.0, remove_zeros=False)[source]#

Produce a 4-panel subplot summarising subhalo detection from imaging data.

This function is the primary summary diagnostic for a subhalo detection analysis run on imaging data. The four panels are:

  1. Imaging data (from the fit that includes the subhalo).

  2. Signal-to-noise map of that fit.

  3. Figure-of-merit (log-evidence or log-likelihood increase) grid, indicating where a subhalo improves the fit.

  4. Best-fit subhalo mass at each grid position.

Parameters:
  • result (SubhaloResult) – The subhalo detection result object exposing figure_of_merit_array and subhalo_mass_array.

  • fit_imaging_with_subhalo (FitImaging) – The best-fit imaging fit that includes the subhalo, used for the data and S/N panels.

  • 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 a log10 stretch is applied to the data and S/N panels.

  • use_log_evidences (bool) – If True (default) log-evidence increases are shown in the figure-of-merit panel; otherwise log-likelihood increases are used.

  • relative_to_value (float) – Value subtracted from each figure-of-merit entry before plotting. Defaults to 0.0 (no subtraction).

  • remove_zeros (bool) – If True grid positions where the figure of merit is exactly zero are masked out before plotting.