nectarchain.trr_test_suite.utils.deadtime_and_expo_fit#
- deadtime_and_expo_fit(time_tot, deadtime_us, run, output_plot=None)[source]#
Computes the deadtime and exponential fit parameters for a given dataset.
- Args:
time_tot (float): The total time of the dataset. deadtime_us (float): The deadtime of the dataset in microseconds. run (int): The run number. output_plot (str, optional): The path to save the output plot.
- Returns:
- tuple: A tuple containing the following values:
deadtime (float): The deadtime of the dataset.
deadtime_bin (float): The bin edge corresponding to the deadtime.
deadtime_err (float): The error on the deadtime.
deadtime_bin_length (float): The length of the deadtime bin.
total_delta_t_for_busy_time (float): The total time of the dataset.
parameter_A_new (float): The amplitude parameter of the exponential fit.
parameter_R_new (float): The rate parameter of the exponential fit.
parameter_A_err_new (float): The error on the amplitude parameter.
parameter_R_err_new (float): The error on the rate parameter.
first_bin_length (float): The length of the first bin.
tot_nr_events_histo (int): The total number of events in the histogram.