Skip to main content

petekIO

The subsurface data layer — a Rust library (with optional PyO3 bindings) that turns raw subsurface files into clean, validated, interpreted data: surfaces, wells (trajectories / tops / logs), points, and polygons, with loading, mnemonic and unit normalisation, validation, petrophysical interpretation, interpolation, and statistics.

The pipeline is the point:

ingest → normalize → validate → interpret → characterise

Documentation

The canonical docs for the whole petek family live on the petekSuite site — petekIO's pages there:

Why build on it

Subsurface data is the unglamorous, error-prone groundwork under every reservoir application: vendor LAS mnemonics, mismatched units, out-of-range samples, cutoffs, gridding that has to honour its control points, uncertainty. petekIO does that work once and behind a stable API, so the application on top stays thin and stays in its own domain:

  • The whole path, not just parsing. Files in; normalized, validated, interpreted domain objects out — no re-implementing LAS aliasing, unit harmonisation, petrophysical cutoffs (net pay included), or surface gridding/resampling further up the stack.
  • Values know what they are. Results come back in canonical units, each carrying an uncertainty distribution and a provenance flag (measured / interpolated / defaulted) — so downstream code propagates uncertainty rather than re-deriving it.
  • A substrate, not a grab-bag. Load a project once into a GeoData and operations broadcast across the whole collection. Immutable, strictly layered, fluent.
  • Rust core, thin Python. Fast and embeddable, with PyO3 bindings that mirror the Rust API.

Install

Rust:

[dependencies]
petekio = "0.3"

Python (PyO3 wheel):

pip install petekio

Quickstart (Python)

Import raw source data once, then read interpreted results — no parsing or interpolation in your own code. Save/load is reserved for compact .pproj projects:

import petekio

project = petekio.Project.import_data(
    "Data",
    settings=petekio.ImportSettings(
        crs="EPSG:32631",
        aliases={"por": ["PHIE", "PORO"]},
    ),
)
project.inventory()
geo = project.geodata
project.rename_surface("Top reservoir", "structure/top dome")
project.surfaces.structure.top_dome
project.save("field.pproj")
project = petekio.Project.load("field.pproj")

# Lazy project workspace (optional: pip install petekio[toolkit]).
workspace = project.view()
# Equivalent generic provider entry point: petektools.view(project)

# Persist a petekTools correlation layout as a project-owned snapshot.
project.templates.add(template)
project.wells.view(template=project.templates.reservoir, serve=False)
project.templates.reservoir(wells=["A-1", "A-2"], save="correlation.html")

# Compute exact MD/XYZ surface crossings for every bore, then persist the
# complete result as a project horizon (outside/no-hit bores are reported).
surface = project.surfaces.structure.top_dome
result = project.wells.intersection(surface)
project.well_tops["Reservoir/Top"] = result

# Or build the same substrate manually:
geo = petekio.GeoData(unit="m")

# A surface (IRAP classic) — sample, stats, volumetrics, resample.
top = geo.load_surface("top_res", "surfaces/top_res.irap")
top.stats.mean
top.area_below(2400)
top.dip_angle()                         # world-frame dip, degrees
top.extrapolate("nearest")              # fill NaN holes; IDW/min-curvature too

# A multi-bore well: a Petrel export tree (one bore per .wellpath) + logs.
# head/kb are optional — the .wellpath header fills them.
geo.load_well("15/9-A1", files="wells/15_9-A1/")
geo.load_well_tops("WellTops.tops")        # Horizon picks → matching well + bore

w = geo.well("15/9-A1")
w.bores()                                  # e.g. ["", "A", "B", "ST2"]
bore = w.sidetrack("A")
bore.log_stats("PHIE").mean                # whole-bore curve stats

# Per-zone stats, returned in lithostratigraphic order:
bore.zone_stats("PHIE")                    # [(zone, Stats), ...]
bore.zone_stats("PHIE", "Top A").mean      # one zone directly (None if absent)
geo.strat_order                            # the field's lithostratigraphic column

# A tidy per-zone×bore table (pandas; pip install petekio[pandas]):
w.zone_table("PHIE", stats=("mean", "p50"))  # DataFrame, zone in lithostrat order

Lithostratigraphic ordering

Zones come back in true stratigraphic order, not just measured-depth order. load_well_tops reads every well in the tops file and merges their relative orderings into one field-wide column — so a marker that pinches out (zero thickness) in one well is ordered correctly by a well that develops it. Geometry is untouched; only the order zones are presented in follows the column.

Capabilities

Domain What you get
Surfaces IRAP-classic load, sample/resample, typed attribute lanes, arithmetic, smoothing, dip angle/azimuth, NaN-hole extrapolation, edge polygons, stats/volumetrics, and gridding from scattered points
Wells Positioned .wellpath trajectories (MD preserved; minimum-curvature interpolation), multi-bore logs/tops, exact regular/structured/triangulated surface intersections, persistent computed horizons, per-zone stats, and field-wide lithostratigraphic ordering
Points / polygons IRAP / GeoJSON / CSV load, geometry-only regular/structured/mesh inference, topology-preserving EarthVision promotion, clipping, and point-to-surface gridding
Project GeoData substrate — import once, canonical EarthVision surfaces, folder-aware lazy Map/3-D/Wells workspace, persistent correlation templates, compact transport, read-only filtered views, and .pproj load/save

Built in gates

petekIO grows in gated phases against a locked contract: every public signature is specified in API.md (a change needs sign-off), and the design + build roadmap live in SPEC.md.

Status: early development. The public API is locked and the core data path (ingest → normalize → validate → interpret → characterise) is in place; surfaces, multi-bore wells (trajectories / tops / logs), per-zone stats, and lithostratigraphic ordering are landed. Breadth is still filling in — more ingest formats, fluid contacts, richer interpretation.

Documentation

  • API.md — the locked public API contract (Rust, mirrored in Python).
  • SPEC.md — design constitution + architecture.
  • Guides + API reference: the docs/ site (MkDocs Material; published on Read the Docs).

Design at a glance

  • Strictly layered, one-way deps: foundation → algorithms → io → core → analysis → manager → py.
  • A manager substrate (GeoData): load once, operations broadcast across the collection — no per-item loops.
  • Domain objects carry their operations (arithmetic, filters, interpolation, stats) and expose history() for generated objects — fluent and chainable; immutable (ops return new objects).
  • Algorithms are isolated, QC-able kernels grouped by discipline (e.g. the minimum-curvature survey, the cross-well stratigraphic merge) — pure and type-light.
  • Rust core + thin PyO3; the Python API mirrors the Rust API.

Built on

  • petekTools — standalone numerics / geostatistics kernels (gridding, interpolation) that petekIO builds on.

License

Apache-2.0 — see LICENSE and NOTICE.

Metadata

Release files for petekio 0.3.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for petekio 0.3.15
File Size Uploaded Provenance
petekio-0.3.15.tar.gz 395.4 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for petekio 0.3.15
File
petekio-0.3.15-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
petekio-0.3.15-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
petekio-0.3.15-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
petekio-0.3.15-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.10 abi3 macOS 10.12+ x86-64, macOS 11.0+ ARM64, macOS 10.12+ universal2 (ARM64, x86-64) Details

Total release size: 14.5 MB

Release files / petekio-0.3.15.tar.gz

Download URL petekio-0.3.15.tar.gz
Size 395.4 kB
Tags Source
SHA-256 checksum
How to use checksums
88a2466b98a51ab06fffde7088ca5f48ca3ba7f1c6672e120d8e48539a2f8b05
BLAKE2b-256 checksum
How to use checksums
d48876afa465be752f23b3e4a572f5da12a9a6459db417f1ee55e7093346e720
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Release files / petekio-0.3.15-cp310-abi3-win_amd64.whl

Download URL petekio-0.3.15-cp310-abi3-win_amd64.whl
Size 2.5 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ff9c7bb01a8b664855b734aa3bf2357d5c51bf6833b1c74cf98b426033a3b8cc
BLAKE2b-256 checksum
How to use checksums
6f3e3cbb2c296e6bd711bafacdc1f9d745230ad17b86fbdd7d2808d2f02ecfee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Release files / petekio-0.3.15-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL petekio-0.3.15-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
7f5e1f92cf95a0972666cb7ca8b110187d3afd497d58374bb89d57293e4c3890
BLAKE2b-256 checksum
How to use checksums
2a5c7d6e0865da6dd020271fc77edf13faa771fd84dcd360a81c702627c786e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Release files / petekio-0.3.15-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL petekio-0.3.15-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.0 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
fd487335d8fb021cb7335148d794d6f8439b09d564e6014c312e92f4b92d10d7
BLAKE2b-256 checksum
How to use checksums
83b3fc4de4bd4dcf850ed1ca55821d8ae3d24e0d1042bbc5cdf6c1cab01b9848
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Release files / petekio-0.3.15-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL petekio-0.3.15-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 5.5 MB
Tags CPython 3.10 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
32a3af256641738d1de144545ca7d1f52ec8e04e2d69847d78b20de2c70b85b0
BLAKE2b-256 checksum
How to use checksums
77ba541b8f2aa9c27ee7d622765cea621db4c115b3fbd79d0cf2f785dd5d4232
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

Security for petekio 0.3.15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for petekio-0.3.15.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page