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)
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)