Exemple #1
0
    def populate_treeWidget(self):
        survey_file = Path(CONF.data_root, CONF.current_survey, '.survey')
        if survey_file.exists():
            self.DataTree.clear()
            self.DataTree.setHeaderLabel(CONF.current_survey)
            # populate seismic data
            seis_data = QTreeWidgetItem(self.DataTree)
            seis_data.setText(0, 'Seismic')
            for item in get_data_files(
                    Path(CONF.data_root, CONF.current_survey, "Seismics")):
                f3 = QTreeWidgetItem(seis_data)
                f3.setFlags(f3.flags() | Qt.ItemIsUserCheckable)
                f3.setText(0, item)
                f3.setCheckState(0, Qt.Unchecked)
            # populate well data
            well_data = QTreeWidgetItem(self.DataTree)
            well_data.setText(0, 'Wells')
            for item in get_data_files(
                    Path(CONF.data_root, CONF.current_survey, "Wellinfo")):
                f3 = QTreeWidgetItem(well_data)
                f3.setFlags(f3.flags() | Qt.ItemIsUserCheckable)
                f3.setText(0, item)
                f3.setCheckState(0, Qt.Unchecked)
            # populate surface data
            surface_data = QTreeWidgetItem(self.DataTree)
            surface_data.setText(0, 'Surfaces')
            for item in get_data_files(
                    Path(CONF.data_root, CONF.current_survey, "Surfaces")):
                f3 = QTreeWidgetItem(surface_data)
                f3.setFlags(f3.flags() | Qt.ItemIsUserCheckable)
                f3.setText(0, item)
                f3.setCheckState(0, Qt.Unchecked)

            self.DataTree.show()
Exemple #2
0
 def update_density_panel(self, tab_index):
     if tab_index == 2:
         for fname in get_data_files(CONF.seismic_dir):
             seis = Seismic(fname, CONF)
             seis.from_file()
             if seis.Property_Type == "Velocity":
                 self.interval_velocity_comboBox_gardner.addItem(seis.name)
Exemple #3
0
 def update_velocity_conversion_panel(self, tab_index):
     if tab_index == 0:
         for fname in get_data_files(CONF.seismic_dir):
             seis = Seismic(fname, CONF)
             seis.from_file()
             if seis.Property_Type == "Velocity":
                 self.input_comboBox_Velocity_Conversion.addItem(seis.name)
 def load_data_list(self):
     folder_path = Path(CONF.data_root) / \
                 CONF.current_survey / "Seismics"
     for name in get_data_files(folder_path):
         new_item = QListWidgetItem(name, self.data_list_Widget)
         new_item.setFlags(new_item.flags() | Qt.ItemIsUserCheckable)
         new_item.setCheckState(Qt.Unchecked)
Exemple #5
0
 def update_obp_panel(self, tab_index):
     if tab_index == 3:
         self.density_comboBox_OBP.clear()
         for fname in get_data_files(CONF.seismic_dir):
             seis = Seismic(fname, CONF)
             seis.from_file()
             if seis.Property_Type == "Density":
                 self.density_comboBox_OBP.addItem(seis.name)
Exemple #6
0
 def update_tdc_panel(self, tab_index):
     if tab_index == 1:
         for fname in get_data_files(CONF.seismic_dir):
             seis = Seismic(fname, CONF)
             seis.from_file()
             if seis.Property_Type == "Velocity":
                 self.avg_vel_comboBox.addItem(seis.name)
             self.input_for_tdc_comboBox.addItem(seis.name)
 def load_data_list(self):
     for name in get_data_files(
             Path(CONF.data_root, CONF.current_survey, "Seismics")):
         # only initialize this way can it be set checkable
         new_item = QListWidgetItem(name,
                                    self.control_widget.data_listWidget)
         new_item.setFlags(new_item.flags() | Qt.ItemIsUserCheckable)
         new_item.setCheckState(Qt.Unchecked)
Exemple #8
0
 def update_bowers_panel(self, tab_index):
     if tab_index == 5:
         self.obp_comboBox_Bowers.clear()
         self.vel_comboBox_Bowers.clear()
         for fname in get_data_files(CONF.seismic_dir):
             seis = Seismic(fname, CONF)
             seis.from_file()
             if seis.Property_Type == "Pressure":
                 self.obp_comboBox_Bowers.addItem(seis.name)
             elif seis.Property_Type == "Velocity":
                 self.vel_comboBox_Bowers.addItem(seis.name)
Exemple #9
0
 def run_obp_calculation(self):
     input_name = self.density_comboBox_OBP.currentText()
     output_name = self.output_lineEdit_OBP.text()
     if output_name == "":
         self.statusBar().showMessage('Please set OUTPUT')
     elif output_name in get_data_files(CONF.seismic_dir):
         self.statusBar().showMessage('OUTPUT already exists.')
     else:
         self.statusBar().showMessage("Creating new seismic Object ...")
         create_new_seismic_file(output_name, input_name, CONF)
         self.populate_treeWidget()
         self.statusBar().showMessage("Calculating Density ...")
         obp_calculation(Seismic(input_name, CONF),
                         Seismic(output_name, CONF))
         self.statusBar().showMessage('')
Exemple #10
0
 def run_density_conversion(self):
     input_name = self.interval_velocity_comboBox_gardner.currentText()
     output_name = self.ouput_lineEdit_gardner.text()
     if output_name != "" and \
             not output_name in get_data_files(CONF.seismic_dir):
         self.statusBar().showMessage("Creating new seismic Object ...")
         create_new_seismic_file(output_name, input_name, CONF)
         self.populate_treeWidget()
         # command = self.conversion_type_comboBox.currentText()
         self.statusBar().showMessage("Calculating Density ...")
         gardner_c = float(self.gardner_C_lineEdit.text())
         gardner_d = float(self.gardner_D_lineEdit.text())
         velocity_to_density_conversion(Seismic(input_name, CONF),
                                        Seismic(output_name, CONF),
                                        gardner_c, gardner_d)
         self.statusBar().showMessage('')
Exemple #11
0
 def run_velocity_conversion(self):
     input_name = self.input_comboBox_Velocity_Conversion.currentText()
     output_name = self.output_lineEdit_Velocity_Conversion.text()
     if output_name != "" and \
             not output_name in get_data_files(CONF.seismic_dir):
         self.statusBar().showMessage("Creating new seismic Object ...")
         create_new_seismic_file(output_name, input_name, CONF)
         self.populate_treeWidget()
         command = self.conversion_type_comboBox.currentText()
         self.statusBar().showMessage(
             "Performing {} Velocity Conversion ...".format(command))
         eval("{}(Seismic(input_name, CONF), \
             Seismic(output_name, CONF))".format(
             command.replace(' ', '_').lower()))
         # interval_to_rms(
         #     Seismic(input_name, CONF), Seismic(output_name, CONF))
         self.statusBar().showMessage('')
Exemple #12
0
 def run_bowers_calculation(self):
     vel_name = self.vel_comboBox_Bowers.currentText()
     obp_name = self.obp_comboBox_Bowers.currentText()
     output_name = self.output_lineEdit_Bowers.text()
     a = float(self.a_lineEdit_Bowers.text())
     b = float(self.b_lineEdit_Bowers.text())
     if output_name == "":
         self.statusBar().showMessage('Please set OUTPUT')
     elif output_name in get_data_files(CONF.seismic_dir):
         self.statusBar().showMessage('OUTPUT already exists.')
     else:
         self.statusBar().showMessage("Creating new seismic Object ...")
         create_new_seismic_file(output_name, obp_name, CONF)
         self.populate_treeWidget()
         self.statusBar().showMessage("Calculating Bowers Pressure ...")
         bowers_calculation(Seismic(obp_name, CONF),
                            Seismic(vel_name, CONF),
                            Seismic(output_name, CONF), a, b)
         self.statusBar().showMessage('')
Exemple #13
0
 def run_eaton_calculation(self):
     vel_name = self.velocity_comboBox_Eaton.currentText()
     obp_name = self.obp_comboBox_Eaton.currentText()
     output_name = self.output_lineEdit_Eaton.text()
     n = float(self.eaton_n_spinBox.value())
     a = float(self.nct_a_lineEdit.text())
     b = float(self.nct_b_lineEdit.text())
     if output_name == "":
         self.statusBar().showMessage('Please set OUTPUT')
     elif output_name in get_data_files(CONF.seismic_dir):
         self.statusBar().showMessage('OUTPUT already exists.')
     else:
         self.statusBar().showMessage("Creating new seismic Object ...")
         create_new_seismic_file(output_name, obp_name, CONF)
         self.populate_treeWidget()
         self.statusBar().showMessage("Calculating Eaton Pressure ...")
         eaton_calculation(Seismic(obp_name, CONF), Seismic(vel_name, CONF),
                           Seismic(output_name, CONF), a, b, n)
         self.statusBar().showMessage('')
 def initUI(self):
     fnames = get_data_files(CONF.seismic_dir)
     self.input_cube_comboBox.addItems(fnames)