Skip to content

petekIO (Python)

The data layer: load a project once into a GeoData, read interpreted results.

import petekio

At a glance

Group Names
Project GeoData, BBox, Interval, Stats
Surfaces Surface, PointSet, PolygonSet, GridGeometry
Wells Well, WellsView, Sidetrack, Trajectory, LogSession, LogView
Net conditioning NetSettings
Ingest / view IngestSpec, ViewSpec, ViewSettings
Helpers canonical_mnemonic, build_well_log_bundle, encode_lane

See the petekIO guide, the data-ingest tutorial, and the ingest notebook.

API

ImportSettings dataclass

ImportSettings(
    crs=None, aliases=None, unit="m", options=dict()
)

aliases class-attribute instance-attribute

aliases = None

crs class-attribute instance-attribute

crs = None

options class-attribute instance-attribute

options = field(default_factory=dict)

unit class-attribute instance-attribute

unit = 'm'

to_mapping

to_mapping()

LogChannel

LogChannel(logs, *, requested, mnemonic, filter=None)

Bases: _LogArithmeticMixin

as_dict class-attribute instance-attribute

as_dict = to_dict

filter instance-attribute

filter = filter

mnemonic instance-attribute

mnemonic = mnemonic

name property

name

requested instance-attribute

requested = requested

is_finite

is_finite()

is_null

is_null()

not_null

not_null()

to_basis

to_basis(basis, *, interpolation='linear')

to_dict

to_dict()

where

where(predicate)

LogPredicate

LogPredicate(op, operands)

as_dict class-attribute instance-attribute

as_dict = to_dict

op instance-attribute

op = op

operands instance-attribute

operands = operands

to_dict

to_dict()

LogSession

LogSession(payload)

payload instance-attribute

payload = payload

bundle

bundle()

save

save(path, **kwargs)

serve

serve(**kwargs)

Logs

Logs(project)

as_dict class-attribute instance-attribute

as_dict = to_dict

aliases

aliases()

channel

channel(name)

names

names()

resolve

resolve(name)

to_dict

to_dict()

validate

validate(expr)

Project

Project(
    geo,
    *,
    source=None,
    aliases=None,
    crs=None,
    settings=None,
    inventory=None,
    tops_tables=None
)

aliases instance-attribute

aliases = dict(aliases or {})

crs instance-attribute

crs = crs

geo property

geo

geodata property

geodata

logs property

logs

points property

points

polygons property

polygons

settings instance-attribute

settings = dict(settings or {})

source instance-attribute

source = None if source is None else str(source)

structures property

structures

surfaces property

surfaces

tops property

tops

wells property

wells

delete

delete(kind, name)

delete_points

delete_points(name)

delete_polygons

delete_polygons(name)

delete_surface

delete_surface(name)

delete_tops

delete_tops(name)

delete_well

delete_well(name)

import_data classmethod

import_data(path, aliases=None, crs=None, settings=None)

inventory

inventory()

load classmethod

load(path)

point_set

point_set(name)

polygon_set

polygon_set(name)

rename

rename(kind, old, new)

rename_points

rename_points(old, new)

rename_polygons

rename_polygons(old, new)

rename_surface

rename_surface(old, new)

rename_tops

rename_tops(old, new)

rename_well

rename_well(old, new)

resolve_log_expression

resolve_log_expression(source)

resolve_log_source

resolve_log_source(source)

resolve_well_logs

resolve_well_logs(source)

save

save(path)

surface

surface(name)

well

well(well_id)

ViewSettings

ViewSettings(serve=True, save=None)

save instance-attribute

save = save

serve instance-attribute

serve = bool(serve)

from_dict classmethod

from_dict(d)

replace

replace(**changes)

to_dict

to_dict()

ViewSpec

ViewSpec(
    curves=None,
    tops=None,
    flatten_default=None,
    flags=None,
    cutoff=DEFAULT_PHIE_CUTOFF,
)

curves instance-attribute

curves = list(curves) if curves is not None else None

cutoff instance-attribute

cutoff = cutoff

flags instance-attribute

flags = list(flags) if flags is not None else None

flatten_default instance-attribute

flatten_default = flatten_default

tops instance-attribute

tops = (
    list(tops) if isinstance(tops, (list, tuple)) else tops
)

from_dict classmethod

from_dict(d)

replace

replace(**changes)

to_dict

to_dict()

build_well_log_bundle

build_well_log_bundle(
    raws,
    *,
    spec=None,
    tops=None,
    flatten_default=None,
    phie_cutoff=0.08,
    flags=None
)

canonical_mnemonic builtin

canonical_mnemonic(raw)

detect builtin

detect(path)

encode_lane

encode_lane(values)