Exemplo n.º 1
0
    def predict(self):
        # get log
        well_name = self.well_comboBox.currentText()
        well = ppp.Well(str(CONF.well_dir / ".{}".format(well_name)))

        obp_log = well.get_log(str(self.obp_comboBox.currentText()))
        vel_log = well.get_log(str(self.velocity_comboBox.currentText()))
        A = float(self.a_lineEdit.text())
        B = float(self.b_lineEdit.text())
        U = float(self.u_lineEdit.text())
        v_max = float(self.vmax_lineEdit.text())
        idx = obp_log.get_depth_idx(float(self.start_lineEdit.text()))
        if self.buffer_checkBox.checkState() == Qt.Checked:
            pressure = ppp.bowers_varu(
                np.array(vel_log.data), np.array(obp_log.data), U, idx,
                a=A, b=B, vmax=v_max, buf=int(self.buffer_lineEdit.text()),
                end_idx=obp_log.get_depth_idx(float(self.end_lineEdit.text())))
        else:
            pressure = ppp.bowers(
                np.array(vel_log.data), np.array(obp_log.data), U, idx,
                a=A, b=B, vmax=v_max,
                end_idx=obp_log.get_depth_idx(float(self.end_lineEdit.text())))
        # pressure = ppp.bowers(
        #     average_data, np.array(obp_log.data), U, idx,
        #     a=A, b=B, vmax=v_max,
        #     end_idx=obp_log.get_depth_idx(float(self.end_lineEdit.text())))
        # pressure = ppp.bowers_varu(
        #     average_data, np.array(obp_log.data), U, idx,
        #     a=A, b=B, vmax=v_max, buf=int(self.buffer_lineEdit.text()),
        #     end_idx=obp_log.get_depth_idx(float(self.end_lineEdit.text())))
        self.plot_pressure(pressure)
Exemplo n.º 2
0
def bowers_calculation(obp_object, vel_object, output_object, a, b):
    obp_seisegy = ppp.SeiSEGY(str(obp_object.path))
    vel_seisegy = ppp.SeiSEGY(str(vel_object.path))
    output_seisegy = ppp.SeiSEGY(str(output_object.path))

    # actual calcualtion
    for il in obp_seisegy.inlines():
        obp_data_inline = obp_seisegy.inline(il)
        vel_data_inline = vel_seisegy.inline(il)
        output_data_inline = np.copy(obp_data_inline)
        for idx in range(obp_seisegy.nNorth):
            output_data_inline[idx] = ppp.bowers(vel_data_inline[idx],
                                                 obp_data_inline[idx],
                                                 1,
                                                 start_idx=-1,
                                                 a=a,
                                                 b=b,
                                                 vmax=5000,
                                                 end_idx=None)
        output_seisegy.update(ppp.InlineIndex(il), output_data_inline)
def test__bowers(vel, obp):
    assert (ppp.bowers(vel, obp, 1, 1, 98, 0.5, 4000) == \
        np.full((10,), fill_value=64, dtype=np.float32)).all()
def test__bowers(vel, obp):
    assert (ppp.bowers(vel, obp, 1, 1, 98, 0.5, 4000) == \
        np.full((10,), fill_value=64, dtype=np.float32)).all()