[add] plot phase name in pickDlg, also plot network code
This commit is contained in:
parent
533f7ea353
commit
beed46229a
@ -1589,6 +1589,11 @@ class MainWindow(QMainWindow):
|
||||
if wfID in plot_dict.keys():
|
||||
return plot_dict[wfID][0]
|
||||
|
||||
def getNetworkName(self, wfID):
|
||||
plot_dict = self.getPlotWidget().getPlotDict()
|
||||
if wfID in plot_dict.keys():
|
||||
return plot_dict[wfID][2]
|
||||
|
||||
def alterPhase(self):
|
||||
pass
|
||||
|
||||
@ -1653,13 +1658,14 @@ class MainWindow(QMainWindow):
|
||||
|
||||
def pickDialog(self, wfID, nextStation=False):
|
||||
station = self.getStationName(wfID)
|
||||
network = self.getNetworkName(wfID)
|
||||
if not station:
|
||||
return
|
||||
self.update_status('picking on station {0}'.format(station))
|
||||
data = self.get_data().getWFData()
|
||||
pickDlg = PickDlg(self, parameter=self._inputs,
|
||||
data=data.select(station=station),
|
||||
station=station,
|
||||
station=station, network=network,
|
||||
picks=self.getPicksOnStation(station, 'manual'),
|
||||
autopicks=self.getPicksOnStation(station, 'auto'))
|
||||
pickDlg.nextStation.setChecked(nextStation)
|
||||
|
@ -708,7 +708,7 @@ class WaveformWidget(FigureCanvas):
|
||||
self.draw()
|
||||
|
||||
def updateTitle(self, text):
|
||||
self.getAxes().set_title(text)
|
||||
self.getAxes().set_title(text, verticalalignment='bottom')
|
||||
self.draw()
|
||||
|
||||
def updateWidget(self, xlabel, ylabel, title):
|
||||
@ -725,7 +725,7 @@ class WaveformWidget(FigureCanvas):
|
||||
|
||||
class PickDlg(QDialog):
|
||||
update_picks = QtCore.Signal(dict)
|
||||
def __init__(self, parent=None, data=None, station=None, picks=None,
|
||||
def __init__(self, parent=None, data=None, station=None, network=None, picks=None,
|
||||
autopicks=None, rotate=False, parameter=None, embedded=False):
|
||||
super(PickDlg, self).__init__(parent)
|
||||
|
||||
@ -733,6 +733,7 @@ class PickDlg(QDialog):
|
||||
self.parameter = parameter
|
||||
self._embedded = embedded
|
||||
self.station = station
|
||||
self.network = network
|
||||
self.rotate = rotate
|
||||
self.components = 'ZNE'
|
||||
self.currentPhase = None
|
||||
@ -1122,6 +1123,8 @@ class PickDlg(QDialog):
|
||||
return self.components
|
||||
|
||||
def getStation(self):
|
||||
if self.network and self.station:
|
||||
return self.network+'.'+self.station
|
||||
return self.station
|
||||
|
||||
def getPlotWidget(self):
|
||||
@ -1219,7 +1222,6 @@ class PickDlg(QDialog):
|
||||
self.disconnectMotionEvent()
|
||||
self.cidpress = self.connectPressEvent(self.setPick)
|
||||
|
||||
print(self.currentPhase)
|
||||
if self.currentPhase.startswith('P'):
|
||||
self.set_button_color(self.p_button, 'green')
|
||||
self.setIniPickP(gui_event, wfdata, trace_number)
|
||||
@ -1477,6 +1479,7 @@ class PickDlg(QDialog):
|
||||
ax.plot([mpp, mpp], ylims, colors[2], label='{}-Pick'.format(phase))
|
||||
else:
|
||||
ax.plot([mpp, mpp], ylims, colors[6], label='{}-Pick (NO PICKERROR)'.format(phase))
|
||||
ax.text(mpp, ylims[1], phase)
|
||||
|
||||
elif picktype == 'auto':
|
||||
ax.plot(mpp, ylims[1], colors[3],
|
||||
|
Loading…
Reference in New Issue
Block a user