Merge branch 'develop' into feature/port-to-py3

This commit is contained in:
marcel committed 2021-08-11 15:16:19 +02:00
commit d236d3d80f
9 files changed
+71 -40

No files matched your search

+4 -3
View File
@@ -53,7 +53,7 @@ def which(program, parameter):
settings = QSettings()
for key in settings.allKeys():
if 'binPath' in key:
os.environ['PATH'] += ':{0}'.format(settings.value(key))
os.environ['PATH'] += ':{0}'.format(settings.value(key))
nllocpath = ":" + parameter.get('nllocbin')
os.environ['PATH'] += nllocpath
except Exception as e:
@@ -73,7 +73,7 @@ def which(program, parameter):
return program
else:
for path in os.environ["PATH"].split(os.pathsep):
exe_file = os.path.join(path, program)
exe_file = os.path.join(path, program)
for candidate in ext_candidates(exe_file):
if is_exe(candidate):
return candidate
@@ -100,4 +100,5 @@ def make_pen(picktype, phase, key, quality):
rgba = pick_color(picktype, phase, quality)
linestyle, width = pick_linestyle_pg(picktype, key)
pen = pg.mkPen(rgba, width=width, style=linestyle)
return pen
return pen
+7 -4
View File
@@ -1594,7 +1594,7 @@ class PickDlg(QDialog):
def __init__(self, parent=None, data=None, station=None, network=None, location=None, picks=None,
autopicks=None, rotate=False, parameter=None, embedded=False, metadata=None,
event=None, filteroptions=None, model='iasp91', wftype=None):
event=None, filteroptions=None, model=None, wftype=None):
super(PickDlg, self).__init__(parent, Qt.Window)
self.orig_parent = parent
self.setAttribute(Qt.WA_DeleteOnClose)
@@ -1719,7 +1719,7 @@ class PickDlg(QDialog):
# init expected picks using obspy Taup
try:
if self.metadata:
if self.metadata and model is not None:
self.model = TauPyModel(model)
self.get_arrivals()
self.drawArrivals()
@@ -2703,8 +2703,11 @@ class PickDlg(QDialog):
ax.plot(mpp, ylims[0], color=color, marker='^', zorder=baseorder + 3)
# append phase text (if textOnly: draw with current ylims)
self.phaseText.append(ax.text(mpp, ylims[1], phase, color=color, zorder=baseorder + 10))
# indicate first motion
self.phaseText.append(ax.text(mpp - 0.03 * mpp, ylims[1] - ylims[1] / 12, picks['fm'], color=color, zorder=baseorder + 10))
# indicate first motion
fm = picks.get('fm')
if fm:
self.phaseText.append(ax.text(mpp - 0.03 * mpp, ylims[1] - ylims[1] / 12, fm, color=color,
zorder=baseorder + 10))
ax.legend(loc=1)
def connect_mouse_motion(self):