exceptions¶
Documentation for the exception classes in the utilities.exception module:
- class utilities.exceptions.InvalidSourceError(source)[source]¶
Exception that gives an error message if the type of source file given is incorrect.
- Parameters:
source (str) – Invalid source type given by the user.
- class utilities.exceptions.LoadHeadError(header_path)[source]¶
Exception that gives an error message if the header file cannot be found in the selected path.
- Parameters:
header_path (str) – Invalid header path given by the user.
- class utilities.exceptions.IncorrectFractionError(f)[source]¶
Exception that gives an error message if the given fraction of signal events (to be used in the dataset generation) is not in the physical interval (0,1).
- Parameters:
f (float) – Invalid fraction given by the user.
- class utilities.exceptions.IncorrectNumGenError(num_mc, num_data, num_toyb, num_toys)[source]¶
Exception that gives an error if the given number of events to be stored in the MC and mixed dataset is incompatible with the event size of the toyMCs.
- Parameters:
num_mc (int) – Invalid number of mc events requested by the user.
num_data (int) – Invalid number of data events requested by the user.
num_toyb (int) – Number of events in the background toy.
num_toys (int) – Number of events in the signal toy.
- __init__(num_mc, num_data, num_toyb, num_toys)[source]¶
- Parameters:
num_mc (int) – Invalid number of mc events requested by the user.
num_data (int) – Invalid number of data events requested by the user.
num_toyb (int) – Number of events in the background toy.
num_toys (int) – Number of events in the signal toy.
- class utilities.exceptions.IncorrectEfficiencyError(eff)[source]¶
Exception that gives an error if the given value of efficiency is not in the physical interval (0,1).
- Parameters:
eff (float) – Invalid efficiency/specificity given by the user.
- class utilities.exceptions.IncorrectIterableError(input, target_length, input_name='input')[source]¶
Exception that gives an error if the length of a list/tuple is incorrect.
- Parameters:
input (str) – Invalid input given by the user.
target_length (int) – Minimum length required for the list/tuple by the function.
input_name – Name of invalid input given by the user.