From 0b6b7a7aeddc5ebe178214d8147efa01f81131dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Fri, 29 May 2015 16:28:50 +0200 Subject: [PATCH] Marginal changes only. --- pylot/core/pick/utils.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pylot/core/pick/utils.py b/pylot/core/pick/utils.py index b3d3656b..1e190ca2 100644 --- a/pylot/core/pick/utils.py +++ b/pylot/core/pick/utils.py @@ -11,7 +11,6 @@ import numpy as np import matplotlib.pyplot as plt from obspy.core import Stream -import pdb def earllatepicker(X, nfac, TSNR, Pick1, iplot=None): @@ -79,8 +78,8 @@ def earllatepicker(X, nfac, TSNR, Pick1, iplot=None): diffti_te = Pick1 - EPick PickError = (diffti_te + 2 * diffti_tl) / 3 - if iplot is not None: - plt.figure(iplot) + if iplot > 1: + p = plt.figure(iplot) p1, = plt.plot(t, x, 'k') p2, = plt.plot(t[inoise], x[inoise]) p3, = plt.plot(t[isignal], x[isignal], 'r') @@ -107,7 +106,7 @@ def earllatepicker(X, nfac, TSNR, Pick1, iplot=None): X[0].stats.station) plt.show() raw_input() - plt.close(iplot) + plt.close(p) return EPick, LPick, PickError @@ -238,7 +237,7 @@ def fmpicker(Xraw, Xfilt, pickwin, Pick, iplot=None): elif P1[0] > 0 and P2[0] <= 0: FM = '+' - if iplot is not None: + if iplot > 1: plt.figure(iplot) plt.subplot(2, 1, 1) plt.plot(t, xraw, 'k')