diff --git a/pylot/core/util/array_map.py b/pylot/core/util/array_map.py index 981f4f2b..cbb4bbd6 100644 --- a/pylot/core/util/array_map.py +++ b/pylot/core/util/array_map.py @@ -113,6 +113,7 @@ class Array_map(QtGui.QWidget): data = self._parent.get_data().getWFData() for index in ind: network, station = self._station_onpick_ids[index].split('.')[:2] + pyl_mw = self._parent try: data = data.select(station=station) if not data: @@ -122,14 +123,14 @@ class Array_map(QtGui.QWidget): data=data, network=network, station=station, picks=self._parent.get_current_event().getPick(station), autopicks=self._parent.get_current_event().getAutopick(station), - filteroptions=self._parent.filteroptions) + filteroptions=self._parent.filteroptions, metadata=self.metadata, + event=pyl_mw.get_current_event()) except Exception as e: message = 'Could not generate Plot for station {st}.\n {er}'.format(st=station, er=e) self._warn(message) print(message, e) print(traceback.format_exc()) return - pyl_mw = self._parent try: if pickDlg.exec_(): pyl_mw.setDirty(True) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index a2f1cd68..6d13de25 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -15,6 +15,7 @@ import os import subprocess import sys import time +import traceback matplotlib.use('QT4Agg') @@ -1617,6 +1618,7 @@ class PickDlg(QDialog): self.activateArrivalsButton(False) except Exception as e: print('Warning: Could not init expected picks from taup: {}'.format(e)) + print(traceback.format_exc()) self.activateArrivalsButton(False) # init pick delete (with middle mouse click) @@ -1870,7 +1872,14 @@ class PickDlg(QDialog): settings = QtCore.QSettings() p_phases = settings.value('p_phases') s_phases = settings.value('s_phases') - phases = p_phases + ',' + s_phases + if not p_phases and not s_phases: + print('No phases for TauPy selected in Preferences.') + if p_phases and s_phases: + phases = p_phases + ',' + s_phases + elif p_phases and not s_phases: + phases = p_phases + elif s_phases and not p_phases: + phases = s_phases phases = phases.split(',') phases = [phase.strip() for phase in phases] return phases