HistPanel#

class lsst.analysis.tools.actions.plot.HistPanel(*args, **kw)#

Bases: Config

A Config class that holds parameters to configure a single panel of a histogram plot. This class is intended to be used within the HistPlot class.

Attributes Summary

addThresholds

Read in the predefined thresholds and indicate them on the histogram.

bins

Number of x axis bins within plot x-range.

histDensity

Whether to plot the histogram as a normalized probability distribution.

hists

A dict specifying the histograms to be plotted in this panel.

label

Panel x-axis label.

lowerRange

Lower range specifier for the histogram bins.

rangeType

Set the type of range to use for the x-axis.

refRelativeToMedian

Is the referenceValue meant to be an offset from the median? (bool, default False)

referenceValue

Value at which to add a black solid vertical line.

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.

yscale

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, default False)

bins#

Number of x axis bins within plot x-range. (int, default 50)

histDensity#

Whether to plot the histogram as a normalized probability distribution. Must also provide a value for referenceValue (bool, default False)

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, default 0.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, default False)

referenceValue#

Value at which to add a black solid vertical line. Ignored if set to None. (float, default None)

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, default 100.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 validate methods.

Complex single-field validation can be defined by deriving new Field types. For convenience, some derived lsst.pex.config.Field-types (ConfigField and ConfigChoiceField) are defined in lsst.pex.config that handle recursing into subconfigs.

Inter-field relationships should only be checked in derived Config classes after calling this method, and base validation is complete.