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)
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")
# get paths for all las files in folder # # wfmp_raw_las # raw_las_folder = r'wfmp_raw_las/' las_files = glob.glob(raw_las_folder + r'*.las') ### First Iteration ### for las_file in las_files: ### 1. read raw las file ### # 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 #
.. _bulk example: wolfcamp_bulk.html .. _examples folder: https://github.com/toddheitmann/PetroPy/tree/master/examples """ import petropy as ptr # import pyplot to add logo to figure import matplotlib.pyplot as plt ### 1. Read las file # create a Log object by reading a file path # las_file_path = '42303347740000.las' log = ptr.Log(las_file_path) ### 2. load tops ### tops_file_path = 'tops.csv' log.tops_from_csv(tops_file_path) ### 3. graphically edit 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 #