[bugfix] Plot was not enabled, indentation correction (though uncomment)

This commit is contained in:
Ludger Küperkoch 2019-06-19 16:52:31 +02:00
parent bf20ad92da
commit bae20e7e7c

View File

@ -631,7 +631,6 @@ def calcsourcespec(wfstream, onset, vp, delta, azimuth, incidence,
# if verbosity: # if verbosity:
# print("calcsourcespec: Using w0-value = %e m/Hz and fc = %f Hz" % ( # print("calcsourcespec: Using w0-value = %e m/Hz and fc = %f Hz" % (
# w0, fc)) # w0, fc))
if iplot > 1: if iplot > 1:
f1 = plt.figure() f1 = plt.figure()
tLdat = np.arange(0, len(Ldat) * dt, dt) tLdat = np.arange(0, len(Ldat) * dt, dt)
@ -666,6 +665,12 @@ def calcsourcespec(wfstream, onset, vp, delta, azimuth, incidence,
plt.xlabel('Frequency [Hz]') plt.xlabel('Frequency [Hz]')
plt.ylabel('Amplitude [m/Hz]') plt.ylabel('Amplitude [m/Hz]')
plt.grid() plt.grid()
plt.show()
try:
input()
except SyntaxError:
pass
plt.close(f1)
return w0, fc return w0, fc
@ -773,7 +778,6 @@ def fitSourceModel(f, S, fc0, iplot, verbosity=False):
if verbosity: if verbosity:
print( print(
"fitSourceModel: best fc: {0} Hz, best w0: {1} m/Hz".format(fc, w0)) "fitSourceModel: best fc: {0} Hz, best w0: {1} m/Hz".format(fc, w0))
if iplot > 1: if iplot > 1:
plt.figure() # iplot) plt.figure() # iplot)
plt.loglog(f, S, 'k') plt.loglog(f, S, 'k')
@ -797,5 +801,11 @@ def fitSourceModel(f, S, fc0, iplot, verbosity=False):
plt.plot(f[il:ir], stdfc, '*') plt.plot(f[il:ir], stdfc, '*')
plt.title('Standard Deviations of Corner Frequencies') plt.title('Standard Deviations of Corner Frequencies')
plt.xlabel('Corner Frequencies [Hz]') plt.xlabel('Corner Frequencies [Hz]')
plt.show()
try:
input()
except SyntaxError:
pass
plt.close()
return w0, fc return w0, fc