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

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.2"

Python (PyO3 wheel):

pip install petekio

Quickstart (Python)

Load a project once, then read interpreted results — no parsing or interpolation in your own code:

import petekio

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)

# 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 (bilinear), arithmetic, stats, area_below volumetrics, gridding from scattered points (minimum-curvature)
Wells Positioned .wellpath trajectories (MD preserved; minimum-curvature interpolation), multi-bore (sidetracks), LAS logs with mnemonic aliasing, Petrel well-tops, per-zone stats, field-wide lithostratigraphic ordering
Points / polygons IRAP / GeoJSON / CSV load, clip, point-to-surface gridding
Project GeoData substrate — load once, broadcast across the collection; views are read-only filtered subsets

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) — 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

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

License

MIT — see LICENSE-MIT.

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.2.8.tar.gz (148.0 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.2.8-cp310-abi3-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.10+Windows x86-64

petekio-0.2.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB view details)

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

petekio-0.2.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (2.1 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

petekio-0.2.8-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.9 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.2.8.tar.gz.

File metadata

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

File hashes

Hashes for petekio-0.2.8.tar.gz
Algorithm Hash digest
SHA256 287d5f0a9c3a4c7d9b00d84346044691dc410606cec5cf25f70dea4083c829e0
MD5 41acc71962120d22b617fe817954f133
BLAKE2b-256 8a5ddff03ecebc0ca905a628315c0433cc47f5a1a190dd2e5df64c8b7e1ed41e

See more details on using hashes here.

Provenance

The following attestation bundles were made for petekio-0.2.8.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.2.8-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: petekio-0.2.8-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 1.7 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.2.8-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c52803e13825a5cd60bf26a3ca418927a815d5f49203a8310742c8518fd47de7
MD5 77d73ccf78608ec38879ab168e24c041
BLAKE2b-256 fe59c529c7577997bc574c9c63c2ec1f7aa3a362c08518612cf0e44c454583a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for petekio-0.2.8-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.2.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for petekio-0.2.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b682c443ab65ce37c4f0dd598c6adfaf7d1351af5b8a5f542b74a2dc9e88cbd7
MD5 a2ab0fe550f399da0ad94942399a54d5
BLAKE2b-256 2232c65d7e714cc03144a5fefab12c50b03c632e44cb47bf92fdede5c798c96f

See more details on using hashes here.

Provenance

The following attestation bundles were made for petekio-0.2.8-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.2.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for petekio-0.2.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 93062fd7bb0773ed422ded57c5f39b8e4d029d5f45bd76cf4758d3453b1d6f19
MD5 e5091374b3f02abc62999cb18331aa36
BLAKE2b-256 6a18ff08c747ea6d1805ae562d0120809adf3e274dcd0bd6c92abae3c9fa990c

See more details on using hashes here.

Provenance

The following attestation bundles were made for petekio-0.2.8-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.2.8-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for petekio-0.2.8-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 3ca8706bee5a0d0a5957665a99b021cb4e13c77f78cb972e94fc0b50847d2c40
MD5 1e3238fe33d3896a09b130b1b5231a60
BLAKE2b-256 3777ba5c48190dfcec2b73b1029caf99e6386211b84e5b3456ea3973af64b395

See more details on using hashes here.

Provenance

The following attestation bundles were made for petekio-0.2.8-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