scene

Contents

scene#

scarlet2.plot.scene(scene, observation=None, norm=None, channel_map=None, show_model=True, show_observed=False, show_rendered=False, show_residual=False, add_labels=True, add_boxes=False, split_channels=False, fig_kwargs=None, title_kwargs=None, label_kwargs=None, box_kwargs=None)[source]#

Plot all sources to recreate the scene. The functions provide a fast way of evaluating the quality of the entire model, i.e. the combination of all sources that seek to fit the observation.

Parameters:
  • scene (Scene) – The scene object containing the sources and their models

  • observation (Observation, optional) – The observation containing the data

  • norm (Norm) – Norm to scale the intensity of observation into RGB 0..256

  • channel_map (array_like) – Linear mapping from channels to RGB, dimensions (3, channels)

  • show_model (bool) – Whether the internal model is shown in the model frame

  • show_observed (bool) – Whether the observation is shown

  • show_rendered (bool) – Whether the model, rendered to match the observation, is shown

  • show_residual (bool) – Whether the residuals between rendered model and observation is shown

  • add_labels (bool) – Whether each source is labeled with its numerical index in the source list

  • add_boxes (bool) – Whether each source box is shown

  • split_channels (bool) – Whether to split the observation into separate channels

  • fig_kwargs (dict) – kwargs for plt.figure()

  • title_kwargs (dict) – kwargs for plt.title()

  • label_kwargs (dict) – kwargs for source labels, default {“color”: “w”, “ha”: “center”, “va”: “center”}

  • box_kwargs (dict) – kwargs for source boxes, default {“facecolor”: “none”, “edgecolor”: “w”, “lw”: 0.5}

Return type:

mpl.Figure