diff --git a/pylot/core/io/data.py b/pylot/core/io/data.py index 17ba6001..740a0b05 100644 --- a/pylot/core/io/data.py +++ b/pylot/core/io/data.py @@ -100,7 +100,7 @@ class Data(object): def getPicksStr(self): picks_str = '' for pick in self.get_evt_data().picks: - picks_str += str(PyLoT) + '\n' + picks_str += str(pick) + '\n' return picks_str def getParent(self): 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 diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 1d42ce7a..c76480f6 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -1910,6 +1910,9 @@ class PickDlg(QDialog): def scrollZoom(self, gui_event, factor=2.): + if not gui_event.xdata or not gui_event.ydata: + return + self.updateCurrentLimits() if gui_event.button == 'up':