예제 #1
0
    def extrapolate(self):
        # get well log
        well_name = self.well_comboBox.currentText()
        well = ppp.Well(str(CONF.well_dir / ".{}".format(well_name)))
        log = well.get_log(str(self.log_comboBox.currentText()))
        sm_log = well.get_log(str(self.sm_log_comboBox.currentText()))
        # get a, b
        a, b = float(self.a_lineEdit.text()), float(self.b_lineEdit.text())
        shift = well.kelly_bushing + well.water_depth
        shift_depth = np.array(log.depth)
        mask = shift_depth >= shift
        shift_depth = shift_depth[mask]
        new_den = np.full_like(np.array(log.data), np.nan)
        new_den[mask] = ppp.traugott(shift_depth, a, b)

        old_den = np.array(sm_log.data)
        old_mask = np.isfinite(old_den)
        new_den[old_mask] = old_den[old_mask]

        self.extraploated_log = ppp.Log()
        self.extraploated_log.depth = sm_log.depth
        self.extraploated_log.data = new_den
        self.extraploated_log.units = sm_log.units
        # self.fit_line_ax.append(self.ax.plot(new_den, log.depth)[0])
        self.fit_line_ax2.append(self.ax2.plot(new_den, log.depth)[0])
        self.matplotlib_widget.fig.canvas.draw()
예제 #2
0
    def obp_button_on_clicked(self):
        # get well log
        well_name = self.well_comboBox.currentText()
        well = ppp.Well(str(CONF.well_dir / ".{}".format(well_name)))
        den_log = well.get_log(str(self.log_comboBox.currentText()))

        depth = np.array(den_log.depth)
        rho = np.array(den_log.data)
        # insert missing density value with 2.4 g/cm3
        mask = np.isnan(depth)
        mask[den_log.start_idx:den_log.stop_idx] = True
        mask_nan = np.isnan(rho)
        mask = mask * mask_nan
        rho[mask] = 2.4

        kb = float(self.kb_lineEdit.text())
        wd = float(self.wd_lineEdit.text())
        rho_w = float(self.rho_lineEdit.text())
        obp = ppp.overburden_pressure(depth,
                                      rho,
                                      kelly_bushing=kb,
                                      depth_w=wd,
                                      rho_w=rho_w)

        self.obp_log = ppp.Log()
        self.obp_log.depth = depth
        self.obp_log.data = obp

        self.ax2.cla()
        self.ax2.plot(obp, depth)
        self.ax2.plot(
            ppp.hydrostatic_pressure(np.array(depth),
                                     kelly_bushing=kb,
                                     depth_w=wd,
                                     rho_f=rho_w), depth, 'g--')
        self.ax2.set_xlabel("Overburden Pressure (MPa)")
        self.ax2.set_title("Overburden Pressure")
        y = well.kelly_bushing + well.water_depth
        self.ax2.axhline(y=y, color='brown')
        self.ax2.annotate('KB+WD',
                          xy=(40, y),
                          xytext=(40, y + 500),
                          arrowprops=dict(facecolor='black',
                                          shrink=0.05,
                                          width=0.1,
                                          headwidth=8))

        self.matplotlib_widget.fig.canvas.draw()
예제 #3
0
 def save_edit(self):
     depth_tb = [float(self.tableWidget.item(irow, 0).text()) \
         for irow in range(self.tableWidget.rowCount())]
     data_tb = [float(self.tableWidget.item(irow, 1).text()) \
         for irow in range(self.tableWidget.rowCount())]
     temp_log = ppp.Log()
     temp_log.depth = depth_tb
     temp_log.data = data_tb
     if temp_log != self.well_log:
         reply = QMessageBox.question(
             self, "Save",
             "Log Data has been edited,\nAre you willing to save changes?",
             QMessageBox.Yes, QMessageBox.Cancel)
         if reply == QMessageBox.Yes:
             self.well.update_log(self.current_log_name, temp_log)
             self.well.save_well()
     self.close()
예제 #4
0
def void_well_log():
    return pygeopressure.Log()
예제 #5
0
def real_well_log():
    return pygeopressure.Log("test/data/seudo_las.las")
예제 #6
0
def measured_log():
    temp_log = pygeopressure.Log()
    temp_log.depth = [4118.5]
    temp_log.data = [60.605]
    return temp_log
예제 #7
0
def measured_coef_log():
    temp_log = pygeopressure.Log()
    temp_log.depth = [4118.5]
    temp_log.data = [1.5005]
    return temp_log