[new] synthetics checkbox
This commit is contained in:
parent
8155389b3d
commit
083e5c8fe9
7
PyLoT.py
7
PyLoT.py
@ -1701,6 +1701,7 @@ class MainWindow(QMainWindow):
|
|||||||
# else:
|
# else:
|
||||||
# ans = False
|
# ans = False
|
||||||
self.fnames = self.getWFFnames_from_eventbox()
|
self.fnames = self.getWFFnames_from_eventbox()
|
||||||
|
self.fnames_syn = []
|
||||||
eventpath = self.get_current_event_path()
|
eventpath = self.get_current_event_path()
|
||||||
basepath = eventpath.split(os.path.basename(eventpath))[0]
|
basepath = eventpath.split(os.path.basename(eventpath))[0]
|
||||||
obspy_dmt = check_obspydmt_structure(basepath)
|
obspy_dmt = check_obspydmt_structure(basepath)
|
||||||
@ -1714,12 +1715,16 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
def prepareObspyDMT_data(self, eventpath):
|
def prepareObspyDMT_data(self, eventpath):
|
||||||
qcbox_processed = self.dataPlot.perm_qcbox_right
|
qcbox_processed = self.dataPlot.perm_qcbox_right
|
||||||
|
qcheckb_syn = self.dataPlot.syn_checkbox
|
||||||
qcbox_processed.setEnabled(False)
|
qcbox_processed.setEnabled(False)
|
||||||
|
qcheckb_syn.setEnabled(False)
|
||||||
for fpath in os.listdir(eventpath):
|
for fpath in os.listdir(eventpath):
|
||||||
fpath = fpath.split('/')[-1]
|
fpath = fpath.split('/')[-1]
|
||||||
if 'syngine' in fpath:
|
if 'syngine' in fpath:
|
||||||
eventpath_syn = os.path.join(eventpath, fpath)
|
eventpath_syn = os.path.join(eventpath, fpath)
|
||||||
self.fnames_syn = [os.path.join(eventpath_syn, filename) for filename in os.listdir(eventpath_syn)]
|
qcheckb_syn.setEnabled(True)
|
||||||
|
if self.dataPlot.syn_checkbox.isChecked():
|
||||||
|
self.fnames_syn = [os.path.join(eventpath_syn, filename) for filename in os.listdir(eventpath_syn)]
|
||||||
if 'processed' in fpath:
|
if 'processed' in fpath:
|
||||||
qcbox_processed.setEnabled(True)
|
qcbox_processed.setEnabled(True)
|
||||||
wftype = qcbox_processed.currentText() if qcbox_processed.isEnabled() else 'raw'
|
wftype = qcbox_processed.currentText() if qcbox_processed.isEnabled() else 'raw'
|
||||||
|
@ -461,6 +461,7 @@ class WaveformWidgetPG(QtGui.QWidget):
|
|||||||
self.main_layout.addLayout(self.label_layout)
|
self.main_layout.addLayout(self.label_layout)
|
||||||
self.label_layout.addWidget(self.status_label)
|
self.label_layout.addWidget(self.status_label)
|
||||||
self.label_layout.addWidget(self.perm_label_mid)
|
self.label_layout.addWidget(self.perm_label_mid)
|
||||||
|
self.label_layout.addWidget(self.syn_checkbox)
|
||||||
self.label_layout.addWidget(self.perm_qcbox_right)
|
self.label_layout.addWidget(self.perm_qcbox_right)
|
||||||
self.plotWidget.showGrid(x=False, y=True, alpha=0.3)
|
self.plotWidget.showGrid(x=False, y=True, alpha=0.3)
|
||||||
self.wfstart, self.wfend = 0, 0
|
self.wfstart, self.wfend = 0, 0
|
||||||
@ -494,12 +495,14 @@ class WaveformWidgetPG(QtGui.QWidget):
|
|||||||
|
|
||||||
def connect_signals(self):
|
def connect_signals(self):
|
||||||
self.perm_qcbox_right.currentIndexChanged.connect(self.parent().newWF)
|
self.perm_qcbox_right.currentIndexChanged.connect(self.parent().newWF)
|
||||||
|
self.syn_checkbox.clicked.connect(self.parent().newWF)
|
||||||
|
|
||||||
def add_labels(self):
|
def add_labels(self):
|
||||||
self.status_label = QtGui.QLabel()
|
self.status_label = QtGui.QLabel()
|
||||||
self.perm_label_mid = QtGui.QLabel()
|
self.perm_label_mid = QtGui.QLabel()
|
||||||
self.perm_label_mid.setAlignment(4)
|
self.perm_label_mid.setAlignment(4)
|
||||||
self.perm_qcbox_right = QtGui.QComboBox()
|
self.perm_qcbox_right = QtGui.QComboBox()
|
||||||
|
self.syn_checkbox = QtGui.QCheckBox('synthetics')
|
||||||
self.addQCboxItem('raw', 'black')
|
self.addQCboxItem('raw', 'black')
|
||||||
self.addQCboxItem('processed', 'green')
|
self.addQCboxItem('processed', 'green')
|
||||||
#self.perm_qcbox_right.setAlignment(2)
|
#self.perm_qcbox_right.setAlignment(2)
|
||||||
|
Loading…
Reference in New Issue
Block a user