skyllh.plotting.core package

Submodules

skyllh.plotting.core.pdf module

Plotting module to plot PDF objects.

class skyllh.plotting.core.pdf.SingleConditionalEnergyPDFPlotter(tdm, pdf)

Bases: object

Plotter class to plot an SingleConditionalEnergyPDF object.

Creates a new plotter object for plotting a SingleConditionalEnergyPDF instance.

Parameters:
property pdf

The PDF object to plot.

property tdm

The TrialDataManager that provides the data for the PDF evaluation.

plot(shg_mgr, axes, **kwargs)

Plots the PDF object.

Parameters:
  • shg_mgr (instance of SourceHypoGroupManager) – The instance of SourceHypoGroupManager that defines the source hypotheses.

  • axes (mpl.axes.Axes) – The matplotlib Axes object on which the PDF ratio should get drawn to.

  • Arguments (Additional Keyword) –

  • ----------------------------

  • mpl.imshow (Any additional keyword arguments will be passed to the) –

  • function.

Returns:

img (instance of mpl.AxesImage) – The AxesImage instance showing the PDF ratio image.

skyllh.plotting.core.pdfratio module

Plotting module for core.pdfratio objects.

class skyllh.plotting.core.pdfratio.SigOverBkgPDFRatioPlotter(tdm, pdfratio)

Bases: object

Plotter class to plot a SigOverBkgPDFRatio object.

Creates a new plotter object for plotting a SpatialSigOverBkgPDFRatio object.

Parameters:
  • tdm (instance of TrialDataManager) – The instance of TrialDataManager that provides the data for the PDF ratio evaluation.

  • pdfratio (SpatialSigOverBkgPDFRatio) – The PDF ratio object to plot.

property pdfratio

The PDF ratio object to plot.

property tdm

The TrialDataManager that provides the data for the PDF evaluation.

plot(src_hypo_group_manager, axes, source_idx=None, log=True, **kwargs)

Plots the spatial PDF ratio. If the signal PDF depends on the source, source_idx specifies the index of the source for which the PDF should get plotted.

Parameters:
  • src_hypo_group_manager (instance of SourceHypoGroupManager) – The instance of SourceHypoGroupManager that defines the source hypotheses.

  • axes (mpl.axes.Axes) – The matplotlib Axes object on which the PDF ratio should get drawn to.

  • source_idx (int | None) – The index of the source for which the PDF ratio should get plotted. If set to None and the signal PDF depends on the source, index 0 will be used.

  • Arguments (Additional Keyword) –

  • ----------------------------

  • mpl.imshow (Any additional keyword arguments will be passed to the) –

  • function.

Returns:

img (instance of mpl.AxesImage) – The AxesImage instance showing the PDF ratio image.

class skyllh.plotting.core.pdfratio.SplinedSingleConditionalEnergySigSetOverBkgPDFRatioPlotter(tdm, pdfratio)

Bases: object

Plotter class to plot an instance of SplinedSingleConditionalEnergySigSetOverBkgPDFRatio.

Creates a new plotter object for plotting an instance of SplinedSingleConditionalEnergySigSetOverBkgPDFRatio.

Parameters:
property pdfratio

The PDF ratio object to plot.

property tdm

The TrialDataManager that provides the data for the PDF evaluation.

plot(shg_mgr, axes, src_params_recarray, **kwargs)

Plots the PDF ratio for the given set of fit paramater values.

Parameters:
  • shg_mgr (instance of SourceHypoGroupManager) – The instance of SourceHypoGroupManager that defines the source hypotheses.

  • axes (mpl.axes.Axes) – The matplotlib Axes object on which the PDF ratio should get drawn to.

  • src_params_recarray (instance of numpy record ndarray | None) – The (N_sources,)-shaped numpy record ndarray holding the parameter names and values of the sources. See the skyllh.core.parameters.ParameterModelMapper.create_src_params_recarray() for more information.

  • Arguments (Additional Keyword) –

  • ----------------------------

  • mpl.imshow (Any additional keyword arguments will be passed to the) –

  • function.

Returns:

img (instance of mpl.AxesImage) – The AxesImage instance showing the PDF ratio image.

skyllh.plotting.core.signalpdf module

class skyllh.plotting.core.signalpdf.SignalSpatialPDFPlotter(tdm, pdf, **kwargs)

Bases: object

Plotter class to plot spatial signal PDF object.

Creates a new plotter object for plotting a spatial signal PDF object.

Parameters:
  • tdm (instance of TrialDataManager) – The instance of TrialDataManager that provides the data for the PDF evaluation.

  • pdf (class instance derived from SpatialPDF and IsSignalPDF) – The PDF object to plot.

property pdf

The PDF object to plot.

property tdm

The TrialDataManager that provides the data for the PDF evaluation.

plot(src_hypo_group_manager, axes, source_idx=None, sin_dec=True, log=True, **kwargs)

Plots the signal spatial PDF for the specified source.

Parameters:
  • axes (mpl.axes.Axes) – The matplotlib Axes object on which the PDF ratio should get drawn to.

  • source_idx (int | None) – The index of the source for which the PDF ratio should get plotted. If set to None and the signal PDF depends on the source, index 0 will be used.

  • sin_dec (bool) – Flag if the plot should be made in right-ascention vs. declination (False), or in right-ascention vs. sin(declination) (True).

  • Arguments (Additional Keyword) –

  • ----------------------------

  • mpl.imshow (Any additional keyword arguments will be passed to the) –

  • function.

Returns:

img (instance of mpl.AxesImage) – The AxesImage instance showing the PDF ratio image.