welleng.exchange package
Submodules
welleng.exchange.csv module
- welleng.exchange.csv.export_csv(survey, filename, tolerance=0.1, dls_cont=False, decimals=3, **kwargs)[source]
Wrapper for survey.export_csv
Function to export a minimalist (only the control points - i.e. the begining and end points of hold and/or turn sections) survey to input into third party trajectory planning software.
- Parameters:
survey (welleng.survey.Survey object)
filename (str) – The path and filename for saving the text file.
tolerance (float (default: 0.1)) – How close the the final N, E, TVD position of the minimalist survey should be to the original survey point (e.g. within 1 meter)
dls_cont (bool) – Whether to explicitly check for dls continuity. May result in a larger number of control points but a trajectory that is a closer fit to the survey.
decimals (int (default: 3)) – Number of decimal places provided in the output file listing
welleng.exchange.edm module
- class welleng.exchange.edm.EDM(filename)[source]
Bases:
object
- __init__(filename)[source]
Initiate an instance of an EDM object.
- Parameters:
filename (str) – The path and filename of the EDM file to be imported.
- get_attributes(tags=None, attributes={}, logic='AND')[source]
Get the attributes for the given tags in an EDM instance.
- Parameters:
tags (str or list of str (default: None)) – The tag or list of tags you wish to return. The default will return all the tags that satisfy the given attributes.
attributes (dict) – A dictionary of attribute keys and values to satisfy in the search of tags.
logic (str (default: 'AND')) – Indicates whether the attributes should be all be satisfied (‘AND’) or if only one needs to be satisfied (‘OR’).
- Returns:
data – A dictionary of a list of dictionaries of tags and their attributes.
- Return type:
dict
welleng.exchange.wbp module
- class welleng.exchange.wbp.SurveyPoint(md=None, inc=None, azi=None, cov_xx=None, cov_xy=None, cov_xz=None, cov_yy=None, cov_yz=None, cov_zz=None, x_bias=None, y_bias=None, z_bias=None, tool=None, location=None)[source]
Bases:
object
- class welleng.exchange.wbp.Target(name, location=None, geometry={'azimuth': None, 'category': None, 'color': {'application': None, 'color': None, 'feature': None, 'interpreter': None}, 'dip': None, 'locked': None, 'offset': None, 'orientation': None, 'radius_1': None, 'radius_2': None, 'thickness_down': None, 'thickness_up': None, 'type': None, 'vertices': []})[source]
Bases:
object
- __init__(name, location=None, geometry={'azimuth': None, 'category': None, 'color': {'application': None, 'color': None, 'feature': None, 'interpreter': None}, 'dip': None, 'locked': None, 'offset': None, 'orientation': None, 'radius_1': None, 'radius_2': None, 'thickness_down': None, 'thickness_up': None, 'type': None, 'vertices': []})[source]
- class welleng.exchange.wbp.WellPlan(depth_unit='meters', surface_unit='meters', survey=None, plan_name=None, parent_name=None, location_type=None, plan_method='curve_only', dirty_flag=None, sidetrack_id=None, dls=3.0, extension=0, wbp_data=None, targets=[], line=None, parent_wbp_file=None)[source]
Bases:
object
- __init__(depth_unit='meters', surface_unit='meters', survey=None, plan_name=None, parent_name=None, location_type=None, plan_method='curve_only', dirty_flag=None, sidetrack_id=None, dls=3.0, extension=0, wbp_data=None, targets=[], line=None, parent_wbp_file=None)[source]
An object for storing data extracted from or for writing to a .wbp file. As such, the following parameters are driven by those required by Landmark’s .wbp format.
- Parameters:
depth_unit (string (default: 'meters')) – The units used for expressing depth (z axis or tvd) in either ‘meters’ or ‘feet’.
surface_unit (string (default: 'meters')) – The units used for expressing lateral distances (x, y, N, E) in either ‘meters’ or ‘feet’.
survey (welleng.survey.Survey object (default: None))
plan_name (string (default: None)) – The name of the well bore plan.
parent_name (string (default: None)) – The name of the parent well bore plan (in the event that the planned well is a sidetrack or lateral).
location_type (string (default: None)) – Best to review the wbp.yaml file for options.
plan_method (string (default: 'curve_only')) – The method used for joining the plan points in the .wbp file. Options can be reviewed in the wbp.yaml file but won’t currently effect how the code runs, so just leave default.
dirt_flag (string (default: None)) – Again, review the wbp.yaml file for options, but this is not currently used in this code.
sidetrack_id (string (default: None)) – Leave default, not used.
dls (float (default: 0)) – Suggests that this sets the design dls for planning, but doesn’t appear to matter so leave as default.
extension (float (default: 0)) – Not really sure what this does.
wbp_data (list of strings (default: None)) – A list of strings with each string representing a line from of text loaded from a .wbp file. Used for importing .wbp data.
targets (list of welleng.exchange.wbp.Target objects (default: [])) – A list of target objects, but more of a future function.
line (int (default: None)) – Used for processing .wbp files that contain multiple well bores.
- Return type:
A welleng.exchange.wbp.WellPlan object representing a well bore.
- welleng.exchange.wbp.export(data, filename=None, comments=None)[source]
Export a WellPlan object to .wbp format.
- Parameters:
data (welleng.exchange.wbp.WellPlan object or a list of objects)
filename (string (default: None)) – The filename to save the .wbp file to. If None then the output is returned as data.
comments (list of strings (default: None)) – A list of comments to be printed in the header of the .wbp file.
- Returns:
doc
- Return type:
list of strings
- welleng.exchange.wbp.load(filename)[source]
Loads data line by line from a .wbp file, initiates a WellPlan object and populates it with data.
- Parameters:
filename (string) – The location and filename of the .wbp file to load.
- Return type:
A welleng.exchange.wbp.WellPlan object
- welleng.exchange.wbp.strip_duplicates(survey)[source]
Function to strip out identical successive survey stations from a Survey object.
- Parameters:
survey (welleng.survey.Survey object)
- Returns:
survey_stripped – A survey object with repeating survey stations removed.
- Return type:
welleng.survey.Survey object
- welleng.exchange.wbp.wbp_to_survey(data, step=None, radius=10, azi_reference='true', convergence=0.0, utm_zone=31, utm_north=True)[source]
Converts a WellPlan object created from a .wbp file into a Survey object.
- Parameters:
data (wellend.exchange.wbp.WellPlan object)
step (float) – The desired step interval used to create the Survey object. e.g. step=30 would create a survey station every 30 meters.
radius (float (default: 10)) – The radius of the well bore generated in the survey. The default is used assuming that the well will be rendered with welleng.visual.plot.
- Returns:
survey
- Return type:
welleng.survey.Survey object
Module contents
welleng/exchange
Contains the importers and exporters for various survey formats.