Commit 8eb61789 authored by Gregory Harris's avatar Gregory Harris
Browse files

Improve docs

parent 80e2bfa1
Pipeline #71576 passed with stage
in 44 seconds
......@@ -298,11 +298,22 @@ class LasToRecordMapper:
class MapWellLogToLas:
def __init__(self, wellbore: Record, welllog: Record, data: DataFrame) -> None:
Construct a new instance of MapWellLogToLas
:param wellbore Record: The wellbore record
:param welllog Record: The well log record
:param data DataFrame: The well log curve data
self._wellbore = wellbore
self._welllog = welllog
self._data = data
def build_las_file(self) -> LASFile:
Build a new instance of LASFile and populate it with data from the welllog
:returns: A new instance of LASFile.
:rtype: LASFile
las = lasio.LASFile()
# Add wellbore info
......@@ -315,6 +326,7 @@ class MapWellLogToLas:
# Add curves to las file
for curve in self._data:
# Try to get the curve units from the welllog
if wl_curves is not None:
wl_curve_matches = [c for c in wl_curves if c.get("CurveID") == curve]
wl_curve = wl_curve_matches[0] if wl_curve_matches is not None and len(wl_curve_matches) > 0 else {}
......@@ -80,7 +80,9 @@ class WellLogService:
Download wellbore and log data and convert to a LAS file.
:param str welllog_id: The welllog_id
:param list[str] curves: The Curves to get
:param list[str] curves: The Curves to get, or None for all curves
:return: A new instance of the LAS file object
:rtype: LASFile
logger.warning(f"Getting welllog ID {welllog_id}")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment