DepthIndex

petrophys.model.log_data.DepthIndex

class DepthIndex(depth, unit='ft')[source]

Utilities for working with depth-indexed data.

Attributes

bottom

depth

is_uniform

Check if depth sampling is uniform.

step

Return median step size.

top

Methods

find_nearest

Find index of nearest depth and the actual depth value.

get_indices

Get indices for depth range.

get_mask

Get boolean mask for depth range.

resample

Return a new uniform depth index from top to bottom at new_step.

Parameters:
property depth: ndarray
property top: float | None
property bottom: float | None
property step: float

Return median step size.

property is_uniform: bool

Check if depth sampling is uniform.

get_mask(top=None, bottom=None)[source]

Get boolean mask for depth range.

Parameters:
Return type:

ndarray

get_indices(top=None, bottom=None)[source]

Get indices for depth range.

Parameters:
Return type:

ndarray

find_nearest(target_depth)[source]

Find index of nearest depth and the actual depth value.

Parameters:

target_depth (float)

Return type:

Tuple[int, float]

resample(new_step, method='linear')[source]

Return a new uniform depth index from top to bottom at new_step.

Only the depth index is built; no data is resampled, so method has no effect (use align_to_depth() to resample data onto it).

Parameters:
Return type:

DepthIndex