def test_37017(self): subject = from_file('floodestimation/tests/data/37017.CD3') analysis = GrowthCurveAnalysis(subject) self.assertEqual(len(subject.amax_records), 34) var, skew = analysis._var_and_skew(subject) self.assertAlmostEqual(var, 0.2232, places=4) self.assertAlmostEqual(skew, -0.0908, places=4)
def test_l_cv_and_skew(self): gauged_catchments = CatchmentCollections(self.db_session) catchment = from_file('floodestimation/tests/data/37017.CD3') analysis = GrowthCurveAnalysis(catchment, gauged_catchments) var, skew = analysis._var_and_skew(catchment) self.assertAlmostEqual(var, 0.2232, places=4) self.assertAlmostEqual(skew, -0.0908, places=4)
def test_l_cv_and_skew_one_donor_urban(self): catchment = from_file('floodestimation/tests/data/37017.CD3') analysis = GrowthCurveAnalysis(catchment, year=2000) analysis.donor_catchments = [catchment] var, skew = analysis._var_and_skew(analysis.donor_catchments) self.assertAlmostEqual(var, 0.21987, places=4) self.assertAlmostEqual(skew, -0.08746, places=4)