diff --git a/pylot/core/pick/autopick.py b/pylot/core/pick/autopick.py index dc22eb90..9e9e7857 100644 --- a/pylot/core/pick/autopick.py +++ b/pylot/core/pick/autopick.py @@ -944,7 +944,8 @@ def autopickstation(wfstream, pickparam, verbose=False, ax3.set_title(trH2_filt.stats.channel) if plt_flag == 1: fig.show() - raw_input() + try: input() + except SyntaxError: pass plt.close(fig) ########################################################################## # calculate "real" onset times diff --git a/pylot/core/pick/picker.py b/pylot/core/pick/picker.py index 4a7c0dc9..f2933d68 100644 --- a/pylot/core/pick/picker.py +++ b/pylot/core/pick/picker.py @@ -274,7 +274,8 @@ class AICPicker(AutoPicker): ax.set_title(self.Data[0].stats.station) if plt_flag == 1: fig.show() - raw_input() + try: input() + except SyntaxError: pass plt.close(fig) return iislope = islope[0][0:imax+1] @@ -334,13 +335,15 @@ class AICPicker(AutoPicker): ax2.legend() if plt_flag == 1: fig.show() - raw_input() + try: input() + except SyntaxError: pass plt.close(fig) else: ax1.set_title(self.Data[0].stats.station) if plt_flag == 1: fig.show() - raw_input() + try: input() + except SyntaxError: pass plt.close(fig) if self.Pick == None: @@ -476,7 +479,8 @@ class PragPicker(AutoPicker): ax.legend() if plt_flag == 1: fig.show() - raw_input() + try: input() + except SyntaxError: pass plt.close(fig) return diff --git a/pylot/core/pick/utils.py b/pylot/core/pick/utils.py index b1a0e940..a9fcc73b 100644 --- a/pylot/core/pick/utils.py +++ b/pylot/core/pick/utils.py @@ -153,7 +153,8 @@ def earllatepicker(X, nfac, TSNR, Pick1, iplot=0, verbosity=1, fig=None): ax.legend() if plt_flag == 1: fig.show() - raw_input() + try: input() + except SyntaxError: pass plt.close(fig) return EPick, LPick, PickError @@ -347,7 +348,8 @@ def fmpicker(Xraw, Xfilt, pickwin, Pick, iplot=0, fig=None): ax2.set_yticks([]) if plt_flag == 1: fig.show() - raw_input() + try: input() + except SyntaxError: pass plt.close(fig) return FM @@ -785,7 +787,8 @@ def checksignallength(X, pick, TSNR, minsiglength, nfac, minpercent, iplot=0, fi ax.set_yticks([]) if plt_flag == 1: fig.show() - raw_input() + try: input() + except SyntaxError: pass plt.close(fig) return returnflag @@ -1089,7 +1092,8 @@ def checkZ4S(X, pick, zfac, checkwin, iplot, fig=None): ax.set_xlabel('Time [s] since %s' % zdat[0].stats.starttime) if plt_flag == 1: fig.show() - raw_input() + try: input() + except SyntaxError: pass plt.close(fig) return returnflag