GeostatTools: A geostatistical toolbox.
Project description
Welcome to GeoStatTools
Purpose
GeoStatTools is a library providing geostatistical tools.
Installation
Requirements:
- numpy
- scipy
Installation:
pip install gstools
Documentation for GeoStatTools
You can find the documentation here.
Spatial Random Field Generation
The core of this library is the generation of spatial random fields.
Example
This is an example of how to generate a 2 dimensional spatial random field with a Gaussian covariance structure.
import numpy as np
from gstools.field import SRF
x = np.linspace(0, 10, 120)
y = np.linspace(-5, 5, 100)
cov_model = {'dim': 2, 'var': 1.6, 'len_scale': 4.5, 'model': 'gau', 'mode_no': 1000}
srf = SRF(**cov_model)
field = srf(x, y, seed=19970221, mesh_type='structured')
Estimating variograms
The spatial structure of a field can be analyzed with the variogram, which contains the same information as the covariance function.
Example
This is an example of how to estimate the variogram of a 2 dimensional unstructured field.
import numpy as np
from gstools.field import SRF
from gstools import variogram
#random samples between 0 <= x, y < 100
x = np.random.rand(1000) * 100.
y = np.random.rand(1000) * 100.
srf = SRF(dim=2, var=2, len_scale=30)
field = srf(x, y, seed=20011012)
bins = np.arange(0, 50)
gamma = variogram.estimate_unstructured(field, bins, x, y)
License
GPL © 2018
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
gstools-0.4.0.tar.gz
(1.3 MB
view details)
File details
Details for the file gstools-0.4.0.tar.gz
.
File metadata
- Download URL: gstools-0.4.0.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aad0612c5852fa274ae5fa6805d10adaa1424bed01291b14cf15e981e227c153 |
|
MD5 | b2497d0313425a0a27289475aed18be3 |
|
BLAKE2b-256 | 0df37a658e1d87893056a3322127c8bb002c2852e312abe7b57bb2eaa6f2c06d |