iact_estimator.plots.physics

Plotting functions related to observational performance of the insturment.

Functions

plot_spectrum(config, energy_bounds, model, ...[, ...])

Plot a spectrum from a model.

plot_sed(config, sigmas, sig_comb, source_name, ...[, ...])

Plot the Spectral Energy distribution with significances.

plot_exposure(data)

plot_rates(performance_data[, title, ax])

Module Contents

iact_estimator.plots.physics.plot_spectrum(config, energy_bounds, model, source_name, plotting_options, savefig=True, output_path=None, **kwargs)[source]

Plot a spectrum from a model.

Parameters:
energy_bounds~astropy.units.Quantity

Plot energy bounds.

model~gammapy.modeling.models.SpectralModel

Spectral model to plot.

output_pathstr or pathlib.Path

Path to the output directory where to save the plot.

source_namestr

Name of the source.

plotting_optionsdict

Dictionary of options related to plotting from the configuration file.

**kwargs

Keyword arguments for ~matplotlib.pyplot.plot.

iact_estimator.plots.physics.plot_sed(config, sigmas, sig_comb, source_name, assumed_spectrum, en, sed, dsed, detected, savefig=True, output_path=None, annotation_options={'rotation': 45, 'xytext': (10, 10), 'size': 15, 'horizontalalignment': 'left', 'verticalalignment': 'bottom'})[source]

Plot the Spectral Energy distribution with significances.

Parameters:
configdict

Loaded configuration

sigmasarray-like
sig_combfloat

Combined significance

source_namestr
assumed_spectrum~gammapy.modeling.models.SpectralModel
en
sed
dsed
detected
savefigbool
output_pathstr or ~pathlib.Path
annotation_optionsdict

Options for matplotlib.axes.Axes.annotate.

Notes

Spectral points following the assumed spectrum are shown. Their error bars reflect the performance of the instrument for such a source.

Significance for each bin is given. Bins without detection have gray numbers.

At the top of the plot a simple number using information from all the shown bins is given to evaluate if the source can be detected, roughly if

\[\dfrac{ \sum sigma_{i} } { \sqrt{N} } \gtrsim 5\]
iact_estimator.plots.physics.plot_exposure(data)[source]
iact_estimator.plots.physics.plot_rates(performance_data, title=None, ax=None)[source]