{"id":23829,"library":"gstools","title":"GSTools: A Geostatistical Toolbox","description":"GSTools is a Python library for geostatistical modeling and random field generation. It provides covariance models, variogram estimation, kriging, and conditional/unconditional random field simulation. Current version is 1.7.0, with releases approximately every 3-6 months. Requires Python >=3.8.","status":"active","version":"1.7.0","language":"python","source_language":"en","source_url":"https://github.com/GeoStat-Framework/GSTools","tags":["geostatistics","kriging","random field","spatial statistics","variogram"],"install":[{"cmd":"pip install gstools","lang":"bash","label":"PyPI"},{"cmd":"conda install -c conda-forge gstools","lang":"bash","label":"Conda"}],"dependencies":[{"reason":"Core dependency for array operations.","package":"numpy","optional":false},{"reason":"Used for interpolation and optimization.","package":"scipy","optional":false},{"reason":"For mesh handling and VTK export.","package":"meshio","optional":false},{"reason":"Required for Bayesian inference in variogram fitting.","package":"emcee","optional":true},{"reason":"Alternative kriging backend.","package":"pykrige","optional":true},{"reason":"Rust-based acceleration (optional, used if installed).","package":"gstools-core","optional":true}],"imports":[{"note":"Standard import for Gaussian covariance model.","symbol":"Gaussian","correct":"from gstools import Gaussian"}],"quickstart":{"code":"import gstools as gs\nimport numpy as np\n\n# Create a Gaussian covariance model\nmodel = gs.Gaussian(dim=2, var=1.0, len_scale=10.0)\n\n# Generate a random field\nx = np.linspace(0, 100, 50)\ny = np.linspace(0, 100, 50)\nseed = gs.random.MasterRNG(20170519)\nfield = gs.SRF(model, seed=seed)\n\n# Evaluate field on a grid\npos = (x, y)\nfield(pos)\nprint(field.field.shape)  # Should be (50, 50)","lang":"python","description":"Basic random field generation with Gaussian covariance model."},"warnings":[{"fix":"Use pip install gstools (auto-installs gstools-cython on most platforms) or install gstools-cython manually for non-standard environments.","message":"In v1.7.0, the Cython code has been outsourced to a separate package GSTools-Cython. If you had a direct dependency on compiled extensions, you may need to install gstools-cython explicitly.","severity":"breaking","affected_versions":">=1.7.0"},{"fix":"Use gs.SpatioTemporal models (e.g., gs.SpatioTemporalGaussian) instead of setting temporal=True.","message":"The 'temporal' flag in CovModel is deprecated since v1.5.0. Use the explicit spatio-temporal model classes instead.","severity":"deprecated","affected_versions":">=1.5.0"},{"fix":"Always wrap your seed in gs.random.MasterRNG(seed_value).","message":"Random field generation requires a seed object from gstools.random.MasterRNG, not a plain integer. Using an integer may cause non-reproducible results.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run pip install gstools or conda install -c conda-forge gstools.","cause":"Package not installed.","error":"ModuleNotFoundError: No module named 'gstools'"},{"fix":"Use from gstools import Gaussian.","cause":"Incorrect import path. Gaussian is a covariance model class.","error":"ImportError: cannot import name 'Gaussian' from 'gstools'"},{"fix":"Use gs.random.MasterRNG(seed_value) to wrap the seed.","cause":"Using a plain integer as seed in SRF.","error":"ValueError: The 'seed' argument must be a MasterRNG instance, not an integer."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}