Code Monkey home page Code Monkey logo

gstools's Introduction

Welcome to GeoStatTools

DOI PyPI version Documentation Status

GSTools-LOGO

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. These fields are generated using the randomisation method, described by Heße et al. 2014.

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

gstools's People

Contributors

lschueler avatar muellerseb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.