[bugfix] autoPyLoT crashed when getSlope() method of AICPicker returned
None (comparing None to float), workaround: if not slope: slope=0
This commit is contained in:
parent
154e7b459f
commit
125b72a582
@ -306,8 +306,11 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0, fig_dict=None):
|
|||||||
Pweight = 9
|
Pweight = 9
|
||||||
##############################################################
|
##############################################################
|
||||||
# go on with processing if AIC onset passes quality control
|
# go on with processing if AIC onset passes quality control
|
||||||
if (aicpick.getSlope() >= minAICPslope and
|
slope = aicpick.getSlope()
|
||||||
aicpick.getSNR() >= minAICPSNR and Pflag == 1):
|
if not slope:
|
||||||
|
slope = 0
|
||||||
|
if (slope >= minAICPslope and
|
||||||
|
aicpick.getSNR() >= minAICPSNR and Pflag == 1):
|
||||||
aicPflag = 1
|
aicPflag = 1
|
||||||
msg = 'AIC P-pick passes quality control: Slope: {0} counts/s, ' \
|
msg = 'AIC P-pick passes quality control: Slope: {0} counts/s, ' \
|
||||||
'SNR: {1}\nGo on with refined picking ...\n' \
|
'SNR: {1}\nGo on with refined picking ...\n' \
|
||||||
@ -499,9 +502,12 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0, fig_dict=None):
|
|||||||
aictsmoothS, fig=fig)
|
aictsmoothS, fig=fig)
|
||||||
###############################################################
|
###############################################################
|
||||||
# go on with processing if AIC onset passes quality control
|
# go on with processing if AIC onset passes quality control
|
||||||
if (aicarhpick.getSlope() >= minAICSslope and
|
slope = aicpick.getSlope()
|
||||||
aicarhpick.getSNR() >= minAICSSNR and
|
if not slope:
|
||||||
aicarhpick.getpick() is not None):
|
slope = 0
|
||||||
|
if (slope >= minAICSslope and
|
||||||
|
aicarhpick.getSNR() >= minAICSSNR and
|
||||||
|
aicarhpick.getpick() is not None):
|
||||||
aicSflag = 1
|
aicSflag = 1
|
||||||
msg = 'AIC S-pick passes quality control: Slope: {0} counts/s, ' \
|
msg = 'AIC S-pick passes quality control: Slope: {0} counts/s, ' \
|
||||||
'SNR: {1}\nGo on with refined picking ...\n' \
|
'SNR: {1}\nGo on with refined picking ...\n' \
|
||||||
|
@ -2969,7 +2969,7 @@ class SubmitLocal(QWidget):
|
|||||||
self.execute_command(pp_export, ncores)
|
self.execute_command(pp_export, ncores)
|
||||||
|
|
||||||
def execute_command(self, pp_export, ncores):
|
def execute_command(self, pp_export, ncores):
|
||||||
command = self.script_fn
|
command = self.script_fn[:]
|
||||||
command.append(pp_export)
|
command.append(pp_export)
|
||||||
command.append('--ncores')
|
command.append('--ncores')
|
||||||
command.append(str(ncores))
|
command.append(str(ncores))
|
||||||
|
Loading…
Reference in New Issue
Block a user