Sand Silt Clay module
- class quick_pp.lithology.sand_silt_clay.SandSiltClay(dry_sand_point: tuple[float, float] | None = None, dry_silt_point: tuple[float, float] | None = None, dry_clay_point: tuple[float, float] | None = None, fluid_point: tuple[float, float] | None = None, wet_clay_point: tuple[float, float] | None = None, silt_line_angle: float | None = None, **kwargs)[source]
Bases:
objectA ternary lithology model for sand-silt-clay sequences.
This model is a modification of Kuttan’s litho-porosity model. It uses a neutron-density crossplot to estimate the volumetric fractions of sand, silt, and clay. Unlike the original binary model, this implementation considers reservoir sections as a combination of sand, silt, and clay.
- estimate_lithology(nphi, rhob)[source]
Estimate sand silt clay lithology volumetrics.
- Parameters:
- Returns:
- A tuple containing the volumes of sand, silt, and clay,
and a tuple with the calculated min/max trend lines for NPHI and RHOB.
- Return type:
- lithology_fraction_kuttan_modified(nphi, rhob)[source]
Estimate lithology volumetrics based on modified Kuttan’s litho-porosity model.
- SandSiltClay.estimate_lithology(nphi, rhob)[source]
Estimate sand silt clay lithology volumetrics.
- Parameters:
- Returns:
- A tuple containing the volumes of sand, silt, and clay,
and a tuple with the calculated min/max trend lines for NPHI and RHOB.
- Return type:
- SandSiltClay.lithology_fraction_kuttan_modified(nphi, rhob)[source]
Estimate lithology volumetrics based on modified Kuttan’s litho-porosity model.
Sand Shale module
- class quick_pp.lithology.sand_shale.SandShale(dry_sand_point: tuple[float, float] | None = None, dry_clay_point: tuple[float, float] | None = None, fluid_point: tuple[float, float] | None = None, wet_clay_point: tuple[float, float] | None = None, silt_line_angle: float | None = None, **kwargs)[source]
Bases:
objectA binary lithology model for sand-shale sequences.
This model uses a neutron-density crossplot to estimate the volumetric fractions of sand and shale. It dynamically defines endpoints if not explicitly provided, making it adaptable to different datasets.
- dry_sand_point
Initializes the SandShale model with specified or default endpoints.
- Parameters:
dry_sand_point (tuple, optional) – (NPHI, RHOB) for dry sand. Defaults to config values.
dry_clay_point (tuple, optional) – (NPHI, RHOB) for dry clay. Defaults to config values.
fluid_point (tuple, optional) – (NPHI, RHOB) for the formation fluid. Defaults to config values.
wet_clay_point (tuple, optional) – (NPHI, RHOB) for wet clay, used for dynamic endpoint calculation. Defaults to config values.
- estimate_lithology(nphi, rhob)[source]
Estimate lithology volumetrics based on neutron density cross plot.
- Parameters:
- Returns:
- A tuple containing the volumes of sand and clay,
and a tuple with the calculated min/max trend lines for NPHI and RHOB.
- Return type:
- SandShale.estimate_lithology(nphi, rhob)[source]
Estimate lithology volumetrics based on neutron density cross plot.
- Parameters:
- Returns:
- A tuple containing the volumes of sand and clay,
and a tuple with the calculated min/max trend lines for NPHI and RHOB.
- Return type:
Carbonate module
- class quick_pp.lithology.carbonate.Carbonate(dry_calc_point: tuple[float, float] | None = None, dry_dolo_point: tuple[float, float] | None = None, dry_clay_point: tuple[float, float] | None = None, fluid_point: tuple[float, float] | None = None, **kwargs)[source]
Bases:
objectA model for estimating carbonate lithology from well logs.
This class implements methods for determining the volumetric fractions of calcite, dolomite, and clay using either neutron-density or density-PEF crossplots. It supports both single-mineral (limestone or dolostone) and dual-mineral (limestone-dolomite) carbonate models.
- estimate_lithology(nphi, rhob, pef=None, vsh_gr=None, model: str = 'single', method: str = 'neu_den', carbonate_type: str = 'limestone')[source]
Estimate carbonate and clay lithology volumetrics.
- Parameters:
nphi (np.ndarray or float) – Neutron Porosity log [v/v].
rhob (np.ndarray or float) – Bulk Density log [g/cc].
pef (np.ndarray or float, optional) – Photoelectric Factor log [barns/electron]. Required for ‘den_pef’ method. Defaults to None.
vsh_gr (np.ndarray or float, optional) – Volume of shale from gamma ray log [v/v]. Defaults to None.
model (str, optional) – The lithology model, either ‘single’ (one carbonate type + clay) or ‘double’ (calcite + dolomite + clay). Defaults to ‘single’.
method (str, optional) – The crossplot method for the ‘double’ model, either ‘neu_den’ or ‘den_pef’. Defaults to ‘neu_den’.
carbonate_type (str, optional) – The dominant carbonate type for the ‘single’ model, either ‘limestone’ or ‘dolostone’. Defaults to ‘limestone’.
- Returns:
A tuple containing the volumes of clay, calcite, and dolomite.
- Return type:
tuple[np.ndarray, np.ndarray, np.ndarray]
- lithology_fraction_neu_den(nphi, rhob, model: str = 'single', carbonate_type: str = 'limestone')[source]
Estimate clay and carbonate (either limestone or dolostone) based on neutron density cross plot.
- Parameters:
nphi (np.ndarray or float) – Neutron Porosity log [v/v].
rhob (np.ndarray or float) – Bulk Density log [g/cc].
model (str, optional) – The lithology model, either ‘single’ or ‘double’. Defaults to ‘single’.
carbonate_type (str, optional) – The dominant carbonate type for the ‘single’ model. Defaults to ‘limestone’.
- Returns:
- A tuple containing the volumes of the two lithology components.
For ‘single’ model: (vclay, vcarbonate). For ‘double’ model: (vdolomite, vcalcite).
- Return type:
tuple[np.ndarray, np.ndarray]
- lithology_fraction_pef(pef, rhob)[source]
Estimate limestone and dolostone based on pef density cross plot. Expecting the inputs are clay corrected.
- Carbonate.estimate_lithology(nphi, rhob, pef=None, vsh_gr=None, model: str = 'single', method: str = 'neu_den', carbonate_type: str = 'limestone')[source]
Estimate carbonate and clay lithology volumetrics.
- Parameters:
nphi (np.ndarray or float) – Neutron Porosity log [v/v].
rhob (np.ndarray or float) – Bulk Density log [g/cc].
pef (np.ndarray or float, optional) – Photoelectric Factor log [barns/electron]. Required for ‘den_pef’ method. Defaults to None.
vsh_gr (np.ndarray or float, optional) – Volume of shale from gamma ray log [v/v]. Defaults to None.
model (str, optional) – The lithology model, either ‘single’ (one carbonate type + clay) or ‘double’ (calcite + dolomite + clay). Defaults to ‘single’.
method (str, optional) – The crossplot method for the ‘double’ model, either ‘neu_den’ or ‘den_pef’. Defaults to ‘neu_den’.
carbonate_type (str, optional) – The dominant carbonate type for the ‘single’ model, either ‘limestone’ or ‘dolostone’. Defaults to ‘limestone’.
- Returns:
A tuple containing the volumes of clay, calcite, and dolomite.
- Return type:
tuple[np.ndarray, np.ndarray, np.ndarray]
- Carbonate.lithology_fraction_neu_den(nphi, rhob, model: str = 'single', carbonate_type: str = 'limestone')[source]
Estimate clay and carbonate (either limestone or dolostone) based on neutron density cross plot.
- Parameters:
nphi (np.ndarray or float) – Neutron Porosity log [v/v].
rhob (np.ndarray or float) – Bulk Density log [g/cc].
model (str, optional) – The lithology model, either ‘single’ or ‘double’. Defaults to ‘single’.
carbonate_type (str, optional) – The dominant carbonate type for the ‘single’ model. Defaults to ‘limestone’.
- Returns:
- A tuple containing the volumes of the two lithology components.
For ‘single’ model: (vclay, vcarbonate). For ‘double’ model: (vdolomite, vcalcite).
- Return type:
tuple[np.ndarray, np.ndarray]
- Carbonate.lithology_fraction_pef(pef, rhob)[source]
Estimate limestone and dolostone based on pef density cross plot. Expecting the inputs are clay corrected.
Multi Mineral module
- class quick_pp.lithology.multi_mineral.MultiMineral(minerals: List[str] | None = None, fluid_properties: Dict | None = None, porosity_method: str = 'density', porosity_endpoints: Dict | None = None)[source]
Bases:
objectOptimization-based multi-mineral model for lithology estimation with fluid volumes.
- _volume_constraint(volumes: ndarray) float[source]
Ensure that the sum of all mineral and fluid volumes equals 1.
- _calculate_porosity(nphi: float, rhob: float, dtc: float | None = None) float[source]
Calculate an initial porosity estimate based on the selected method.
- _calculate_matrix_density(mineral_volumes: ndarray) float[source]
Calculate the average matrix density from mineral volumes.
- Parameters:
mineral_volumes (np.ndarray) – An array of mineral volumes.
- Returns:
The calculated matrix density.
- Return type:
- _calculate_fluid_density(fluid_volumes: ndarray) float[source]
Calculate the average fluid density from fluid volumes.
- Parameters:
fluid_volumes (np.ndarray) – An array of fluid volumes.
- Returns:
The calculated average fluid density.
- Return type:
- _calculate_log_response(volumes: ndarray, log_type: str) float[source]
Calculate the reconstructed log response for a given log type.
- _calculate_average_error(volumes: ndarray, log_values: Dict[str, float]) float[source]
Calculate the average absolute error between measured and reconstructed logs.
- _error_function(volumes: ndarray, log_values: Dict[str, float]) float[source]
Calculate the sum of squared errors for the optimization.
- _optimize_volumes(log_values: Dict[str, float]) Tuple[ndarray, ndarray, bool][source]
Perform the optimization to find the best-fit mineral and fluid volumes.
- estimate_lithology(gr: ndarray, nphi: ndarray, rhob: ndarray, pef: ndarray | None = None, dtc: ndarray | None = None, auto_scale: bool = True) DataFrame[source]
Estimate mineral and fluid volumes for a set of log data points.
This function iterates through each depth point, performing an optimization to determine the volumetric fractions of minerals and fluids that best match the measured log responses.
- Parameters:
gr (np.ndarray) – Gamma Ray log [GAPI].
nphi (np.ndarray) – Neutron Porosity log [v/v].
rhob (np.ndarray) – Bulk Density log [g/cc].
pef (np.ndarray, optional) – Photoelectric Factor log [barns/electron]. Defaults to None.
dtc (np.ndarray, optional) – Compressional slowness log [us/ft]. Defaults to None.
auto_scale (bool, optional) – If True, automatically calculates scaling factors. Defaults to True.
- Returns:
- A DataFrame containing the estimated mineral and fluid volumes,
constructed porosity, error metrics, and reconstructed logs for each depth point.
- Return type:
pd.DataFrame
- MultiMineral.estimate_lithology(gr: ndarray, nphi: ndarray, rhob: ndarray, pef: ndarray | None = None, dtc: ndarray | None = None, auto_scale: bool = True) DataFrame[source]
Estimate mineral and fluid volumes for a set of log data points.
This function iterates through each depth point, performing an optimization to determine the volumetric fractions of minerals and fluids that best match the measured log responses.
- Parameters:
gr (np.ndarray) – Gamma Ray log [GAPI].
nphi (np.ndarray) – Neutron Porosity log [v/v].
rhob (np.ndarray) – Bulk Density log [g/cc].
pef (np.ndarray, optional) – Photoelectric Factor log [barns/electron]. Defaults to None.
dtc (np.ndarray, optional) – Compressional slowness log [us/ft]. Defaults to None.
auto_scale (bool, optional) – If True, automatically calculates scaling factors. Defaults to True.
- Returns:
- A DataFrame containing the estimated mineral and fluid volumes,
constructed porosity, error metrics, and reconstructed logs for each depth point.
- Return type:
pd.DataFrame
General Lithology functions
- quick_pp.lithology.shale_volume_larinov_tertiary(igr)[source]
Computes shale volume from gamma ray using Larinov’s method for tertiary rocks.
- quick_pp.lithology.shale_volume_larinov_older(igr)[source]
Computes shale volume from gamma ray using Larinov’s method for older rocks.