align_to_depth¶
petrophys.model.log_data.align_to_depth
- align_to_depth(data, source_depth, target_depth, method='linear')[source]¶
Resample data to align with target depth.
- Parameters:
data (np.ndarray) – Data values to resample
source_depth (np.ndarray) – Original depth values
target_depth (np.ndarray) – Target depth values
method (str) – Interpolation method (“linear”, “nearest”)
- Returns:
Resampled data aligned to target depth. Targets outside the source range, or inside a gap of NaN source values, are NaN.
- Return type:
np.ndarray
- Raises:
ValueError – If
methodis not “linear” or “nearest”.