def test_gm_calculation_soil_reference(self):
        """ Test mean and std calculation - CY14 on reference rock"""

        # Modified gmpe
        mgmpe = CY14SiteTerm(gmpe_name='ChiouYoungs2014')

        # Set parameters
        sites = Dummy.get_site_collection(4,
                                          vs30=1130.,
                                          vs30measured=True,
                                          z1pt0=0.)
        rup = Dummy.get_rupture(mag=6.0)
        rup.dip = 90.
        rup.ztor = 0.
        dists = DistancesContext()
        dists.rrup = np.array([1., 10., 30., 70.])
        dists.rx = np.array([1., 10., 30., 70.])
        dists.rjb = np.array([1., 10., 30., 70.])
        imt = PGA()
        stdt = [const.StdDev.TOTAL]

        # Compute results
        mean, stds = mgmpe.get_mean_and_stddevs(sites, rup, dists, imt, stdt)

        # Compute the expected results
        gmpe = ChiouYoungs2014()
        mean_expected, stds_expected = gmpe.get_mean_and_stddevs(
            sites, rup, dists, imt, stdt)
        # Test that for reference soil conditions the modified GMPE gives the
        # same results of the original gmpe
        np.testing.assert_almost_equal(mean, mean_expected)
        np.testing.assert_almost_equal(stds, stds_expected)
    def setUp(self):

        # Set parameters - Setting z1pt0 does not make sense but here we
        # want to make sure that the modified gmm provided GM amplified
        # by the site term exactly as the original model.
        sites = Dummy.get_site_collection(4,
                                          vs30=400.,
                                          vs30measured=True,
                                          z1pt0=0.)
        rup = Dummy.get_rupture(mag=6.0)
        rup.dip = 90.
        rup.ztor = 0.
        dists = DistancesContext()
        dists.rrup = np.array([1., 10., 30., 70.])
        dists.rx = np.array([1., 10., 30., 70.])
        dists.rjb = np.array([1., 10., 30., 70.])
        stdt = [const.StdDev.TOTAL]

        self.rup = rup
        self.dists = dists
        self.stdt = stdt
        self.sites = sites