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