Exemplo n.º 1
0
def test_tilt():
    """test tilt depth."""

    datin = Data()
    datin.data = np.ma.array([[0, 0, .1, .5, 1], [0, .1, .5, 1, .5],
                              [.1, .5, 1, .5, .1], [.5, 1, .5, .1, 0],
                              [1, .5, .1, 0, 0]])

    tmp = tiltdepth.TiltDepth(None)
    tmp.indata = {'Raster': [datin]}
    tmp.dsb_dec.setValue(0.)
    tmp.dsb_inc.setValue(90.)
    tmp.settings(True)
    tmp.change_band1()

    datout2 = tmp.depths

    datout = np.array([[3.93612464, -1.99438548, 1., 0.32962923],
                       [3.49438548, -2.49438548, 1., 0.34958333],
                       [2.99438548, -2.99438548, 1., 0.34958333],
                       [1.98888969, -1.98888969, 2., 0.36451351],
                       [2.48888969, -1.48759916, 2., 0.3654272]])

    np.testing.assert_array_almost_equal(datout2, datout)
Exemplo n.º 2
0
 def depth_susc(self):
     """ Depth and Susceptibility calculations """
     fnc = tiltdepth.TiltDepth(self.parent)
     self.parent.item_insert("Step", "Tilt\nDepth\nInterpretation", fnc)
Exemplo n.º 3
0
 def depth_susc(self):
     """Depth and Susceptibility calculations."""
     fnc = tiltdepth.TiltDepth(self.parent)
     self.parent.item_insert('Step', 'Tilt Depth Interpretation', fnc)