Ejemplo n.º 1
0
def data_process():
    top = 0
    height = 0
    for i in range(1, 4):
        filepath = os.path.abspath("well_logging/static/B_" + str(i) + ".las")
        ls = lasio.read(filepath)
        if top == 0 and height == 0:
            top = min(ls.depth_m)
            height = max(ls.depth_m)
        else:
            top = min(min(ls.depth_m), top)
            height = max(max(ls.depth_m), height)
    for i in range(1, 4):
        filepath = os.path.abspath("well_logging/static/B_" + str(i) + ".las")
        ls = lasio.read(filepath)
        l = ['CALI', 'GR', 'SGR', 'LLD', 'RHOB', 'NPHI', 'DT']
        l_new = list()
        for j in l:
            if j in ls.curves:
                l_new.append(j)
        xml_path = xml_create(l_new)
        log = pt.Log(filepath)
        view = pt.LogViewer(log,
                            top=top,
                            height=height,
                            template_xml_path=xml_path)
        s = os.path.abspath("well_logging/static/pictures/")
        s = s + "\img_" + str(i) + ".png"
        view.fig.savefig(s)
Ejemplo n.º 2
0
def main():

    merge_las()
    log = ptr.Log("final_las.las", )
    log.precondition()
    viewer = ptr.LogViewer(log,
                           template_xml_path="schema.xml",
                           top=1430,
                           height=120)
    viewer.show()
    print("done")
Ejemplo n.º 3
0
    # create a Log object by reading a file path  #

    log = ptr.Log(las_file)

    ### 2. graphically edit raw log ###

    # use manual mode for fixing borehole washout #
    # and other changes requiring redrawing data  #

    # use bulk shift mode to linearly adjust all  #
    # curve data                                  #

    # close both windows to continue program      #

    viewer = ptr.LogViewer(log, top=6950, height=100)
    viewer.show(edit_mode=True)

    # overwrite log variable with updated log     #
    # from LogViewer edits                        #

    log = viewer.log

    # find way to name well, looking for well name#
    # or UWI or API                               #

    if len(log.well['WELL'].value) > 0:
        well_name = log.well['WELL'].value
    elif len(log.well['UWI'].value) > 0:
        well_name = str(log.well['UWI'].value)
    elif len(log.well['API'].value) > 0: