Esempio n. 1
0
class GermanyMSRTestCase(unittest.TestCase):
    """
    Tests for the magnitude-scaling relationship used in the 2018 Germany
    national seismic hazard model
    """
    def setUp(self):
        self.msr = GermanyMSR()

    def test_get_median_area(self):
        """
        This tests the MSR
        """
        self.assertAlmostEqual(self.msr.get_median_area(4.0, None),
                               0.8317637,
                               places=5)
        self.assertAlmostEqual(self.msr.get_median_area(5.0, None),
                               3.2359365,
                               places=5)
        self.assertAlmostEqual(self.msr.get_median_area(6.0, None),
                               12.589254,
                               places=5)
        self.assertAlmostEqual(self.msr.get_median_area(7.0, None),
                               48.9778819,
                               places=5)
        self.assertAlmostEqual(self.msr.get_median_area(8.0, None),
                               190.546071,
                               places=5)
class GermanyMSRTestCase(unittest.TestCase):
    """
    Tests for the magnitude-scaling relationship used in the 2018 Germany
    national seismic hazard model
    """

    def setUp(self):
        self.msr = GermanyMSR()

    def test_get_median_area(self):
        """
        This tests the MSR
        """
        self.assertAlmostEqual(self.msr.get_median_area(4.0, None), 0.8317637,
                               places=5)
        self.assertAlmostEqual(self.msr.get_median_area(5.0, None), 3.2359365,
                               places=5)
        self.assertAlmostEqual(self.msr.get_median_area(6.0, None), 12.589254,
                               places=5)
        self.assertAlmostEqual(self.msr.get_median_area(7.0, None), 48.9778819,
                               places=5)
        self.assertAlmostEqual(self.msr.get_median_area(8.0, None), 190.546071,
                               places=5)
 def setUp(self):
     self.msr = GermanyMSR()
Esempio n. 4
0
 def setUp(self):
     self.msr = GermanyMSR()