Beispiel #1
0
 def test01(self):
     """
     Check the a value
     """
     srcl = _split_point_source(self.src1)
     self.assertEqual(srcl[0].mfd.a_val, 1.8450980400142569)
     self.assertEqual(srcl[1].mfd.a_val, 1.4771212547196624)
Beispiel #2
0
 def test02(self):
     srcl = model._split_point_source(self.src2)
     #
     com = numpy.array(srcl[0].mfd.occurrence_rates)
     exp = numpy.array(self.src2.mfd.occurrence_rates) * 0.7
     numpy.testing.assert_array_equal(com, exp)
     #
     com = numpy.array(srcl[1].mfd.occurrence_rates)
     exp = numpy.array(self.src2.mfd.occurrence_rates) * 0.3
     numpy.testing.assert_array_equal(com, exp)
Beispiel #3
0
 def test02(self):
     """
     Check occurrence rates
     """
     srcl = _split_point_source(self.src2)
     tmp = numpy.array(srcl[0].mfd.get_annual_occurrence_rates())
     com = numpy.array([r[1] for r in tmp])
     print(com)
     exp = numpy.array([2.1, 1.4, 0.7])
     numpy.testing.assert_allclose(com, exp, rtol=1e-5, atol=0)
Beispiel #4
0
 def test01(self):
     srcl = model._split_point_source(self.src1)
     self.assertEqual(srcl[0].mfd.a_val, 1.8450980400142569)
     self.assertEqual(srcl[1].mfd.a_val, 1.4771212547196624)
Beispiel #5
0
 def test02(self):
     srcl = _split_point_source(self.src2)
     com = numpy.array(self.src2.mfd.occurrence_rates)
     exp = numpy.array([2.1, 1.4, 0.7])
     numpy.testing.assert_array_equal(com, exp)