Merged branch develop into 190
This commit is contained in:
commit
e164b1f168
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import glob
|
import glob
|
||||||
|
import warnings
|
||||||
from obspy.io.xseed import Parser
|
from obspy.io.xseed import Parser
|
||||||
from obspy.core import read, Stream, UTCDateTime
|
from obspy.core import read, Stream, UTCDateTime
|
||||||
from obspy import read_events, read_inventory
|
from obspy import read_events, read_inventory
|
||||||
@ -421,7 +422,11 @@ class Data(object):
|
|||||||
epp = phase['epp']
|
epp = phase['epp']
|
||||||
lpp = phase['lpp']
|
lpp = phase['lpp']
|
||||||
error = phase['spe']
|
error = phase['spe']
|
||||||
|
try:
|
||||||
picker = phase['picker']
|
picker = phase['picker']
|
||||||
|
except KeyError as e:
|
||||||
|
warnings.warn(str(e), Warning)
|
||||||
|
picker = 'Unknown'
|
||||||
pick = Pick()
|
pick = Pick()
|
||||||
pick.time = onset
|
pick.time = onset
|
||||||
pick.time_errors.lower_uncertainty = onset - epp
|
pick.time_errors.lower_uncertainty = onset - epp
|
||||||
|
@ -64,7 +64,7 @@ class MPLWidget(FigureCanvas):
|
|||||||
# clear axes each time plot is called
|
# clear axes each time plot is called
|
||||||
self.axes.hold(True)
|
self.axes.hold(True)
|
||||||
# initialize super class
|
# initialize super class
|
||||||
FigureCanvas.__init__(self, self.figure)
|
super(MPLWidget, self).__init__(self.figure)
|
||||||
# add an cursor for station selection
|
# add an cursor for station selection
|
||||||
self.multiCursor = MultiCursor(self.figure.canvas, (self.axes,),
|
self.multiCursor = MultiCursor(self.figure.canvas, (self.axes,),
|
||||||
horizOn=True,
|
horizOn=True,
|
||||||
@ -182,7 +182,7 @@ class PickDlg(QDialog):
|
|||||||
else:
|
else:
|
||||||
self.picks = {}
|
self.picks = {}
|
||||||
self.filteroptions = FILTERDEFAULTS
|
self.filteroptions = FILTERDEFAULTS
|
||||||
self.filt_block = False
|
self.pick_block = False
|
||||||
|
|
||||||
# initialize panning attributes
|
# initialize panning attributes
|
||||||
self.press = None
|
self.press = None
|
||||||
@ -356,7 +356,7 @@ class PickDlg(QDialog):
|
|||||||
self.disconnectPressEvent()
|
self.disconnectPressEvent()
|
||||||
self.cidpress = self.connectPressEvent(self.setIniPick)
|
self.cidpress = self.connectPressEvent(self.setIniPick)
|
||||||
self.filterWFData()
|
self.filterWFData()
|
||||||
self.filt_block = self.toggleFilterBlocker()
|
self.pick_block = self.togglePickBlocker()
|
||||||
else:
|
else:
|
||||||
self.disconnectPressEvent()
|
self.disconnectPressEvent()
|
||||||
self.cidpress = self.connectPressEvent(self.panPress)
|
self.cidpress = self.connectPressEvent(self.panPress)
|
||||||
@ -708,11 +708,11 @@ class PickDlg(QDialog):
|
|||||||
|
|
||||||
ax.figure.canvas.draw()
|
ax.figure.canvas.draw()
|
||||||
|
|
||||||
def toggleFilterBlocker(self):
|
def togglePickBlocker(self):
|
||||||
return not self.filt_block
|
return not self.pick_block
|
||||||
|
|
||||||
def filterWFData(self):
|
def filterWFData(self):
|
||||||
if self.filt_block:
|
if self.pick_block:
|
||||||
return
|
return
|
||||||
self.updateCurrentLimits()
|
self.updateCurrentLimits()
|
||||||
data = self.getWFData().copy()
|
data = self.getWFData().copy()
|
||||||
@ -768,7 +768,9 @@ class PickDlg(QDialog):
|
|||||||
self.getPlotWidget().setYLims(self.getYLims())
|
self.getPlotWidget().setYLims(self.getYLims())
|
||||||
|
|
||||||
def zoom(self):
|
def zoom(self):
|
||||||
if self.zoomAction.isChecked():
|
if self.zoomAction.isChecked() and self.pick_block:
|
||||||
|
self.zoomAction.setChecked(False)
|
||||||
|
elif self.zoomAction.isChecked():
|
||||||
self.disconnectPressEvent()
|
self.disconnectPressEvent()
|
||||||
self.disconnectMotionEvent()
|
self.disconnectMotionEvent()
|
||||||
self.disconnectReleaseEvent()
|
self.disconnectReleaseEvent()
|
||||||
|
Loading…
Reference in New Issue
Block a user