From c68597ce622a9f26b895756120162cc63c7d5765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Wed, 24 Jun 2015 15:43:59 +0200 Subject: [PATCH] Debugging. --- pylot/core/pick/run_autopicking.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pylot/core/pick/run_autopicking.py b/pylot/core/pick/run_autopicking.py index 65bf0514..cc690e8b 100755 --- a/pylot/core/pick/run_autopicking.py +++ b/pylot/core/pick/run_autopicking.py @@ -13,7 +13,7 @@ import matplotlib.pyplot as plt import numpy as np from pylot.core.pick.Picker import * from pylot.core.pick.CharFuns import * - +import pdb def run_autopicking(wfstream, pickparam): """ :param: wfstream @@ -157,10 +157,11 @@ def run_autopicking(wfstream, pickparam): # of class AutoPicking aicpick = AICPicker(aiccf, tsnrz, pickwinP, iplot, None, tsmoothP) ############################################################## - # check signal length to detect spuriously picked noise peaks - z_copy[0].data = tr_filt.data - Pflag = checksignallength(z_copy, aicpick.getpick(), tsnrz, minsiglength, \ - nfacsl, minpercent, iplot) + if aicpick.getpick() is not None: + # check signal length to detect spuriously picked noise peaks + z_copy[0].data = tr_filt.data + Pflag = checksignallength(z_copy, aicpick.getpick(), tsnrz, minsiglength, \ + nfacsl, minpercent, iplot) ############################################################## # go on with processing if AIC onset passes quality control if (aicpick.getSlope() >= minAICPslope and @@ -320,7 +321,8 @@ def run_autopicking(wfstream, pickparam): ############################################################### # go on with processing if AIC onset passes quality control if (aicarhpick.getSlope() >= minAICSslope and - aicarhpick.getSNR() >= minAICSSNR): + aicarhpick.getSNR() >= minAICSSNR and + aicarhpick.getpick() is not None): aicSflag = 1 print 'AIC S-pick passes quality control: Slope: %f, SNR: %f' \ % (aicarhpick.getSlope(), aicarhpick.getSNR())