コード例 #1
0
ファイル: test_trigger.py プロジェクト: nloadholtes/obspy
 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]))
コード例 #2
0
ファイル: test_trigger.py プロジェクト: MAimmersivX/obspy
 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]))