[rename] real_Bool/real_None -> get_Bool/get_None
This commit is contained in:
@@ -20,7 +20,7 @@ from pylot.core.pick.picker import AICPicker, PragPicker
|
||||
from pylot.core.pick.utils import checksignallength, checkZ4S, earllatepicker, \
|
||||
getSNR, fmpicker, checkPonsets, wadaticheck, get_pickparams, get_quality_class
|
||||
from pylot.core.util.utils import getPatternLine, gen_Pool,\
|
||||
real_Bool, identifyPhaseID, real_None, correct_iplot
|
||||
get_Bool, identifyPhaseID, get_None, correct_iplot
|
||||
|
||||
from obspy.taup import TauPyModel
|
||||
from obspy import Trace
|
||||
@@ -272,7 +272,7 @@ class AutopickStation(object):
|
||||
self.pickparams = copy.deepcopy(pickparam)
|
||||
self.verbose = verbose
|
||||
self.iplot = correct_iplot(iplot)
|
||||
self.fig_dict = real_None(fig_dict)
|
||||
self.fig_dict = get_None(fig_dict)
|
||||
self.metadata = metadata
|
||||
self.origin = origin
|
||||
|
||||
@@ -779,7 +779,7 @@ class AutopickStation(object):
|
||||
# save filtered trace in instance for later plotting
|
||||
self.tr_filt_z_bpz2 = tr_filt
|
||||
|
||||
if real_Bool(self.pickparams['use_taup']) is True and self.origin is not None:
|
||||
if get_Bool(self.pickparams['use_taup']) is True and self.origin is not None:
|
||||
Lc = np.inf
|
||||
try:
|
||||
# modify pstart, pstop to be around theoretical onset if taupy should be used, else does nothing
|
||||
|
||||
+11
-11
@@ -13,7 +13,7 @@ import numpy as np
|
||||
from scipy.signal import argrelmax
|
||||
from obspy.core import Stream, UTCDateTime
|
||||
|
||||
from pylot.core.util.utils import real_Bool, real_None, SetChannelComponents
|
||||
from pylot.core.util.utils import get_Bool, get_None, SetChannelComponents
|
||||
|
||||
|
||||
def earllatepicker(X, nfac, TSNR, Pick1, iplot=0, verbosity=1, fig=None, linecolor='k'):
|
||||
@@ -61,7 +61,7 @@ def earllatepicker(X, nfac, TSNR, Pick1, iplot=0, verbosity=1, fig=None, linecol
|
||||
try:
|
||||
iplot = int(iplot)
|
||||
except:
|
||||
if real_Bool(iplot):
|
||||
if get_Bool(iplot):
|
||||
iplot = 2
|
||||
else:
|
||||
iplot = 0
|
||||
@@ -134,7 +134,7 @@ def earllatepicker(X, nfac, TSNR, Pick1, iplot=0, verbosity=1, fig=None, linecol
|
||||
PickError = symmetrize_error(diffti_te, diffti_tl)
|
||||
|
||||
if iplot > 1:
|
||||
if real_None(fig) is None:
|
||||
if get_None(fig) is None:
|
||||
fig = plt.figure() # iplot)
|
||||
plt_flag = 1
|
||||
fig._tight = True
|
||||
@@ -332,7 +332,7 @@ def fmpicker(Xraw, Xfilt, pickwin, Pick, iplot=0, fig=None, linecolor='k'):
|
||||
print("fmpicker: Found polarity %s" % FM)
|
||||
|
||||
if iplot > 1:
|
||||
if real_None(fig) is None:
|
||||
if get_None(fig) is None:
|
||||
fig = plt.figure() # iplot)
|
||||
plt_flag = 1
|
||||
fig._tight = True
|
||||
@@ -800,7 +800,7 @@ def checksignallength(X, pick, minsiglength, pickparams, iplot=0, fig=None, line
|
||||
try:
|
||||
iplot = int(iplot)
|
||||
except:
|
||||
if real_Bool(iplot):
|
||||
if get_Bool(iplot):
|
||||
iplot = 2
|
||||
else:
|
||||
iplot = 0
|
||||
@@ -852,7 +852,7 @@ def checksignallength(X, pick, minsiglength, pickparams, iplot=0, fig=None, line
|
||||
returnflag = 0
|
||||
|
||||
if iplot > 1:
|
||||
if real_None(fig) is None:
|
||||
if get_None(fig) is None:
|
||||
fig = plt.figure() # iplot)
|
||||
plt_flag = 1
|
||||
fig._tight = True
|
||||
@@ -1114,7 +1114,7 @@ def checkZ4S(X, pick, pickparams, iplot, fig=None, linecolor='k'):
|
||||
try:
|
||||
iplot = int(iplot)
|
||||
except:
|
||||
if real_Bool(iplot):
|
||||
if get_Bool(iplot):
|
||||
iplot = 2
|
||||
else:
|
||||
iplot = 0
|
||||
@@ -1195,14 +1195,14 @@ def checkZ4S(X, pick, pickparams, iplot, fig=None, linecolor='k'):
|
||||
t = np.linspace(diff_dict[key], trace.stats.endtime - trace.stats.starttime + diff_dict[key],
|
||||
trace.stats.npts)
|
||||
if i == 0:
|
||||
if real_None(fig) is None:
|
||||
if get_None(fig) is None:
|
||||
fig = plt.figure() # self.iplot) ### WHY? MP MP
|
||||
plt_flag = 1
|
||||
ax1 = fig.add_subplot(3, 1, i + 1)
|
||||
ax = ax1
|
||||
ax.set_title('CheckZ4S, Station %s' % zdat[0].stats.station)
|
||||
else:
|
||||
if real_None(fig) is None:
|
||||
if get_None(fig) is None:
|
||||
fig = plt.figure() # self.iplot) ### WHY? MP MP
|
||||
plt_flag = 1
|
||||
ax = fig.add_subplot(3, 1, i + 1, sharex=ax1)
|
||||
@@ -1475,7 +1475,7 @@ def get_pickparams(pickparam):
|
||||
first_motion_params = dict(zip(first_motion_names, fm_parameter_values))
|
||||
signal_length_params = dict(zip(signal_length_names, sl_parameter_values))
|
||||
|
||||
p_params['use_taup'] = real_Bool(p_params['use_taup'])
|
||||
p_params['use_taup'] = get_Bool(p_params['use_taup'])
|
||||
|
||||
return p_params, s_params, first_motion_params, signal_length_params
|
||||
|
||||
@@ -1483,7 +1483,7 @@ def getQualityFromUncertainty(uncertainty, Errors):
|
||||
# set initial quality to 4 (worst) and change only if one condition is hit
|
||||
quality = 4
|
||||
|
||||
if real_None(uncertainty) is None:
|
||||
if get_None(uncertainty) is None:
|
||||
return quality
|
||||
|
||||
if uncertainty <= Errors[0]:
|
||||
|
||||
Reference in New Issue
Block a user