Field transformations

The generated fields of gstools are ordinary Gaussian random fields. In application there are several transformations to describe real world problems in an appropriate manner.

GStools provides a submodule gstools.transform with a range of common transformations:

binary(fld[, divide, upper, lower, field, ...])

Binary transformation.

discrete(fld, values[, thresholds, field, ...])

Discrete transformation.

boxcox(fld[, lmbda, shift, field, store, ...])

(Inverse) Box-Cox transformation to denormalize data.

zinnharvey(fld[, conn, field, store, ...])

Zinn and Harvey transformation to connect low or high values.

normal_force_moments(fld[, field, store, ...])

Force moments of a normal distributed field.

normal_to_lognormal(fld[, field, store, ...])

Transform normal distribution to log-normal distribution.

normal_to_uniform(fld[, low, high, field, ...])

Transform normal distribution to uniform distribution on [0, 1].

normal_to_arcsin(fld[, a, b, field, store, ...])

Transform normal distribution to the bimodal arcsin distribution.

normal_to_uquad(fld[, a, b, field, store, ...])

Transform normal distribution to U-quadratic distribution.

apply_function(fld, function[, field, ...])

Apply function as field transformation.

All the transformations take a field class, that holds a generated field, as input and will manipulate this field inplace or store it with a given name.

Simply apply a transformation to a field class:

import gstools as gs
...
srf = gs.SRF(model)
srf(...)
gs.transform.normal_to_lognormal(srf)

Or use the provided wrapper:

import gstools as gs
...
srf = gs.SRF(model)
srf(...)
srf.transform("lognormal")

Examples

log-normal fields

log-normal fields

binary fields

binary fields

Discrete fields

Discrete fields

Zinn & Harvey transformation

Zinn & Harvey transformation

Bimodal fields

Bimodal fields

Combinations

Combinations

Gallery generated by Sphinx-Gallery