DLISReader

petrophys.io.DLISReader

class DLISReader(filepath)[source]

Reader for DLIS (Digital Log Interchange Standard) files.

DLIS files can contain multiple logical files and frames. This reader provides access to the data within these structures.

Examples

>>> reader = DLISReader("well_data.dlis")
>>> well = reader.to_well()

Attributes

active_file

Return currently active logical file.

n_logical_files

Return number of logical files.

Methods

close

Close the DLIS file.

get_channels

Return list of channel names in a frame.

get_frames

Return list of frame names in active logical file.

get_well_info

Extract well information from DLIS origin.

set_active_file

Set the active logical file by index.

to_merged_well

Merge scalar channels from multiple DLIS frames onto one depth index.

to_well

Convert DLIS data to Well object.

Parameters:

filepath (str | Path)

__init__(filepath)[source]

Initialize DLIS reader.

Parameters:

filepath (str or Path) – Path to DLIS file

property n_logical_files: int

Return number of logical files.

property active_file

Return currently active logical file.

set_active_file(index)[source]

Set the active logical file by index.

Parameters:

index (int)

get_frames()[source]

Return list of frame names in active logical file.

Return type:

List[str]

get_channels(frame_name=None)[source]

Return list of channel names in a frame.

Parameters:

frame_name (str | None)

Return type:

List[str]

get_well_info()[source]

Extract well information from DLIS origin.

Return type:

Dict[str, Any]

to_well(
frame_name=None,
channels=None,
depth_unit=None,
include_vector_channels=True,
)[source]

Convert DLIS data to Well object.

Parameters:
  • frame_name (str, optional) – Name of frame to read (default: first frame)

  • channels (list of str, optional) – Specific channels to read (default: all)

  • depth_unit (str, optional) – Target depth unit. DLIS 0.1 in tool depth is converted to metres by default.

  • include_vector_channels (bool, optional) – Keep channels with several values per depth (spectra, arrays) as one curve per element, named <channel>_<index> (default: True). False reads scalar channels only.

Returns:

Well object with loaded data

Return type:

Well

to_merged_well(
frame_names=None,
channels=None,
depth_unit='m',
step=None,
target_depth=None,
standardize=True,
step_strategy='finest',
max_samples=2_000_000,
channel_preference=None,
)[source]

Merge scalar channels from multiple DLIS frames onto one depth index.

This path is intended for conventional scalar log interpretation. Vector channels such as spectra and borehole images are skipped; image DLIS files should use the imaging readers.

Parameters:
Return type:

Well

close()[source]

Close the DLIS file.