uvex_transients.utils.stat_utils.fractional_error_to_bounds#

uvex_transients.utils.stat_utils.fractional_error_to_bounds(error: tuple[float, float]) → tuple[float, float][source]#

Convert a fractional error of a positive quantity to multiplicative bounds on it.

Parameters:

error (tuple of float) – The (lower, upper) fractional error.

Returns:

The factors (max(0, 1 - lower), 1 + upper) that the value is multiplied by to give its lower and upper bounds. The lower factor is floored at zero, since a positive quantity cannot have a negative bound.

Return type:

tuple of float