Skip to content

Computing classes

Hist

Histogram class used to generate a simple constant-width-binned histogram or a logarithmically binned histogram.

Attributes:

Name Type Description
user_bools UserBools

Boolean input for the histogram object.

user_input UserInput

Numerical input for the histogram object.

hist_data DArr | None

Histogram data (counts/probability/density).

hist_edges DArr | None

Bin edges of the histogram.

hist_centers DArr | None

Bin centers of the histogram.

hist_width DArr | DVar | None

Bin widths of the histogram.

logarithmic_computation bool | None

Whether a logarithmic-width or bin-width computation was done. None if no computation was done.

Parameters:

Name Type Description Default
user_bools UserBools

Boolean input for the histogram object.

required
user_input UserInput

Numerical input for the histogram object.

required

logarithmic_width(bin_edges)

Generate a histogram with a specific logarithmic bin width.

Parameters:

Name Type Description Default
bin_edges DArr | None

Logarithmic bin edges used for the binning procedure.

required

specific_width(bin_phase, bin_nr, data_min, bin_width)

Generate a histogram with a specific (constant) bin width.

Parameters:

Name Type Description Default
bin_phase DVar

Binning phase (See Hogg, 2008).

required
bin_nr IVar

Number of bins used in the histogram.

required
data_min DVar | None

Specific minimum data value for the binning if not None. If None, the minimum value of the data is used to shift data values before binning.

required
bin_width DArr | DVar | None

Specified bin width or array of specified bin widths.

required

JackHist

Histogram class used to generate a jackknife-likelihood-optimized constant-width-binned or logarithmically binned histogram.

Attributes:

Name Type Description
user_bools UserBools

Boolean input for the jackknife histogram object.

user_input UserInput

Numerical input for the jackknife histogram object.

hist_data DArr | None

Histogram data (counts/probability/density).

hist_edges DArr | None

Bin edges of the jackknife histogram.

hist_centers DArr | None

Bin centers of the jackknife histogram.

hist_width DArr | DVar | None

Bin widths of the jackknife histogram.

logarithmic_computation bool | None

Whether a logarithmic-width or bin-width computation was done. None if no computation was done.

Parameters:

Name Type Description Default
user_bools UserBools

Boolean input for the jackknife histogram object.

required
hogg_bools UserHoggBools

Additional boolean input for the optimization done within the jackknife histogram object.

required
user_input UserHoggInput

Numerical input for the jackknife histogram object.

required

logarithmic_width()

Perform the jackknife likelihood optimization for the specified input parameters, in order to generate an optimized logarithmic-binwidth histogram.

specific_width()

Perform the jackknife likelihood optimization for the specified input parameters, in order to generate an optimized constant-binwidth histogram.