Exemplo n.º 1
0
 def test_max_p2t(self):
     """Test the minding of maximum peak-to-trough."""
     data = np.random.randn(1000)
     data[500] = 20
     delta = 0.01
     amplitude, period, time = _max_p2t(data=data, delta=delta)
     self.assertTrue(amplitude > 15)
     self.assertTrue(amplitude < 25)
     self.assertEqual(round(time), 5)
Exemplo n.º 2
0
 def test_max_p2t(self):
     """Test the minding of maximum peak-to-trough."""
     import numpy as np
     from eqcorrscan.utils.mag_calc import _max_p2t
     data = np.random.randn(1000)
     data[500] = 20
     delta = 0.01
     amplitude, period, time = _max_p2t(data=data, delta=delta)
     self.assertTrue(amplitude > 15)
     self.assertTrue(amplitude < 25)
     self.assertEqual(round(time), 5)
Exemplo n.º 3
0
 def test_max_p2t(self):
     """Test the minding of maximum peak-to-trough."""
     import numpy as np
     from eqcorrscan.utils.mag_calc import _max_p2t
     data = np.random.randn(1000)
     data[500] = 20
     delta = 0.01
     amplitude, period, time = _max_p2t(data=data, delta=delta)
     self.assertTrue(amplitude > 15)
     self.assertTrue(amplitude < 25)
     self.assertEqual(round(time), 5)