[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,7 +306,10 @@ 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()
|
||||||
|
if not slope:
|
||||||
|
slope = 0
|
||||||
|
if (slope >= minAICPslope and
|
||||||
aicpick.getSNR() >= minAICPSNR and Pflag == 1):
|
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, ' \
|
||||||
@ -499,7 +502,10 @@ 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()
|
||||||
|
if not slope:
|
||||||
|
slope = 0
|
||||||
|
if (slope >= minAICSslope and
|
||||||
aicarhpick.getSNR() >= minAICSSNR and
|
aicarhpick.getSNR() >= minAICSSNR and
|
||||||
aicarhpick.getpick() is not None):
|
aicarhpick.getpick() is not None):
|
||||||
aicSflag = 1
|
aicSflag = 1
|
||||||
|
@ -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