def test_propstatset():

    qcp = QCProperties()

    qcp.get_grid_statistics(GRIDDATA)
    qcp.get_well_statistics(WELLDATA)
    qcp.get_bwell_statistics(BWELLDATA)

    assert len(qcp.dataframe["ID"].unique()) == 3
示例#2
0
    def test_auto_combination(self, data_grid, data_wells, data_bwells):
        """Tests combining statistic """
        qcp = QCProperties()

        qcp.get_grid_statistics(data_grid)
        assert len(qcp.dataframe["ID"].unique()) == 1

        qcp.get_well_statistics(data_wells)
        assert len(qcp.dataframe["ID"].unique()) == 2

        qcp.get_bwell_statistics(data_bwells)
        assert len(qcp.dataframe["ID"].unique()) == 3
def test_propstatset_auto_combination():

    qcp = QCProperties()

    qcp.get_grid_statistics(GRIDDATA)

    assert len(qcp.dataframe["ID"].unique()) == 1

    qcp.get_well_statistics(WELLDATA)

    assert len(qcp.dataframe["ID"].unique()) == 2

    qcp.get_bwell_statistics(BWELLDATA, reuse=True)

    assert len(qcp.dataframe["ID"].unique()) == 3
示例#4
0
def test_full_dataframe_wells():
    data = data_orig_wells.copy()

    qcp = QCProperties()
    stat = qcp.get_well_statistics(data)

    assert set(stat.property_dataframe.columns) == set(
        ["ZONE", "PERM", "PORO", "FACIES"])
    assert stat.property_dataframe["PORO"].mean() == pytest.approx(0.1534,
                                                                   abs=0.001)
示例#5
0
    def test_wells(self, data_wells):
        """Test extracting statsitics from well logs"""
        qcp = QCProperties()
        qcp.get_well_statistics(data_wells)

        assert set(qcp.dataframe["PROPERTY"].unique()) == set(["PORO", "PERM"])
        assert set(qcp.dataframe["ZONE"].unique()) == set([
            "Above_TopUpperReek",
            "Below_TopLowerReek",
            "Below_TopMidReek",
            "Below_TopUpperReek",
            "Below_BaseLowerReek",
            "Total",
        ])

        row = qcp.dataframe[(qcp.dataframe["ZONE"] == "Total")
                            & (qcp.dataframe["FACIES"] == "Total")
                            & (qcp.dataframe["PROPERTY"] == "PORO")]
        assert row["Avg"].values == pytest.approx(0.1539, abs=0.001)
        assert row["Max"].values == pytest.approx(0.3661, abs=0.001)
示例#6
0
def test_statistics_wells():
    data = data_orig_wells.copy()
    data["name"] = "Raw_Logs"

    qcp = QCProperties()
    stat = qcp.get_well_statistics(data)
    stat = qcp.get_well_statistics(data)
    assert set(stat.dataframe.columns) == set([
        "Avg_Weighted",
        "Avg",
        "FACIES",
        "Max",
        "Min",
        "P10",
        "P90",
        "PROPERTY",
        "Stddev",
        "ZONE",
        "SOURCE",
        "ID",
    ])
    assert list(stat.dataframe["ID"].unique())[0] == "Raw_Logs"
    assert set(stat.dataframe["PROPERTY"].unique()) == set(["PORO", "PERM"])
    assert stat.dataframe[stat.dataframe["PROPERTY"] ==
                          "PORO"]["Avg"].max() == pytest.approx(0.3059,
                                                                abs=0.001)
    assert set(stat.dataframe["ZONE"].unique()) == set([
        "Above_TopUpperReek",
        "Below_TopLowerReek",
        "Below_TopMidReek",
        "Below_TopUpperReek",
        "Below_BaseLowerReek",
        "Total",
    ])

    row = stat.dataframe[(stat.dataframe["ZONE"] == "Total")
                         & (stat.dataframe["FACIES"] == "Total")
                         & (stat.dataframe["PROPERTY"] == "PORO")]
    assert row["Avg"].values == pytest.approx(0.1539, abs=0.001)
示例#7
0
def test_filters_wells():
    data = data_orig_wells.copy()
    data["selectors"] = {
        "ZONE": {
            "name":
            "Zonelog",
            "exclude": [
                "Below_TopMidReek",
                "Below_TopLowerReek",
                "Below_BaseLowerReek",
            ],
        },
        "FACIES": {
            "name": "Facies",
            "include": ["Crevasse", "Channel"]
        },
    }
    qcp = QCProperties()
    stat = qcp.get_well_statistics(data)

    assert set(["Crevasse", "Channel",
                "Total"]) == set(stat.dataframe["FACIES"].unique())
    assert set(stat.dataframe["ZONE"].unique()) == set(
        ["Above_TopUpperReek", "Below_TopUpperReek", "Total"])