Skip to content

Commit

Permalink
EditFiles
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderJuestel committed Apr 1, 2024
1 parent 59a1a70 commit e6d0b8c
Show file tree
Hide file tree
Showing 6 changed files with 3,044 additions and 2,456 deletions.
24 changes: 18 additions & 6 deletions pyborehole/borehole.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

from pyborehole.deviation import Deviation
from pyborehole.design import WellDesign
from pyborehole.logs import LASLogs, DLISLogs
from pyborehole.logs_las import LASLogs
from pyborehole.logs_dlis import DLISLogs
from pyborehole.logs_lis import LISLogs
from pyborehole.litholog import LithoLog
from pyborehole.tops import WellTops

Expand Down Expand Up @@ -89,7 +91,7 @@ class Borehole:
deviation : Deviation, default: ``None``
Deviation Object.
logs : Union[LASLogs, DLISLogs], default: ``None``
logs : Union[LASLogs, DLISLogs, LISLogs], default: ``None``
Well Log Object.
well_tops : Well Tops, default: ``None``
Well Tops Object.
Expand Down Expand Up @@ -301,7 +303,7 @@ def __init__(self,
deviation : Deviation, default: ``None``
Deviation Object.
logs : Union[LASLogs, DLISLogs], default: ``None``
logs : Union[LASLogs, DLISLogs, LISLogs], default: ``None``
Well Log Object.
well_tops : Well Tops, default: ``None``
Well Tops Object.
Expand Down Expand Up @@ -1537,7 +1539,7 @@ def add_deviation(self,

def add_well_logs(self,
path: str,
nodata: Union[int, float] = -9999) -> Union[LASLogs, DLISLogs]:
nodata: Union[int, float] = -9999) -> Union[LASLogs, DLISLogs, LISLogs]:
"""Add Well Logs to the Borehole Object.
Parameters
Expand All @@ -1549,7 +1551,7 @@ def add_well_logs(self,
Returns
_______
LASLogs or DLISLogs
LASLogs, DLISLogs, or LISLogs
Well Logs Object.
Raises
Expand Down Expand Up @@ -1621,8 +1623,16 @@ def add_well_logs(self,
self.logs = DLISLogs(self,
path=path,
nodata=nodata)

# Opening LIS file if provided
elif path.endswith('.lis') or path.endswith('.LIS'):
# Creating well logs from LIS file
self.logs = LISLogs(self,
path=path,
nodata=nodata)

else:
raise ValueError('Please provide a LAS file or DLIS file')
raise ValueError('Please provide a LAS, DLIS or LIS file')

# Setting attributes
self.has_logs = True
Expand Down Expand Up @@ -1716,6 +1726,8 @@ def add_well_tops(self,
# Creating well tops
self.well_tops = WellTops(path=path,
delimiter=delimiter,
top_column=top_column,
depth_column=depth_column,
unit=unit)

# Checking that the top column is in the DataFrame
Expand Down
Loading

0 comments on commit e6d0b8c

Please sign in to comment.