iact_estimator.plots
#
Plotting functions.
Module Contents#
Functions#
|
Plot a spectrum from a model. |
|
Plot the Spectral Energy distribution with significances. |
|
Plot the Spectral Energy distribution with significances. |
|
|
|
|
|
- iact_estimator.plots.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.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.plot_transit(config, source_name, target_source, observer, time, merge_profiles=True, plot_crab=True, style_kwargs=None, savefig=True, output_path=None)[source]#
Plot the Spectral Energy distribution with significances.
- Parameters:
- configdict
Loaded configuration
- output_pathstr or ~pathlib.Path
- source_namestr
- target_sourceastroplan.Target
- observerastroplan.Observer
- time~astropy.time.Time
Datetime of the planned observation
- merge_profilesbool, default=True
If True plot the combined horizon profile from both telescopes.
- crabbool, default=True
If True plot the Crab together with the target source for comparison.
- style_kwargsdict, default=None
Dictionary of keywords passed into ~matplotlib.pyplot.scatter to set plotting styles.