DataProcessor.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:SciData_08-17-2017 作者: kitestring 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号