Skip to main content

py_binned_guide_term

Function py_binned_guide_term 

Source
pub fn py_binned_guide_term(
    nll: PyNLL,
    variable: Bound<'_, PyAny>,
    amplitude_sets: Vec<Vec<String>>,
    bins: usize,
    range: (f64, f64),
    count_sets: Vec<Vec<f64>>,
    error_sets: Option<Vec<Vec<f64>>>,
) -> PyResult<PyLikelihoodExpression>
Expand description

A χ²-like term which uses a known binned result to guide the fit

This term takes a list of subsets of amplitudes, activates each set, and compares the projected histogram to the known one provided at construction. Both count_sets and error_sets should have the same shape, and their first dimension should be the same as that of amplitude_sets.

§Parameters

nll: NLL variable : {laddu.Mass, laddu.CosTheta, laddu.Phi, laddu.PolAngle, laddu.PolMagnitude, laddu.Mandelstam} The variable to use for binning amplitude_sets : list of list of str A list of lists of amplitudes to activate, with each inner list representing a set that corresponds to the provided binned data bins : int range : tuple of (min, max) The range of the variable to use for binning count_sets : list of list of float A list of binned counts for each amplitude set error_sets : list of list of float, optional A list of bin errors for each amplitude set (square root of count_sets if None is provided)

§Returns

LikelihoodExpression A term that can be combined with other likelihood expressions.