Checking installation of gstlearn for Python¶

In [1]:
%%javascript
IPython.OutputArea.prototype._should_scroll = function(lines) {
    return false;
}
In [2]:
import gstlearn as gl
import gstlearn.plot as gp
import matplotlib.pyplot as plt
import numpy as np
import os

We create a regular 2-D grid and simulate a variable using a geostatistical Model

In [3]:
grid = gl.DbGrid.create(nx=[100,100])
model = gl.Model.createFromParam(type = gl.ECov.CUBIC, range = 30)
err = gl.simtub(None, grid, model, None, nbsimu=1, seed=13126, nbtuba = 1000)

The simulated result is plotted

In [4]:
ax = grid.plot()
No description has been provided for this image

If you obtained a nice looking image corresponding to the simulation result on the grid ... the installation of gstlearn is satisfactory.

In [5]:
grid.display()
Data Base Grid Characteristics
==============================

Data Base Summary
-----------------
File is organized as a regular grid
Space dimension              = 2
Number of Columns            = 4
Maximum Number of UIDs       = 4
Total number of samples      = 10000

Grid characteristics:
---------------------
Origin :      0.000     0.000
Mesh   :      1.000     1.000
Number :        100       100

Variables
---------
Column = 0 - Name = rank - Locator = NA
Column = 1 - Name = x1 - Locator = x1
Column = 2 - Name = x2 - Locator = x2
Column = 3 - Name = Simu - Locator = z1