e15190.neutron_wall.pulse_shape_discrimination.FastTotalFitter

class e15190.neutron_wall.pulse_shape_discrimination.FastTotalFitter(total, cfast, particle, **kwargs)

Functions

__init__(total, cfast, particle, **kwargs)

fit(**kwargs)

plot_data([ax, mask])

plot_fit([ax])

Properties

score_of_data

A custom score to evaluate the quality of data.

__init__(total, cfast, particle, **kwargs)
property score_of_data

A custom score to evaluate the quality of data.

A simple metric would be to compute the ratio between the number of inliers and the total number of data points. But in our case, outliers are commonly expected at large TOTAL values due to lack of statistics. Hence, we want to weight the numbers. For outliers at low TOTAL values, more weights would be assigned to act as heavy penalties; for outliers at high TOTAL values, less weights would be assigned.

Returns

score – The metric that measures the quality of data. A score of 1 implies zero outliers. A score of 0 implies all data points are outliers. For our application, we found empirically that scores between 0.6 to 0.8 can be set as a separator between good and bad data.

Return type

float