Open-source formation evaluation
Petrophys
A modular Python library for turning well logs, core measurements, and specialist data into traceable petrophysical interpretations.
From measurements to decisions¶
Petrophys keeps the scientific calculations accessible as independent Python functions while also providing an input-aware workflow for complete wells. By default, recognized curve aliases and units are standardized and implausible values screened before interpretation; every executed, skipped, or warning-producing step is recorded in the result.
Interpretation of the bundled well 30/6-5 across the Brent Group, showing
the file’s lithology log, conventional logs, porosity, saturation,
permeability, mineral volumes, core points and reservoir flags.
well = pp.read(pp.sample("30_6-5"), formations=pp.sample("formations_30_6-5")),
result = pp.interpret(well, rw=0.070, rw_meas_temp="230 degF") and
pp.plot(result, top=2800, bottom=2980) draw it.¶
From first well to LLM agents¶
The documentation follows one path. Each step builds on the one before it.
Install, then read, plot, interpret and export a bundled North Sea well in a few lines.
Read LAS, CSV and Excel logs, attach formation tops and lithology intervals, and check that their depths agree.
Clay volume, lithology and minerals, porosity, Rw, saturation, permeability and net pay, with every decision traced and checked.
Fix the methods and parameters, add your own steps, save the recipe and run it on a folder of wells.
Adaptive log panels, crossplots and multiwell charts; LAS, CSV, Excel, JSON and delivery packages.
NMR, spectral gamma, core, saturation height and borehole images, then gap filling, heterogeneity, zonation and uncertainty.
Compact JSON summaries of interpreted wells, by formation and lithology group, sized for a language model.
An MCP server that lets a model load, interpret, summarize and plot wells on your machine.
What Petrophys can do maps every part of the library to its page, and the tutorials go deeper.
How data moves through Petrophys¶
Input-aware, not all-or-nothing¶
Incomplete log suites produce a reduced interpretation with an explicit trace. Prerequisites are evaluated before each workflow step, so the result explains what ran, what could not run, and where assumptions or data-quality warnings need review.
Start with a bundled well¶
The package includes small public datasets, so you can run a complete interpretation straight after installing:
import petrophys as pp
well = pp.read(pp.sample("30_6-5"))
result = pp.interpret(well, rw=0.07, rw_meas_temp="230 degF") # Rw 0.07 ohm.m at 230 degF
print(result.status)
print(result.summary(top=2841, bottom=2958)) # the Brent Group
pp.plot(result, top=2800, bottom=3000).save("30_6-5.png")
Continue with the installation guide and the quickstart, then follow the guide from your own data to LLM agents.