[removed] check4gaps/doubled, plotting merged instead

This commit is contained in:
2018-04-19 16:51:29 +02:00
parent a876384338
commit 4d3b300e17
3 changed files with 23 additions and 8 deletions

View File

@@ -398,9 +398,6 @@ class Data(object):
# various pre-processing steps:
# remove possible underscores in station names
self.wfdata = remove_underscores(self.wfdata)
# check for gaps and doubled channels
check4gaps(self.wfdata)
check4doubled(self.wfdata)
# check for stations with rotated components
if checkRotated and metadata is not None:
self.wfdata = check4rotated(self.wfdata, metadata, verbosity=0)

View File

@@ -464,6 +464,7 @@ class WaveformWidgetPG(QtGui.QWidget):
self.wfstart, self.wfend = 0, 0
self.pen_multicursor = self.pg.mkPen(self.parent()._style['multicursor']['rgba'])
self.pen_linecolor = self.pg.mkPen(self.parent()._style['linecolor']['rgba'])
self.pen_linecolor_highlight = self.pg.mkPen((255, 100, 100, 255))
self.pen_linecolor_syn = self.pg.mkPen((100, 0, 255, 255))
self.reinitMoveProxy()
self._proxy = self.pg.SignalProxy(self.plotWidget.scene().sigMouseMoved, rateLimit=60, slot=self.mouseMoved)
@@ -529,6 +530,14 @@ class WaveformWidgetPG(QtGui.QWidget):
else:
st_select = wfdata
gaps = st_select.get_gaps()
if gaps:
merged = ['{}.{}.{}.{}'.format(*gap[:4]) for gap in gaps]
st_select.merge()
print('Merged the following stations because of gaps:')
for merged_station in merged:
print(merged_station)
# list containing tuples of network, station, channel (for sorting)
nsc = []
for trace in st_select:
@@ -590,7 +599,7 @@ class WaveformWidgetPG(QtGui.QWidget):
self.ylabel = ''
self.setXLims([0, self.wfend - self.wfstart])
self.setYLims([0.5, nmax + 0.5])
return plots
return plots, gaps
def minMax(self, trace, time_ax):
'''
@@ -1013,6 +1022,14 @@ class PylotCanvas(FigureCanvas):
if mapping:
plot_positions = self.calcPlotPositions(st_select, compclass)
gaps = st_select.get_gaps()
if gaps:
merged = ['{}.{}.{}.{}'.format(*gap[:4]) for gap in gaps]
st_select.merge()
print('Merged the following stations because of gaps:')
for merged_station in merged:
print(merged_station)
# list containing tuples of network, station, channel and plot position (for sorting)
nsc = []
for plot_pos, trace in enumerate(st_select):