implied stealth mode to suppress huge amounts of text output

This commit is contained in:
Marcel Paffrath 2015-10-12 12:59:53 +02:00
parent 5bb50d5be4
commit 0adc890aef

View File

@ -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,6 +75,7 @@ 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:
if stealthMode is False:
print("\nearllatepicker: Doubled signal window size %s time(s) "
"because of NaN for earliest pick." %count)
isigDoubleWinStart = pis[-1] + 1