def calculate_IDL(self, data_lst, Concentration, debug_on):
DegreesOfFreedom = len(data_lst) - 1
if DegreesOfFreedom < 1:
return 'PoorSensitivity'
Ta = self.T_Table_99Confidence.get(DegreesOfFreedom, "TooMany")
if debug_on == True:
print('DegreesOfFreedom: ', DegreesOfFreedom)
print('Concentration,: ', Concentration)
print('data_lst: ', data_lst)
if Ta == "TooMany":
raise Exception('There are more than 21 data values for the IDL calculation and therefore not enough degrees of freedom in T_Table_99Confidence dictionary.')
Averge = statistics.mean(data_lst)
StandardDeviation = statistics.stdev(data_lst)
RSD = (StandardDeviation/Averge) * 100
return round(((Ta * RSD * Concentration)/100),2)
评论列表
文章目录