NormalizationModule¶
petrophys.preprocessing.normalization.NormalizationModule
Also available as petrophys.preprocessing.NormalizationModule
- class NormalizationModule(method='linear')[source]¶
Log normalization for multi-well consistency.
This class provides methods for normalizing well logs to ensure consistency when comparing or combining data from multiple wells.
The linear normalization equation is: Norm = logmin + (logmax - logmin) * (Log - loglow) / (loghigh - loglow)
- Parameters:
method (str, optional) – Normalization method. Only linear normalization is implemented (“linear”, or “percentile” for the same linear mapping between percentile anchors); other methods raise
ValueError. Default: “linear”
Examples
>>> normalizer = NormalizationModule() >>> normalized_gr = normalizer.normalize( ... gr_curve, ... log_min=0, log_max=150, ... log_low=20, log_high=120 ... )
Methods
Calculate shift and scale to match reference.
Normalize log data to target range.
Normalize a Curve object.
Normalize curve using stored reference parameters.
Set reference parameters for a curve type.
- normalize(
- data,
- log_min,
- log_max,
- log_low=None,
- log_high=None,
- percentile_low=5,
- percentile_high=95,
Normalize log data to target range.
- Parameters:
data (np.ndarray or Curve) – Log data to normalize
log_min (float) – Target minimum value
log_max (float) – Target maximum value
log_low (float, optional) – Source minimum (auto-detect if not provided)
log_high (float, optional) – Source maximum (auto-detect if not provided)
percentile_low (float, optional) – Percentile for auto-detecting low (default: 5)
percentile_high (float, optional) – Percentile for auto-detecting high (default: 95)
- Returns:
Normalized log data
- Return type:
np.ndarray
- normalize_curve(
- curve,
- log_min,
- log_max,
- log_low=None,
- log_high=None,
Normalize a Curve object.
- set_reference(mnemonic, log_min, log_max, log_low, log_high)[source]¶
Set reference parameters for a curve type.