Ejemplo n.º 1
0
 def test_classicSTALTAPyC(self):
     """
     Test case for ctypes version of recSTALTA
     """
     nsta, nlta = 5, 10
     c1 = classicSTALTA(self.data, nsta, nlta)
     c2 = classicSTALTAPy(self.data, nsta, nlta)
     self.assertTrue(np.allclose(c1, c2, rtol=1e-10))
     ref = np.array([0.38012302, 0.37704431, 0.47674533, 0.67992292])
     self.assertTrue(np.allclose(ref, c2[99:103]))
Ejemplo n.º 2
0
 def test_classicSTALTAPyC(self):
     """
     Test case for ctypes version of recSTALTA
     """
     nsta, nlta = 5, 10
     c1 = classicSTALTA(self.data, nsta, nlta)
     c2 = classicSTALTAPy(self.data, nsta, nlta)
     self.assertTrue(np.allclose(c1, c2, rtol=1e-10))
     ref = np.array([0.38012302, 0.37704431, 0.47674533, 0.67992292])
     self.assertTrue(np.allclose(ref, c2[99:103]))