diff --git a/pyborehole/borehole.py b/pyborehole/borehole.py index 23bf5a7..b9d07ca 100644 --- a/pyborehole/borehole.py +++ b/pyborehole/borehole.py @@ -1539,6 +1539,7 @@ def add_deviation(self, def add_well_logs(self, path: str, + engine: str = 'numpy', nodata: Union[int, float] = -9999, depth_scale_factor: Union[int, float] = 1) -> Union[LASLogs, DLISLogs, LISLogs]: """Add Well Logs to the Borehole Object. @@ -1547,6 +1548,8 @@ def add_well_logs(self, __________ path : str Path to the well log file, e.g. ``path='Well_Logs.las'``. + engine : str, default: ``'numpy'`` + Engine to read the LAS file, e.g. ``engine='numpy'``. nodata : Union[int, float], default: ``-9999`` Nodata value to be replaced by `np.NaN`, e.g. ``nodata=-9999``. depth_scale_factor: Union[int, float], default: ``1`` @@ -1614,6 +1617,7 @@ def add_well_logs(self, # Creating well logs from LAS file self.logs = LASLogs(self, path=path, + engine=engine, depth_scale_factor=depth_scale_factor) # Opening DLIS file if provided diff --git a/pyborehole/logs_las.py b/pyborehole/logs_las.py index 68044c6..3b86d34 100644 --- a/pyborehole/logs_las.py +++ b/pyborehole/logs_las.py @@ -183,6 +183,7 @@ class LASLogs: def __init__(self, borehole, path: str, + engine: str = 'numpy', depth_scale_factor: Union[int, float] = 1): """Class to initiate a Well Log Object. @@ -192,8 +193,10 @@ def __init__(self, Borehole object. path : str Path to the well logs, e.g. ``path='logs.las'``. - depth_scale_factor: Union[int, float], default: ``1`` - Factor to scale the depth values, e.g. "depth_scale_factor=1". + engine : str, default: ``'numpy'`` + Engine to read the LAS file, e.g. ``engine='numpy'``. + depth_scale_factor : Union[int, float], default: ``1`` + Factor to scale the depth values, e.g. ``depth_scale_factor=1``. Attributes __________ @@ -346,7 +349,8 @@ def __init__(self, raise TypeError('The path must be provided as string') # Opening LAS file - las = lasio.read(path) + las = lasio.read(path, + engine=engine) # Extracting DataFrame from LAS file self.df = las.df().sort_index()