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.

Multi-track Petrophys interpretation of the Brent Group in well 30/6-5

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.

1. A first well

Install, then read, plot, interpret and export a bundled North Sea well in a few lines.

Quickstart
2. Your own data

Read LAS, CSV and Excel logs, attach formation tops and lithology intervals, and check that their depths agree.

Your own data
3. Interpret and review

Clay volume, lithology and minerals, porosity, Rw, saturation, permeability and net pay, with every decision traced and checked.

Workflows
4. Your own recipe

Fix the methods and parameters, add your own steps, save the recipe and run it on a folder of wells.

Custom workflows
5. Plots and reports

Adaptive log panels, crossplots and multiwell charts; LAS, CSV, Excel, JSON and delivery packages.

Visualization and reporting
6. Specialist data and analyses

NMR, spectral gamma, core, saturation height and borehole images, then gap filling, heterogeneity, zonation and uncertainty.

Specialist data
7. Context for LLMs

Compact JSON summaries of interpreted wells, by formation and lithology group, sized for a language model.

Context export
8. LLM agents

An MCP server that lets a model load, interpret, summarize and plot wells on your machine.

LLM agents (MCP)

What Petrophys can do maps every part of the library to its page, and the tutorials go deeper.

How data moves through Petrophys

01 / Inputs Read LAS, DLIS, CSV, ASCII, core, tops and specialist channels
02 / Preparation Standardize Aliases, units, nulls, ranges, wellbore quality and provenance
03 / Science Interpret VCL, lithology, porosity, electrical properties, Sw and perm
04 / Decisions Evaluate Rock quality, flow units, flags, intervals and volumetrics
05 / Delivery Explain Computed curves, traces, plots, summaries and export packages

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.

Execution record Method, inputs, outputs, parameters and decisions
Executed Porosity RHOB and NPHI available
Skipped NMR No compatible NMR channels
Review Water saturation Inspect assumptions and quality flags

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.

MBZUAI Inception AI

Developed by MBZUAI in collaboration with Inception AI.