Wrapper package for gstlearn - Python version
Project description
minigst (Python)
The companion Python package for gstlearn.
This Python package wraps gstlearn functions to offer access to some basic geostatistical methods (mainly variography and kriging).
Installation
Prerequisites
You need Python 3.8 or higher. You will also need to install the gstlearn Python package. Please refer to the gstlearn documentation for installation instructions.
Installing minigst
You can install the minigst package using pip:
cd python
pip install .
Or for development:
cd python
pip install -e .
Usage
import minigst as mg
import gstlearn as gl
import pandas as pd
# Load data from a pandas DataFrame
df = pd.read_csv("data.csv")
db = mg.df_to_db(df, coord_names=["x", "y"])
# Compute experimental variogram
vario_exp = mg.vario_exp(db, vname="variable", nlag=20, dlag=10.0)
# Fit a model
model = mg.model_fit(vario_exp, struct=["NUGGET", "SPHERICAL"])
# Perform kriging
target_db = mg.create_db_grid(nx=[100, 100], dx=[1.0, 1.0])
mg.minikriging(db, target_db, vname="variable", model=model)
# Plot results
mg.dbplot_grid(target_db, color="K.variable.estim")
Features
The minigst Python package provides wrapper functions for:
- Database operations: Convert pandas DataFrames to gstlearn Db objects, create grids, manipulate variables
- Plotting: Visualize spatial data and grids using matplotlib
- Variography: Compute experimental variograms and fit models
- Kriging: Perform simple, ordinary, and universal kriging
- Simulation: Generate Gaussian random fields
Documentation
For more information about the underlying gstlearn library, please visit gstlearn.org.
License
This package is distributed under the BSD-3 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 Distributions
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 minigst-0.1.0-py3-none-any.whl.
File metadata
- Download URL: minigst-0.1.0-py3-none-any.whl
- Upload date:
- Size: 144.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
788bafccaac4b702bf83d55041f729e824c571f402de66fe24d55a08d8126cf9
|
|
| MD5 |
8713802ae1683c407a4120bdca34440e
|
|
| BLAKE2b-256 |
cd48d19f86dac80055a6daff13781294ca7a3a938b263101f386f37f45b1aece
|