def test_zoeppritz(self): theta = 40. reflect = avo.zoeppritz(vp1, vs1, rho1, vp2, vs2, rho2, theta) # Number manually verified using # spreadsheet from http://tbberge.com/id63.html self.assertAlmostEquals(reflect, -0.112236, places=5)
def test_bortfeld3(self): reflect = avo.bortfeld3(vp1, vs1, rho1, vp2, vs2, rho2, theta) reflect_zoep = avo.zoeppritz(vp1, vs1, rho1, vp2, vs2, rho2, theta) # See if it is within .1 of zoep for < 45 deg test = np.allclose(reflect, reflect_zoep, rtol=self.tolerance) self.assertTrue(test)
def test_shuey(self): theta = np.arange(30) reflect = avo.shuey(vp1, vs1, rho1, vp2, vs2, rho2, theta) reflect_zoep = avo.zoeppritz(vp1, vs1, rho1, vp2, vs2, rho2, theta) # See if it is within tol of zoep. test = np.allclose(reflect, reflect_zoep, rtol=self.tolerance) self.assertTrue(test)
def test_zoeppritz_rpp(self): theta = 40. reflect = avo.zoeppritz(vp1, vs1, rho1, vp2, vs2, rho2, theta) reflect_rpp = avo.zoeppritz_rpp(vp1, vs1, rho1, vp2, vs2, rho2, theta) # Should be the same as the exact solution. self.assertAlmostEquals(reflect_rpp, reflect, places=3)
def test_shuey2(self): reflect = avo.shuey2(vp1, vs1, rho1, vp2, vs2, rho2, theta) reflect_zoep = avo.zoeppritz(vp1, vs1, rho1, vp2, vs2, rho2, theta) # See if it is within .1 of zoep for < 45 deg test = np.allclose(reflect, reflect_zoep, rtol=self.tolerance) self.assertTrue(test)
def test_fatti(self): reflect = avo.fatti(vp1, vs1, rho1, vp2, vs2, rho2, theta) reflect_zoep = avo.zoeppritz(vp1, vs1, rho1, vp2, vs2, rho2, theta) # See if it is within tol of zoep for < 40 deg. test = np.allclose(reflect, reflect_zoep, rtol=self.tolerance) self.assertTrue(test) reflect = avo.fatti(arr_vp1, arr_vs1, arr_rho1, arr_vp2, arr_vs2, arr_rho2, arr_theta)
def test_akirichards(self): reflect = avo.akirichards(vp1, vs1, rho1, vp2, vs2, rho2, theta) reflect_zoep = avo.zoeppritz(vp1, vs1, rho1, vp2, vs2, rho2, theta) # See if it is within tol of zoep for < 40 deg. test = np.allclose(reflect, reflect_zoep, rtol=self.tolerance) self.assertTrue(test) # Test it won't complain about arrays. reflect = avo.akirichards(arr_vp1, arr_vs1, arr_rho1, arr_vp2, arr_vs2, arr_rho2, arr_theta)
def test_akirichards_alt(self): reflect = avo.akirichards_alt(vp1, vs1, rho1, vp2, vs2, rho2, theta) reflect_zoep = avo.zoeppritz(vp1, vs1, rho1, vp2, vs2, rho2, theta) # See if it is within .1 of zoep for < 45 deg test = np.allclose(reflect, reflect_zoep, rtol=self.tolerance) self.assertTrue(test) reflect = avo.akirichards_alt(arr_vp1, arr_vs1, arr_rho1, arr_vp2, arr_vs2, arr_rho2, arr_theta)
def test_zoeppritz_rpp(self): theta = 40. reflect = avo.zoeppritz(vp1, vs1, rho1, vp2, vs2, rho2, theta) reflect_rpp = avo.zoeppritz_rpp(vp1, vs1, rho1, vp2, vs2, rho2, theta) self.assertAlmostEquals(reflect, reflect_rpp, places=5)