[Bugfix] Multiple small bugfixxes keeping NLL from working in python3.+

This commit is contained in:
jeldrik committed 2022-09-15 14:31:13 +02:00
1 parent 5ef427ec12
commit 2d33a60421
4 files changed
+9 -7

No files matched your search

+5 -1
View File
@@ -144,6 +144,10 @@ class Magnitude(object):
azimuthal_gap=self.origin_id.get_referred_object().quality.azimuthal_gap)
else:
# no scaling necessary
# Temporary fix needs rework
if (len(self.magnitudes.keys()) == 0 ):
print ( "Error in local magnitude calculation " )
return None
mag = ope.Magnitude(
mag=np.median([M.mag for M in self.magnitudes.values()]),
magnitude_type=self.type,
@@ -602,7 +606,7 @@ def calcsourcespec(wfstream, onset, vp, delta, azimuth, incidence,
N = min(int(np.power(m, 2)), 16384)
# N = int(np.power(m, 2))
y = dt * np.fft.fft(xdat, N)
Y = abs(y[: N / 2])
Y = abs(y[: int( N / 2)])
L = (N - 1) / freq
f = np.arange(0, fny, 1 / L)