def test_xcorr_3c(self): st = read() st2 = read() for tr in st2: tr.data = -5 * np.roll(tr.data, 50) shift, value, x = xcorr_3c(st, st2, 200, full_xcorr=True) self.assertEqual(shift, -50) self.assertAlmostEqual(value, -0.998, 3)
def test_xcorr_3c(self): st = read() st2 = read() for tr in st2: tr.data = -5 * np.roll(tr.data, 50) shift, value, x = xcorr_3c(st, st2, 200, full_xcorr=True) self.assertEqual(shift, -50) self.assertAlmostEqual(value, -0.998, 3)
def test_xcorr_3c(self): st = read() st2 = read() for tr in st2: tr.data = -5 * np.roll(tr.data, 50) shift, value, x = xcorr_3c(st, st2, 200, full_xcorr=True) assert shift == -50 assert round(abs(value - -0.998), 3) == 0