Skip to main content

quick 3D interpolation with python

Project description

py3dinterpolations

py3dinterpolations

Quick 3D interpolation with Python.

PyPI Python Tests Coverage Docs Ruff License: MIT


Interpolate scattered 3D spatial data onto regular grids using Ordinary Kriging or Inverse Distance Weighting (IDW). Built on top of PyKrige and scikit-learn, with built-in preprocessing, cross-validation, and interactive visualizations.

import pandas as pd
from py3dinterpolations import GridData, interpolate

# load your spatial data (columns: ID, X, Y, Z, V)
df = pd.read_csv("measurements.csv")
griddata = GridData(df)

# interpolate onto a regular 3D grid
modeler = interpolate(
    griddata=griddata,
    model_type="ordinary_kriging",
    grid_resolution=5.0,
    model_params={"variogram_model": "linear", "nlags": 6, "weight": True},
)

# access results
grid = modeler.result  # interpolated 3D grid

Features

  • Interpolation — Ordinary 3D Kriging and IDW out of the box
  • Preprocessing — downsampling, coordinate normalization, signal standardization
  • Cross-validation — parameter grid search for kriging models
  • Visualization — 2D slices with matplotlib, interactive 3D with plotly

Installation

pip install py3dinterpolations

With development dependencies:

pip install py3dinterpolations[dev]

Documentation

Full documentation with working examples is available at giocaizzi.github.io/py3dinterpolations.

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

py3dinterpolations-1.0.0.tar.gz (723.6 kB view details)

Uploaded Source

Built Distribution

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

py3dinterpolations-1.0.0-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file py3dinterpolations-1.0.0.tar.gz.

File metadata

  • Download URL: py3dinterpolations-1.0.0.tar.gz
  • Upload date:
  • Size: 723.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for py3dinterpolations-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2dd34beadbca19b1d040152513da7ad5eb05d6178e764e660524a09cba15aad0
MD5 2fae274ef0d8b26d3d7c5eb94d00af01
BLAKE2b-256 11d5c185c85fe9fb703d13832a7bacb985b00356ee96be2e78f5762ab110ea0b

See more details on using hashes here.

File details

Details for the file py3dinterpolations-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for py3dinterpolations-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e6227a953b93febc97692bdca93ffb453d3e639abb6caaf9a24cd9f9509b6dd
MD5 8d763786a1030a52341ebda1ea88b800
BLAKE2b-256 3b481e16ef0ceae7f07f80c11c99267f2859e144dc713ce045075921fdf24c85

See more details on using hashes here.

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