HistPanel#
- class lsst.analysis.tools.actions.plot.HistPanel(*args, **kw)#
Bases:
ConfigA Config class that holds parameters to configure a single panel of a histogram plot. This class is intended to be used within the
HistPlotclass.Attributes Summary
Read in the predefined thresholds and indicate them on the histogram.
Number of x axis bins within plot x-range.
Whether to plot the histogram as a normalized probability distribution.
A dict specifying the histograms to be plotted in this panel.
Panel x-axis label.
Lower range specifier for the histogram bins.
Set the type of range to use for the x-axis.
Is the referenceValue meant to be an offset from the median? (
bool, defaultFalse)Value at which to add a black solid vertical line.
configuration for stats to be shown on plot, if None then default stats: N, median, sigma mad are shown (
HistStatsPanel, default<class 'lsst.analysis.tools.actions.plot.histPlot.HistStatsPanel'>)Upper range specifier for the histogram bins.
Y axis scaling.
Methods Summary
validate()Validate the Config, raising an exception if invalid.
Attributes Documentation
- addThresholds#
Read in the predefined thresholds and indicate them on the histogram. (
bool, defaultFalse)
- bins#
Number of x axis bins within plot x-range. (
int, default50)
- histDensity#
Whether to plot the histogram as a normalized probability distribution. Must also provide a value for referenceValue (
bool, defaultFalse)
- hists#
A dict specifying the histograms to be plotted in this panel. Keys are used to identify histogram IDs. Values are used to add to the legend label displayed in the upper corner of the panel. (
Dict)
- label#
Panel x-axis label. (
str, default'label')
- lowerRange#
Lower range specifier for the histogram bins. See rangeType for interpretation based on the type of range requested. If more than one histogram is plotted in a given panel and rangeType is not set to fixed, the limit is the minimum value across all input data. (
float, default0.0)
- rangeType#
Set the type of range to use for the x-axis. Range bounds will be set according to the values of lowerRange and upperRange. (
str, default'percentile')Allowed values:
'percentile'Upper and lower percentile ranges of the data.
'sigmaMad'Range is (sigmaMad - lowerRange*sigmaMad, sigmaMad + upperRange*sigmaMad).
'fixed'Range is fixed to (lowerRange, upperRange).
'None'Field is optional
- refRelativeToMedian#
Is the referenceValue meant to be an offset from the median? (
bool, defaultFalse)
- referenceValue#
Value at which to add a black solid vertical line. Ignored if set to
None. (float, defaultNone)
- statsPanel#
configuration for stats to be shown on plot, if None then default stats: N, median, sigma mad are shown (
HistStatsPanel, default<class 'lsst.analysis.tools.actions.plot.histPlot.HistStatsPanel'>)
- upperRange#
Upper range specifier for the histogram bins. See rangeType for interpretation based on the type of range requested. If more than one histogram is plotted in a given panel and rangeType is not set to fixed, the limit is the maximum value across all input data. (
float, default100.0)
- yscale#
Y axis scaling. (
str, default'linear')
Methods Documentation
- validate()#
Validate the Config, raising an exception if invalid.
Raises#
- lsst.pex.config.FieldValidationError
Raised if verification fails.
Notes#
The base class implementation performs type checks on all fields by calling their
validatemethods.Complex single-field validation can be defined by deriving new Field types. For convenience, some derived
lsst.pex.config.Field-types (ConfigFieldandConfigChoiceField) are defined inlsst.pex.configthat handle recursing into subconfigs.Inter-field relationships should only be checked in derived
Configclasses after calling this method, and base validation is complete.