[bugfix] fig._tight=True tried to be set on None type
This commit is contained in:
parent
365657064f
commit
330e15441e
@ -477,7 +477,6 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
else:
|
else:
|
||||||
fig = None
|
fig = None
|
||||||
linecolor = 'k'
|
linecolor = 'k'
|
||||||
fig._tight = True
|
|
||||||
epickP, lpickP, Perror = earllatepicker(z_copy, nfacP, tsnrz,
|
epickP, lpickP, Perror = earllatepicker(z_copy, nfacP, tsnrz,
|
||||||
mpickP, iplot, fig=fig,
|
mpickP, iplot, fig=fig,
|
||||||
linecolor=linecolor)
|
linecolor=linecolor)
|
||||||
@ -513,7 +512,6 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
linecolor = fig_dict['plot_style']['linecolor']['rgba_mpl']
|
linecolor = fig_dict['plot_style']['linecolor']['rgba_mpl']
|
||||||
else:
|
else:
|
||||||
fig = None
|
fig = None
|
||||||
fig._tight = True
|
|
||||||
FM = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot, fig, linecolor)
|
FM = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot, fig, linecolor)
|
||||||
else:
|
else:
|
||||||
FM = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot)
|
FM = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot)
|
||||||
@ -727,7 +725,6 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
else:
|
else:
|
||||||
fig = None
|
fig = None
|
||||||
linecolor = 'k'
|
linecolor = 'k'
|
||||||
fig._tight = True
|
|
||||||
refSpick = PragPicker(arhcf2, tsnrh, pickwinS, iplot, ausS,
|
refSpick = PragPicker(arhcf2, tsnrh, pickwinS, iplot, ausS,
|
||||||
tsmoothS, aicarhpick.getpick(), fig, linecolor)
|
tsmoothS, aicarhpick.getpick(), fig, linecolor)
|
||||||
mpickS = refSpick.getpick()
|
mpickS = refSpick.getpick()
|
||||||
@ -743,7 +740,6 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
else:
|
else:
|
||||||
fig = None
|
fig = None
|
||||||
linecolor = 'k'
|
linecolor = 'k'
|
||||||
fig._tight = True
|
|
||||||
epickS1, lpickS1, Serror1 = earllatepicker(h_copy, nfacS,
|
epickS1, lpickS1, Serror1 = earllatepicker(h_copy, nfacS,
|
||||||
tsnrh,
|
tsnrh,
|
||||||
mpickS, iplot,
|
mpickS, iplot,
|
||||||
@ -762,7 +758,6 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
else:
|
else:
|
||||||
fig = None
|
fig = None
|
||||||
linecolor = ''
|
linecolor = ''
|
||||||
fig._tight = True
|
|
||||||
epickS2, lpickS2, Serror2 = earllatepicker(h_copy, nfacS,
|
epickS2, lpickS2, Serror2 = earllatepicker(h_copy, nfacS,
|
||||||
tsnrh,
|
tsnrh,
|
||||||
mpickS, iplot,
|
mpickS, iplot,
|
||||||
|
@ -130,6 +130,7 @@ def earllatepicker(X, nfac, TSNR, Pick1, iplot=0, verbosity=1, fig=None, linecol
|
|||||||
if fig == None or fig == 'None':
|
if fig == None or fig == 'None':
|
||||||
fig = plt.figure() # iplot)
|
fig = plt.figure() # iplot)
|
||||||
plt_flag = 1
|
plt_flag = 1
|
||||||
|
fig._tight = True
|
||||||
ax = fig.add_subplot(111)
|
ax = fig.add_subplot(111)
|
||||||
ax.plot(t, x, color=linecolor, linewidth=0.7, label='Data')
|
ax.plot(t, x, color=linecolor, linewidth=0.7, label='Data')
|
||||||
ax.axvspan(t[inoise[0]], t[inoise[-1]], color='y', alpha=0.2, lw=0, label='Noise Window')
|
ax.axvspan(t[inoise[0]], t[inoise[-1]], color='y', alpha=0.2, lw=0, label='Noise Window')
|
||||||
@ -323,6 +324,7 @@ def fmpicker(Xraw, Xfilt, pickwin, Pick, iplot=0, fig=None, linecolor='k'):
|
|||||||
if fig == None or fig == 'None':
|
if fig == None or fig == 'None':
|
||||||
fig = plt.figure() # iplot)
|
fig = plt.figure() # iplot)
|
||||||
plt_flag = 1
|
plt_flag = 1
|
||||||
|
fig._tight = True
|
||||||
ax1 = fig.add_subplot(211)
|
ax1 = fig.add_subplot(211)
|
||||||
ax1.plot(t, xraw, color=linecolor, linewidth=0.7)
|
ax1.plot(t, xraw, color=linecolor, linewidth=0.7)
|
||||||
ax1.plot([Pick, Pick], [max(xraw), -max(xraw)], 'b', linewidth=2, label='Pick')
|
ax1.plot([Pick, Pick], [max(xraw), -max(xraw)], 'b', linewidth=2, label='Pick')
|
||||||
@ -794,8 +796,8 @@ def checksignallength(X, pick, TSNR, minsiglength, nfac, minpercent, iplot=0, fi
|
|||||||
if fig == None or fig == 'None':
|
if fig == None or fig == 'None':
|
||||||
fig = plt.figure() # iplot)
|
fig = plt.figure() # iplot)
|
||||||
plt_flag = 1
|
plt_flag = 1
|
||||||
ax = fig.add_subplot(111)
|
|
||||||
fig._tight = True
|
fig._tight = True
|
||||||
|
ax = fig.add_subplot(111)
|
||||||
ax.plot(t, rms, color=linecolor, linewidth=0.7, label='RMS Data')
|
ax.plot(t, rms, color=linecolor, linewidth=0.7, label='RMS Data')
|
||||||
ax.axvspan(t[inoise[0]], t[inoise[-1]], color='y', alpha=0.2, lw=0, label='Noise Window')
|
ax.axvspan(t[inoise[0]], t[inoise[-1]], color='y', alpha=0.2, lw=0, label='Noise Window')
|
||||||
ax.axvspan(t[isignal[0]], t[isignal[-1]], color='b', alpha=0.2, lw=0, label='Signal Window')
|
ax.axvspan(t[isignal[0]], t[isignal[-1]], color='b', alpha=0.2, lw=0, label='Signal Window')
|
||||||
|
Loading…
Reference in New Issue
Block a user