def get_DRAT(self): # def get_DRAT(delta_y_prime, delta_x_prime, max_ptrm_check): DRAT, L = lib_ptrm.get_DRAT(self.pars['delta_x_prime'], self.pars['delta_y_prime'], self.pars['max_ptrm_check']) self.pars['DRAT'] = DRAT self.pars['length_best_fit_line'] = L return DRAT
def test_DRAT(self): ref_DRAT = (self.ref_max_ptrm_check / self.ref_L) * 100.0 DRAT, L = lib_ptrm.get_DRAT(self.delta_y_prime, self.delta_x_prime, self.ref_max_ptrm_check) self.assertAlmostEqual(ref_DRAT, DRAT) self.assertAlmostEqual(self.ref_L, L)
def test_DRAT(self): ref_DRAT = (old_div(self.ref_max_ptrm_check, self.ref_L)) * 100. DRAT, L = lib_ptrm.get_DRAT(self.delta_y_prime, self.delta_x_prime, self.ref_max_ptrm_check) self.assertAlmostEqual(ref_DRAT, DRAT) self.assertAlmostEqual(self.ref_L, L)