quick 3D interpolation with python
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dd34beadbca19b1d040152513da7ad5eb05d6178e764e660524a09cba15aad0
|
|
| MD5 |
2fae274ef0d8b26d3d7c5eb94d00af01
|
|
| BLAKE2b-256 |
11d5c185c85fe9fb703d13832a7bacb985b00356ee96be2e78f5762ab110ea0b
|
File details
Details for the file py3dinterpolations-1.0.0-py3-none-any.whl.
File metadata
- Download URL: py3dinterpolations-1.0.0-py3-none-any.whl
- Upload date:
- Size: 24.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e6227a953b93febc97692bdca93ffb453d3e639abb6caaf9a24cd9f9509b6dd
|
|
| MD5 |
8d763786a1030a52341ebda1ea88b800
|
|
| BLAKE2b-256 |
3b481e16ef0ceae7f07f80c11c99267f2859e144dc713ce045075921fdf24c85
|