From 0adc890aeffd543fbc1a90460de3e41781f5a3f5 Mon Sep 17 00:00:00 2001 From: Marcel Paffrath Date: Mon, 12 Oct 2015 12:59:53 +0200 Subject: [PATCH] implied stealth mode to suppress huge amounts of text output --- pylot/core/pick/utils.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pylot/core/pick/utils.py b/pylot/core/pick/utils.py index 16fd2cec..43c3a782 100644 --- a/pylot/core/pick/utils.py +++ b/pylot/core/pick/utils.py @@ -14,7 +14,7 @@ from obspy.core import Stream, UTCDateTime import warnings -def earllatepicker(X, nfac, TSNR, Pick1, iplot=None): +def earllatepicker(X, nfac, TSNR, Pick1, iplot=None, stealthMode = False): ''' Function to derive earliest and latest possible pick after Diehl & Kissling (2009) as reasonable uncertainties. Latest possible pick is based on noise level, @@ -43,7 +43,8 @@ def earllatepicker(X, nfac, TSNR, Pick1, iplot=None): LPick = None EPick = None PickError = None - #print 'earllatepicker: Get earliest and latest possible pick relative to most likely pick ...' + if stealthMode is False: + print 'earllatepicker: Get earliest and latest possible pick relative to most likely pick ...' x = X[0].data t = np.arange(0, X[0].stats.npts / X[0].stats.sampling_rate, @@ -74,8 +75,9 @@ def earllatepicker(X, nfac, TSNR, Pick1, iplot=None): # if EPick stays NaN the signal window size will be doubled while np.isnan(EPick): if count > 0: - print("\nearllatepicker: Doubled signal window size %s time(s) " - "because of NaN for earliest pick." %count) + if stealthMode is False: + print("\nearllatepicker: Doubled signal window size %s time(s) " + "because of NaN for earliest pick." %count) isigDoubleWinStart = pis[-1] + 1 isignalDoubleWin = np.arange(isigDoubleWinStart, isigDoubleWinStart + len(pis))