Loading minke/sources.py +2 −3 Original line number Diff line number Diff line Loading @@ -144,10 +144,9 @@ class Waveform(object): if hasattr(self, "supernova"): hp.data.data, hx.data.data, hp0.data.data, hx0.data.data = scipy.signal.detrend(hp.data.data), scipy.signal.detrend(hx.data.data), scipy.signal.detrend(hp0.data.data), scipy.signal.detrend(hx0.data.data) # Rescale for a given distance if distance and hasattr(self, "supernova"): if row.amplitude and hasattr(self, "supernova"): rescale = 1.0 / (self.file_distance / row.amplitude) print rescale hp, hx, hp0, hx0 = hp * rescale, hx * rescale, hp0 * rescale,hx0 * rescale hp.data.data, hx.data.data, hp0.data.data, hx0.data.data = hp.data.data * rescale, hx.data.data * rescale, hp0.data.data * rescale, hx0.data.data * rescale return hp, hx, hp0, hx0 Loading setup.py +7 −4 Original line number Diff line number Diff line Loading @@ -16,13 +16,16 @@ with open('HISTORY.rst') as history_file: requirements = [ # 'numpy', # 'matplotlib', # 'pandas', # 'scipy', 'numpy', 'matplotlib', 'pandas', 'scipy', ] test_requirements = [ "py", "pytest", "coverage" # TODO: put package test requirements here ] Loading tests/test_sources.py +1 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ class TestMinkeSources(unittest.TestCase): self.assertAlmostEqual(sn_10.params['amplitude'],float(0.1 * sn_100.params['amplitude'])) sn_10_hp, _, _, _ = sn_10._generate() sn_100_hp, _, _, _ = sn_100._generate() assert np.all(sn_100_hp.data.data == 0.1*sn_10_hp.data.data) assert np.all(sn_100_hp.data.data == 10*sn_10_hp.data.data) def test_OttXML(self): mdcset = mdctools.MDCSet(['L1', 'H1']) Loading Loading
minke/sources.py +2 −3 Original line number Diff line number Diff line Loading @@ -144,10 +144,9 @@ class Waveform(object): if hasattr(self, "supernova"): hp.data.data, hx.data.data, hp0.data.data, hx0.data.data = scipy.signal.detrend(hp.data.data), scipy.signal.detrend(hx.data.data), scipy.signal.detrend(hp0.data.data), scipy.signal.detrend(hx0.data.data) # Rescale for a given distance if distance and hasattr(self, "supernova"): if row.amplitude and hasattr(self, "supernova"): rescale = 1.0 / (self.file_distance / row.amplitude) print rescale hp, hx, hp0, hx0 = hp * rescale, hx * rescale, hp0 * rescale,hx0 * rescale hp.data.data, hx.data.data, hp0.data.data, hx0.data.data = hp.data.data * rescale, hx.data.data * rescale, hp0.data.data * rescale, hx0.data.data * rescale return hp, hx, hp0, hx0 Loading
setup.py +7 −4 Original line number Diff line number Diff line Loading @@ -16,13 +16,16 @@ with open('HISTORY.rst') as history_file: requirements = [ # 'numpy', # 'matplotlib', # 'pandas', # 'scipy', 'numpy', 'matplotlib', 'pandas', 'scipy', ] test_requirements = [ "py", "pytest", "coverage" # TODO: put package test requirements here ] Loading
tests/test_sources.py +1 −1 Original line number Diff line number Diff line Loading @@ -70,7 +70,7 @@ class TestMinkeSources(unittest.TestCase): self.assertAlmostEqual(sn_10.params['amplitude'],float(0.1 * sn_100.params['amplitude'])) sn_10_hp, _, _, _ = sn_10._generate() sn_100_hp, _, _, _ = sn_100._generate() assert np.all(sn_100_hp.data.data == 0.1*sn_10_hp.data.data) assert np.all(sn_100_hp.data.data == 10*sn_10_hp.data.data) def test_OttXML(self): mdcset = mdctools.MDCSet(['L1', 'H1']) Loading