What Petrophys can do

You have interpreted a first well and read your own files. The guide continues from there, from interpretation and review to LLM agents; this page maps each part of the library to the page that covers it, then shows what the results look like.

At a glance

Area

What you get

Start with

Covered in

Prepare the data

LAS, DLIS, CSV and Excel reading; standard names and units; range QC; bad-hole flags; normalization; ML gap filling

pp.read, pp.impute

Your own data, Data and depth, Implausible inputs and bad hole, Gap filling with machine learning

Interpret the rock

Temperature, clay volume, porosity, lithology and minerals, Rw, eight Sw models, permeability, rock physics

pp.interpret

Workflows

Review the answer

Warnings, the step-by-step trace, the cutoffs used, net pay per formation

result.print_trace(), result.formation_summary()

Review an interpretation

Your own recipe

Built-in and custom steps, checked before they run, saved as JSON and run on many wells

Workflow, @workflow_step

Custom workflows

Plots and delivery

Log viewer templates, crossplots, multi-well charts; LAS, JSON, CSV and Excel exports

pp.plot

Visualization and reporting

Core and specialist data

Core calibration, NMR, spectral gamma, saturation-height, borehole images, formation pressures

core_data, NMRData

Specialist data

Further analyses

Rock-quality and matrix indicators, shale distribution, heterogeneity, zonation, Monte Carlo, invasion, pore pressure

zone_well, monte_carlo

Analysis tools

Many wells

Batch and zoned runs over a folder of wells

pp.interpret(folder), BatchProcessor

Zoned and batch runs, Custom workflows

LLMs

Bounded JSON context files of interpreted wells; an MCP server that lets a model run Petrophys

pp.export_context, petrophys-mcp

Context export, LLM agents (MCP)

The complete tour runs every part of the library on real wells in one notebook.

What the results look like

Every figure below was computed from the bundled sample wells when these docs were built, by the call under it; the code is at the end of the page. Depth logs show one representative interval, so the curves can be read.

Prepare the data

Reading and QC
_images/f8a9529849bd1e5e0a0c9187f4867ff37488face2dbfa43e59d55640e878126d.png

Bad hole (shaded) from caliper against bit size and the density correction: gauge hole above 3060 m on 30/6-5, washed out below.

pp.plot(pp.interpret(well), curves=["GR", "CALI", "BS"])

ML gap filling
_images/dfc49793e73553c6faaef6807e63a69da41d67b7b2b68ad521abd1f636b6929c.png

The density of COSTA well HW-24 (red) against its prediction from the other logs (black), by a model trained on this well and the 16 other wells. Each measured depth is predicted by a model that did not learn from that fifth of the well: mean absolute error 0.035 g/cm3, R² 0.89 over 433 samples.

pp.impute(well, "RHOB", train_wells=[...]) · pp.plot(well, curves=["RHOB", "RHOB_PREDICTED"])

Interpret the rock

Clay, porosity and lithology
_images/27db04aa2e24b70f66426608bdaa0ae15c92286648e3169cca31ccc6e516ff70.png

Neutron-density crossplot of the 30/6-5 Brent Group, with the matrix lines.

pp.crossplot(well, "NPHI", "RHOB")

Mineral volumes
_images/8fd85bd9aa40469204be811a037c8a1c7eb12972a412dde06fea6e1e7b785764.png

The mineral solver splits the 15/9-14 chalk into porosity and mineral volumes, mostly calcite.

pp.plot(pp.interpret(well), template="minerals")

Rw and the Pickett plot
_images/7d74b18f0a2e2490533500cb18256fbd0b08ec3c3c13a7a578c47633ddbff7f0.png

Check Rw and the Archie exponents against the 30/6-5 Statfjord water leg.

pp.crossplot(result, "PHIE", "RDEP")

Water-saturation models
_images/6d2247b9bff76df9ff45a12c2133be4753c66f62ba574dc14ca52d4e3199fa42.png

Brent Group net pay under four saturation models, one setting apart.

pp.interpret(well, sw_model="simandoux")

Evaluate the reservoir

Permeability from core
_images/8abc87f1555aedf50d67dace6ef0594c1c4917bef87f387822b272b01fbe2875.png

A poro-perm transform fitted to the 30/6-5 core plugs: permeability on a log scale against porosity, coloured by depth.

pp.crossplot(core, "PHIC", "KH_CORE")

Rock quality and flow units
_images/128f30098d149f8b648d5aef51be6a5efa094f089cef5dd7172e4ff19850d051.png

The 30/6-5 core plugs grouped into hydraulic flow units by FZI.

pp.crossplot(core_data(well), "PHI_Z", "RQI")

Many wells
_images/d330023afd109ad92c92050fbeb1fa5e35ccdbca05cbd9170fe28430602f9e37.png

Seventeen COSTA carbonate wells interpreted in one call, ranked by Kharaib-2 net pay.

pp.interpret(wells) · results.summary()

Core and specialist data

Core calibration
_images/695ea8e5690d1e291258386a9e0ef1eedc81536b0240df34cf0eb7fd54fb3143.png

The bias and scatter of 30/6-5 density porosity against core.

calibration_plot(calibrate_porosity(well, core, log_curve="PHID"))

NMR
_images/bfccf6fc3d5fecbf8e24189144873d0d41b32ba6372f4f843a14737ab5776a91.png

Timur-Coates permeability from the Daydream CMR, checked against the vendor’s.

NMRData.from_las(path) · nmr.permeability_coates()

Spectral gamma
_images/29026a66947d536b105b54918d321e98592bd9826ac03aadebd73972f83e81a3.png

Thorium and uranium on 25/5-1, with the uranium-dominated samples flagged.

interpret_spectral_gamma(well) · pp.crossplot(well, "URANIUM", "THORIUM")

Saturation-height
_images/f24732e402cdc5ade04719ac70d5dc268135db9f32250010e3c2678df56ebbb7.png

A J-function fitted to the log Sw of HW-3 above an assumed free-water level (7991 ft, 1 ft below the deepest sample that has Sw) predicts Sw from height and rock quality; the fit is loose (R² 0.28).

fit_j_function_from_well(well, fwl_depth=7991).plot()

Borehole images (FMI) are oriented, equalized and displayed from DLIS or LAS arrays; they need petrophys[dlis] and a 112 MB file, so they are shown in Tutorial 16 and not built here.

What Petrophys does not do

  • No automatic depth matching between runs, or tool-depth correction.

  • DLIS: processed channels, not every raw acquisition product.

  • Borehole images: preparation and display, not dip or fracture picking.

  • NMR: delivered distributions or curves, not raw echo trains.

  • Empirical models still need local calibration and expert review.

Next

Workflows: interpret a well with pp.interpret, read its trace and review the answer.