Visualisation routine#

Code author: Wilfried Mercier - LAM <wilfried.mercier@lam.fr>

Visualization routine of the ouput of substructure detection.

plot_im_residuals(image, res, mask, segmap, band, idd, z, bg_mask=None, cmap='plasma', plotPath='', zoom_bounds=None, bulge_params=[])[source]#

Code author: Wilfried Mercier - LAM <wilfried.mercier@lam.fr>

Produce a plot with image, model, and residuals, showing the substructure segmentation map.

Parameters:
  • image (NDArray) – image of the galaxy in the given band

  • res (NDArray) – residual image

  • mask (NDArray) – segmentation mask with True corresponding to the galaxy and False outside of the galaxy

  • segmap (NDArray) – substructure segmentation map

  • band (str) – band for this image

  • idd (int) – ID of the galaxy

  • z (float) – redshift of the galaxy

  • bg_mask (NDArray) – mask with True for the background pixels and False otherwise

  • cmap (str or Colormap) – colormap used for the image and model

  • plotPath (str) – output path for the figure

  • zoom_bounds ((int, int, int, int) or None) – list of bounds (ymin, ymax, xmin, xmax) to zoom-in on the plots. If None, there is no zoom.

  • bulge_params (list) – list of parameters to plot the bulge mask on top of the image. Parameters are: [x position, y position, radius in \(\rm pixels\)]

Return type:

None