nectarchain.trr_test_suite.utils#

Functions

argmedian

Returns the index of the median element in the input array x along the specified axis.

deadtime_and_expo_fit

Computes the deadtime and exponential fit parameters for a given dataset.

err_ratio

Computes the error ratio for a given nominator, denominator, and their respective errors.

err_sum

Computes the square root of the sum of the squares of err_a and err_b, plus twice the covariance cov_a_b.

fit_function_hv

Computes a function of the form a/sqrt(x) + b.

linear_fit_function

Computes a linear function of the form a*x + b.

pe2photons

Converts the input value x from photons to photoelectrons (PE) by multiplying it by 4.

pe_from_intensity_percentage

Converts a percentage of intensity to the corresponding charge value based on a known calibration.

photons2pe

Converts the input value x from photoelectrons (PE) to photons by dividing it by 4.

pois

Computes the expected distribution for a Poisson process with rate parameter R.

second_degree_fit_function

Computes a quadratic function of the form a*(x**2) + b*x + c.

third_degree_fit_function

Computes a function of the form (a*x + b)/(1+c) + d.

Classes

ExponentialFitter

Represents an exponential fitter class that computes the expected distribution and the minus 2 log likelihood for a given dataset and exponential parameters.