[bugfix] taupy picks not initiated in array_map
This commit is contained in:
parent
4dfcdb41ec
commit
9ae8e36061
@ -113,6 +113,7 @@ class Array_map(QtGui.QWidget):
|
|||||||
data = self._parent.get_data().getWFData()
|
data = self._parent.get_data().getWFData()
|
||||||
for index in ind:
|
for index in ind:
|
||||||
network, station = self._station_onpick_ids[index].split('.')[:2]
|
network, station = self._station_onpick_ids[index].split('.')[:2]
|
||||||
|
pyl_mw = self._parent
|
||||||
try:
|
try:
|
||||||
data = data.select(station=station)
|
data = data.select(station=station)
|
||||||
if not data:
|
if not data:
|
||||||
@ -122,14 +123,14 @@ class Array_map(QtGui.QWidget):
|
|||||||
data=data, network=network, station=station,
|
data=data, network=network, station=station,
|
||||||
picks=self._parent.get_current_event().getPick(station),
|
picks=self._parent.get_current_event().getPick(station),
|
||||||
autopicks=self._parent.get_current_event().getAutopick(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:
|
except Exception as e:
|
||||||
message = 'Could not generate Plot for station {st}.\n {er}'.format(st=station, er=e)
|
message = 'Could not generate Plot for station {st}.\n {er}'.format(st=station, er=e)
|
||||||
self._warn(message)
|
self._warn(message)
|
||||||
print(message, e)
|
print(message, e)
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
return
|
return
|
||||||
pyl_mw = self._parent
|
|
||||||
try:
|
try:
|
||||||
if pickDlg.exec_():
|
if pickDlg.exec_():
|
||||||
pyl_mw.setDirty(True)
|
pyl_mw.setDirty(True)
|
||||||
|
@ -15,6 +15,7 @@ import os
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
import traceback
|
||||||
|
|
||||||
matplotlib.use('QT4Agg')
|
matplotlib.use('QT4Agg')
|
||||||
|
|
||||||
@ -1617,6 +1618,7 @@ class PickDlg(QDialog):
|
|||||||
self.activateArrivalsButton(False)
|
self.activateArrivalsButton(False)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('Warning: Could not init expected picks from taup: {}'.format(e))
|
print('Warning: Could not init expected picks from taup: {}'.format(e))
|
||||||
|
print(traceback.format_exc())
|
||||||
self.activateArrivalsButton(False)
|
self.activateArrivalsButton(False)
|
||||||
|
|
||||||
# init pick delete (with middle mouse click)
|
# init pick delete (with middle mouse click)
|
||||||
@ -1870,7 +1872,14 @@ class PickDlg(QDialog):
|
|||||||
settings = QtCore.QSettings()
|
settings = QtCore.QSettings()
|
||||||
p_phases = settings.value('p_phases')
|
p_phases = settings.value('p_phases')
|
||||||
s_phases = settings.value('s_phases')
|
s_phases = settings.value('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
|
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 = phases.split(',')
|
||||||
phases = [phase.strip() for phase in phases]
|
phases = [phase.strip() for phase in phases]
|
||||||
return phases
|
return phases
|
||||||
|
Loading…
Reference in New Issue
Block a user