Skip to main content

Subsurface data ingestion + structure layer: surfaces, wells, points, polygons — loading, interpolation, statistics.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

petekio-0.3.14.tar.gz (373.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

petekio-0.3.14-cp310-abi3-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.10+Windows x86-64

petekio-0.3.14-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

petekio-0.3.14-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.9 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

petekio-0.3.14-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (5.3 MB view details)

Uploaded CPython 3.10+macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

File details

Details for the file petekio-0.3.14.tar.gz.

File metadata

  • Download URL: petekio-0.3.14.tar.gz
  • Upload date:
  • Size: 373.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for petekio-0.3.14.tar.gz
Algorithm Hash digest
SHA256 85d4a00e2cde0ce83df517a14a7147556e4a39649365ec44b3582a7944755a9d
MD5 318ce4f6c4d0e1ab2ee6f8f6435a9198
BLAKE2b-256 22883049c94e42d16ab5dd7e7fa135ff57feaa9ba2447a352008a17f7707b9f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for petekio-0.3.14.tar.gz:

Publisher: release.yml on kkollsga/petekio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file petekio-0.3.14-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: petekio-0.3.14-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for petekio-0.3.14-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bafcc5d5e3822dc745212281464c3d96b2a999e234c78389e51672e765a3a4c1
MD5 98a87e9336d32673053a2fcfec9f9e02
BLAKE2b-256 2e525269c00e9f8539fbd54e780b112748e895ffc70eb10b225892deac8b8a4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for petekio-0.3.14-cp310-abi3-win_amd64.whl:

Publisher: release.yml on kkollsga/petekio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file petekio-0.3.14-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for petekio-0.3.14-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5c83dd348f465280c7c551fa3093c2295ad86916d33f0dca8c132bc83ae563c3
MD5 7b9f699c278ffeb7b8dc5ac9ef93bdbc
BLAKE2b-256 0cb1e4a8d2508d3e3cb5b426cea789696f91d774abae7cc64477500577378d6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for petekio-0.3.14-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on kkollsga/petekio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file petekio-0.3.14-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for petekio-0.3.14-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ca5aab08aa08e018c28092b5b4b5f275f1d26ed99b1dc056e6ce21eec76593b6
MD5 ebfc74e7a8cf77e7c3984a79e3f40281
BLAKE2b-256 72f7d6ca26879226da764c1d6c6466bba5b844a9839799b6a0131a2267fe478c

See more details on using hashes here.

Provenance

The following attestation bundles were made for petekio-0.3.14-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on kkollsga/petekio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file petekio-0.3.14-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for petekio-0.3.14-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 7b3af211f0aa18f89ca3e5e3df4ae229e5d9ba1b3607569bec7420a3424f66b5
MD5 6dfd0688a9aefa451cd3283ceb732977
BLAKE2b-256 6c82c2bda6957b470b02b82c2caf78e6f202a7122693e88851bfa0105c48fc0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for petekio-0.3.14-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:

Publisher: release.yml on kkollsga/petekio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page