def test_rotate_rt_and_12():

    r = np.array([1.0, 0.0])
    t = np.array([0.0, 1.0])
    azi1 = 30
    azi2 = 120
    baz = 240

    d1, d2 = rotate.rotate_rt_12(r, t, baz, azi1, azi2)
    r_new, t_new = rotate.rotate_12_rt(d1, d2, baz, azi1, azi2)

    npt.assert_allclose(r, r_new)
    npt.assert_allclose(t, t_new)
Example #2
0
def test_rotate_rt_and_12():

    r = np.array([1.0, 0.0])
    t = np.array([0.0, 1.0])
    azi1 = 30
    azi2 = 120
    baz = 240

    d1, d2 = rotate.rotate_rt_12(r, t, baz, azi1, azi2)
    r_new, t_new = rotate.rotate_12_rt(d1, d2, baz, azi1, azi2)

    npt.assert_allclose(r, r_new)
    npt.assert_allclose(t, t_new)
def test_rotate_12_rt():

    d1 = np.array([1.0, 0.0])
    d2 = np.array([0.0, 1.0])
    azi1 = 30
    azi2 = 120
    baz = 240

    r, t = rotate.rotate_12_rt(d1, d2, baz, azi1, azi2)

    n, e = rotate.rotate_12_ne(d1, d2, azi1, azi2)
    r_true, t_true = rotate.rotate_ne_12(n, e, baz - 180, baz - 90)

    npt.assert_allclose(r, r_true)
    npt.assert_allclose(t, t_true)
Example #4
0
def test_rotate_12_rt():

    d1 = np.array([1.0, 0.0])
    d2 = np.array([0.0, 1.0])
    azi1 = 30
    azi2 = 120
    baz = 240

    r, t = rotate.rotate_12_rt(d1, d2, baz, azi1, azi2)

    n, e = rotate.rotate_12_ne(d1, d2, azi1, azi2)
    r_true, t_true = rotate.rotate_ne_12(n, e, baz - 180, baz - 90)

    npt.assert_allclose(r, r_true)
    npt.assert_allclose(t, t_true)