コード例 #1
0
ファイル: update_point.py プロジェクト: tranhieu956230/ai_i2g
def update_marginal_marine(row):
    points = []
    if row["Biostratigraphy"] == "1":
        points = ["x"]
    elif row["Biostratigraphy"] == "2":
        points = ["x"]
    elif row["Biostratigraphy"] == "3":
        points = ["x"]
    elif row["Biostratigraphy"] == "4":
        points = [3, 1, 0]
    elif row["Biostratigraphy"] == "5":
        points = [3, 1, 0]
    elif row["Biostratigraphy"] == "6":
        points = [3, 1, 0]
    elif row["Biostratigraphy"] == "7":
        points = [-2, -1, 0]

    if len(points) > 0:
        if points[0] != "x":
            point = points[int(row["Reliability"]) - 1]
            for code in utils_func.get_group_depofacies("Marginal_Marine"):
                name = utils_func.map_core_depofacies_code_to_name(code)
                if int(row[name]) > 0:
                    row.update({name: utils_func.handle_addition(int(row[name]) + point)})
        else:
            for code in utils_func.get_group_depofacies("Marginal_Marine"):
                name = utils_func.map_core_depofacies_code_to_name(code)
                row.update({name: 0})

    return row
コード例 #2
0
def add_point_coal(row):
    for code in utils_func.get_group_depofacies("Fluvial"):
        name = utils_func.map_core_depofacies_code_to_name(code)
        if int(row[name]) > 0:
            row.update({name: int(row[name]) + 2})

    for code in utils_func.get_group_depofacies("Marginal_Marine"):
        name = utils_func.map_core_depofacies_code_to_name(code)
        if int(row[name]) > 0:
            row.update({name: int(row[name]) + 1})
    return row
コード例 #3
0
def add_point_marine_non_clastic(row):
    marines = ["Shallow_Marine", "Marginal_Marine", "Deep_Marine"]
    for group_name in marines:
        codes = utils_func.get_group_depofacies(group_name)
        for code in codes:
            name = utils_func.map_core_depofacies_code_to_name(code)
            if int(row[name]) > 0:
                row.update({name: int(row[name]) + 2})
    return row
コード例 #4
0
def update_deep_marine(row):
    point = 0
    if int(row["Stacking_pattern"]) == 1:
        point = 0
    elif int(row["Stacking_pattern"]) == 2:
        point = 0

    codes = utils_func.get_group_depofacies("Deep_Marine")
    for code in codes:
        name = utils_func.map_core_depofacies_code_to_name(code)
        if int(row[name]) > 0:
            row.update(
                {name: utils_func.handle_addition(int(row[name]) + point)})

    return row