[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:
Marcel Paffrath 2017-08-03 12:05:19 +02:00
parent 154e7b459f
commit 125b72a582
2 changed files with 12 additions and 6 deletions

View File

@ -306,8 +306,11 @@ def autopickstation(wfstream, pickparam, verbose=False, iplot=0, fig_dict=None):
Pweight = 9
##############################################################
# go on with processing if AIC onset passes quality control
if (aicpick.getSlope() >= minAICPslope and
aicpick.getSNR() >= minAICPSNR and Pflag == 1):
slope = aicpick.getSlope()
if not slope:
slope = 0
if (slope >= minAICPslope and
aicpick.getSNR() >= minAICPSNR and Pflag == 1):
aicPflag = 1
msg = 'AIC P-pick passes quality control: Slope: {0} counts/s, ' \
'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)
###############################################################
# go on with processing if AIC onset passes quality control
if (aicarhpick.getSlope() >= minAICSslope and
aicarhpick.getSNR() >= minAICSSNR and
aicarhpick.getpick() is not None):
slope = aicpick.getSlope()
if not slope:
slope = 0
if (slope >= minAICSslope and
aicarhpick.getSNR() >= minAICSSNR and
aicarhpick.getpick() is not None):
aicSflag = 1
msg = 'AIC S-pick passes quality control: Slope: {0} counts/s, ' \
'SNR: {1}\nGo on with refined picking ...\n' \

View File

@ -2969,7 +2969,7 @@ class SubmitLocal(QWidget):
self.execute_command(pp_export, ncores)
def execute_command(self, pp_export, ncores):
command = self.script_fn
command = self.script_fn[:]
command.append(pp_export)
command.append('--ncores')
command.append(str(ncores))