コード例 #1
0
    def test_wrapper(self):
        """
        Tests the reflectivity wrapper function
        """

        theta = 15.0

        ref_wrap = rock_reflectivity(self.Rp0, self.Rp1,
                                     theta=theta,
                                     method=avo.zoeppritz)

        ref = avo.zoeppritz(self.vp0, self.vs0, self.rho0,
                            self.vp1, self.vs1, self.rho1,
                            theta)

        self.assertEqual(ref, ref_wrap)
コード例 #2
0
    def test_wrapper(self):
        """
        Tests the reflectivity wrapper function
        """

        theta = 15.0

        ref_wrap = rock_reflectivity(self.Rp0,
                                     self.Rp1,
                                     theta=theta,
                                     method=avo.zoeppritz)

        ref = avo.zoeppritz(self.vp0, self.vs0, self.rho0, self.vp1, self.vs1,
                            self.rho1, theta)

        self.assertEqual(ref, ref_wrap)
コード例 #3
0
    def test_get_reflectivity(self):

        cmap = {rgb(150, 100, 100): self.Rp0, rgb(100, 150, 100): self.Rp1}
        theta = 15.0
        data = np.zeros((100, 100, 3))

        data[:50, :, :] += [150, 100, 100]
        data[50:, :, :] += [100, 150, 100]

        reflectivity = \
          get_reflectivity( data, cmap, theta,
                            reflectivity_method=avo.zoeppritz )

        truth = avo.zoeppritz(self.vp0, self.vs0, self.rho0, self.vp1,
                              self.vs1, self.rho1, theta)

        test = np.zeros((100, 100, 1))
        test[49, :, 0] = truth

        self.assertTrue(np.array_equal(test, reflectivity))
コード例 #4
0
    def test_get_reflectivity(self):

        cmap = {rgb(150, 100, 100): self.Rp0, rgb(100, 150, 100): self.Rp1}
        theta = 15.0
        data = np.zeros((100, 100, 3))

        data[:50, :, :] += [150, 100, 100]
        data[50:, :, :] += [100, 150, 100]

        reflectivity = \
          get_reflectivity( data, cmap, theta,
                            reflectivity_method=avo.zoeppritz )

        truth = avo.zoeppritz( self.vp0, self.vs0, self.rho0,
                               self.vp1, self.vs1, self.rho1,
                               theta )

        test = np.zeros( (100,100,1) )
        test[49,:,0] = truth

        self.assertTrue( np.array_equal( test, reflectivity ) )