Skip to main content

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 from our pypi (official release)

You can install the official release of minigst package using pip:

cd python
pip install minigst

Installing minigst from sources

After cloning the github repo, you can install the minigst package from source using pip:

git clone https://github.com/gstlearn/minigst
cd minigst
cd python
pip install .

Or for development:

git clone https://github.com/gstlearn/minigst
cd minigst
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

minigst-0.1.4-py3-none-any.whl (146.5 kB view details)

Uploaded Python 3

File details

Details for the file minigst-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: minigst-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 146.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for minigst-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eba42a199e8eb1011a5d0055d0b2826e1944b0b86ef757a5f17681e4d6b541c5
MD5 30f79ba6ec697d60aeebecea2c3c3ac2
BLAKE2b-256 cd2458ac08d5abc6c55ff66eee56c5fb89b131b87bd998cc5bfb45ea7c1a9c9a

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