import petrophys as pp

The top-level petrophys package holds the functions that do a whole job in one call, the sample data, the well and the interpretation settings. Everything else is imported from its package. Each name links to its full documentation.

Read, interpret, plot

pp.read

Read a LAS, DLIS, CSV or TSV well and optionally attach formations and lithology

pp.interpret

Run the full interpretation; returns a DynamicWorkflowResult

pp.plot

Multi-track log plot of a well, a result or a well file

pp.DynamicWorkflowConfig

All interpretation settings; see Interpretation settings

More plots

pp.crossplot

Any two curves, with the chart their pair calls for: density-neutron ("NPHI", "RHOB"), density-PEF, M-N, MID, Pickett (porosity and deep resistivity; chart="hingle" for Hingle), Buckles (porosity and Sw), flow units ("PHI_Z", "RQI") and core poro-perm

pp.nd_plot, pp.pef_plot, pp.mn_plot, pp.mid_plot, pp.pickett_plot, pp.hingle_plot, pp.buckles_plot, pp.flow_unit_plot, pp.poro_perm_plot, pp.saturation_height_plot

The same charts by name, each with its usual curves as defaults: pp.pickett_plot(result) is pp.crossplot(result, "PHIE", "RDEP")

pp.nmr_panel, pp.fmi_panel, pp.xrf_panel, pp.triple_combo

Specialist panels and the classic quick-look

pp.calibration_plot, pp.core_on_logs

Core against log, and core points on log tracks

pp.pressure_plot, pp.contact_plot, pp.pretest_plot

Formation pressures, fluid contacts and pretests

pp.zone_flags_plot

Net rock, reservoir and pay flags against depth

pp.bar_chart, pp.line_chart, pp.histograms, pp.heatmap, pp.tornado_plot, pp.multiwell_overlay

Charts for comparisons and sensitivity studies

Inputs

pp.sample, pp.list_samples

Paths of the bundled sample wells and input templates

pp.read_formations

Formation tops or intervals from CSV, Excel or a DataFrame

pp.Well

A well: curves on a shared depth index, header and parameters

Context for LLMs and other tools

pp.export_context

Compact JSON-ready summary of a well or result, returned as a dict or written to a file, or a multi-well context package written to disk

Curve imputation

Requires the ml extra.

pp.impute

Reconstruct a curve’s missing samples with a model trained on the well and any wells you pass; adds <CURVE>_IMPUTED. Takes a well or an interpretation result and returns what it was given

From their packages

from petrophys.workflow import DynamicWorkflowResult

Interpreted well, trace, warnings, summaries and exports

from petrophys.workflow import run_dynamic_workflow()

Like pp.interpret but adds curves to the well it is given

from petrophys.workflow import Workflow

Your own reusable sequence of steps: check it against a well, run it on one well or many, save it and share it; see Custom workflows

from petrophys.workflow import workflow_step()

Turn your own function into a workflow step

petrophys.workflow.steps

Built-in steps: clay volume, porosity, Rw, saturation, permeability, net pay, spectral gamma, the whole of pp.interpret and more

from petrophys.io import read_lithology_intervals()

Per-depth lithology intervals

from petrophys.io import read_lithology_codes()

Lithology codebooks (canonical or Kingdom layout)

from petrophys.reporting import ContextSizeError

Raised when a context would exceed its size limit

from petrophys.reporting import list_context_profiles(), describe_context_profile()

The dataset context profiles; see Reproducing the benchmark packages

from petrophys.model import Curve

One log curve with mnemonic, unit and values

from petrophys.model import DataType

Curve categories

from petrophys.exceptions import DataQualityWarning

Warning for unit, range and metadata problems found in the input

Classification and diagnostics

Each property is graded into classes by one canonical table. CLASS_TABLES, in petrophys.model, holds the tables of clay volume, porosity, permeability, water saturation, BVW, RQI, FZI, MHI, Rxo/Rt and reservoir quality, each with the unit of its values, the label of a sample without a value (such as NO_VCL_DATA) and the source of its edges. A one-curve table is a ClassTable built on Bands. Reservoir quality is a ReservoirQualityTable, whose grades (ReservoirGrade) test effective porosity, permeability and clay volume with limits per lithology family. TwoCurveClassTable and TwoCurveBands grade from two curves; no canonical table uses them.

from petrophys.model import VclClassification, PorosityClassification, HcSaturationClassification, PermeabilityClassification, RQIClassification, MhiClassification, InvasionClassification

Class enumerations. Each classifies through its canonical table, as the analyzers do by default; a value that is not finite gets None

from petrophys.evaluation.diagnostics import HydrocarbonAnalysis, LithologyAnalysis, PorosityAnalysis, PermeabilityAnalysis, SaturationAnalysis

Category analyses of an interpreted well. class_tables="current" (default) classifies with the canonical tables; "geolink" keeps the tables and texts of the GeoLink eval package. All but the saturation analysis grade reservoir quality with the limits of lithology_family ("clastic", "carbonate" or a lithology, for every sample or one per sample); without it, every sample is graded as clastic rock

from petrophys.evaluation.diagnostics import NumericalStatisticalAnalysis

Numerical and statistical data-quality analysis

from petrophys.preprocessing.quality import WellboreQC

Bad-hole detection from caliper roughness, with DRHO as a fallback

from petrophys.workflow import run_comprehensive_analysis()

Runs all of these analyses on a well and, by default, stores the results on it; passes on class_tables and lithology_family