def test_l_cv_weight(self):
     subject = from_file('floodestimation/tests/data/37017.CD3')
     analysis = GrowthCurveAnalysis(subject)
     donor = copy(subject)
     donor.similarity_dist = 0.2010
     result = analysis._l_cv_weight(donor)
     expected = 247.06  # Science Report SC050050, table 6.6, row 4 (note that donor has same record length as subject)
     self.assertAlmostEqual(result, expected, places=1)
 def test_l_cv_weight(self):
     subject = from_file('floodestimation/tests/data/37017.CD3')
     analysis = GrowthCurveAnalysis(subject)
     donor = copy(subject)
     donor.similarity_dist = 0.2010
     result = analysis._l_cv_weight(donor)
     expected = 247.06  # Science Report SC050050, table 6.6, row 4 (note that donor has same record length as subject)
     self.assertAlmostEqual(result, expected, places=1)
 def test_l_cv_weight_same_catchment(self):
     subject = from_file('floodestimation/tests/data/37017.CD3')
     analysis = GrowthCurveAnalysis(subject)
     result = analysis._l_cv_weight(subject)
     expected = 515.30  # Science Report SC050050, table 6.6, row 1
     self.assertAlmostEqual(result, expected, places=1)
 def test_l_cv_weight_same_catchment(self):
     subject = from_file('floodestimation/tests/data/37017.CD3')
     analysis = GrowthCurveAnalysis(subject)
     result = analysis._l_cv_weight(subject)
     expected = 515.30  # Science Report SC050050, table 6.6, row 1
     self.assertAlmostEqual(result, expected, places=1)