Skip to content

Input Classes

UserBools

Sets the boolean input for the user-friendly histogram functions.

Attributes:

Name Type Description
empirical_probability bool

If True, retrieve an empirical probability histogram. If False, compute a count or empirical probability histogram. Empirical_probability and empirical_density cannot both be True.

empirical_density bool

If True, compute an empirical density histogram. If False, compute a count or empirical density histogram. Empirical_density and empirical_density cannot both be True.

negative_values bool

If True, return None for logarithmically spaced histogram or compute the histogram for fixed bin-width histograms. If False, assume all values are positive and no shifting is done for the binning procedure.

additional_checks bool

Performs additional checks if requested (True). Prevents negative counts from being registered when a mistake is made when counting at argmax. Setting this parameter to True will automatically fix this mistake, unless the negative count values do not appear at Argmax!

Parameters:

Name Type Description Default
empirical_probability bool

If True, retrieve an empirical probability histogram. If False, compute a count or empirical probability histogram. Empirical_probability and empirical_density cannot both be True. By default False.

False
empirical_density bool

If True, compute an empirical density histogram. If False, compute a count or empirical density histogram. Empirical_density and empirical_density cannot both be True. By default False.

False
negative_values bool

If True, return None for logarithmically spaced histogram or compute the histogram for fixed bin-width histograms. If False, assume all values are positive and no shifting is done for the binning procedure. By default False.

False
additional_checks bool

Performs additional checks if requested (True). Prevents negative counts from being registered when a mistake is made when counting at argmax. Setting this parameter to True will automatically fix this mistake, unless the negative count values do not appear at Argmax! By default False.

False

UserHoggBools

Sets additional boolean input for the user-friendly Hogg histogram functions.

Attributes:

Name Type Description
verbose bool

If True, print verbose output.

return_binning_parameters bool

If True, return the optimal binning phase, binning \(\alpha\) (smoothing parameter), and the nr. of bins. If False, do not return such parameters.

Parameters:

Name Type Description Default
verbose bool

If True, print verbose output. By default False.

False
return_binning_parameters bool

If True, return the optimal binning phase, binning \(\alpha\) (smoothing parameter), and the nr. of bins. If False, do not return such parameters. By default False.

False

UserHoggInput

Sets numerical input for the user-friendly Hogg histogram functions.

Attributes:

Name Type Description
data_arr DArr

Contains the copy of the data that needs to be binned.

alpha_parameters DArr | DList

Contains the \(\alpha\) smoothing parameters for the Hogg(2008) jackknife likelihood.

bin_numbers IArr | Ilist

Contains several trial bin numbers for which the jackknife likelihood is computed.

bin_phases DArr | DList

Phase factors for the binning process, as determined in Hogg (2008). Per default initialized at 0.0 for each bin.

custom_bin_width DList

Custom bin width that will be used to generate the bin width if only a single point is present in the histogram. By default initialized at 1.

Parameters:

Name Type Description Default
data_arr DArr

Contains the data that needs to be binned.

required
alpha_parameters DArr | DList

Contains the \(\alpha\) smoothing parameters for the Hogg(2008) jackknife likelihood.

required
bin_numbers IArr | IList

Contains several trial bin numbers for which the jackknife likelihood is computed.

required
bin_phases DArr | DList

Phase factors for the binning process, as determined in Hogg (2008). If None, this is initialized at [0.0].

required
custom_bin_width DList | None

The custom bin width that will be used to generate the bin width if only a single point is present in the histogram. If None, this is initialized at [1.].

required

UserInput

Sets numerical input for the user-friendly histogram functions.

Parameters:

Name Type Description Default
data_arr DArr

Contains the data that needs to be binned.

required
min_nr_bins IVar

The minimum number of bins to be considered; by default 0.

required

initialize_for_specific_edges(bin_edges)

Initialize the specific binning edges (for a histogram with specific bin edges).

Parameters:

Name Type Description Default
bin_edges DArr | None

Specific binning edges for 'histogram_blas_log_spec_edges'.

required

initialize_for_specific_width(bin_phase, bin_nr, data_min, bin_width)

Initialize the parameters necessary to compute a histogram with a specific 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 'my_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

Raises:

Type Description
ValueError

If the supplied bin_phase is unphysical. Should be in the range [0.0, 1.0).