In [1]:
import gam
import pygslib
In [2]:
parameters = {
'datafl' : '../pygslib/data/true.dat', # path to file, or none (to use '_xxx_.in') or numpy array (with columns [x,y])
'ivar' : [1,2], # variables column numbers to be used in ivtail and ivhead, # variables column numbers to be used in ivtail and ivhead,
'tmin' : -1.0e21, # trimming limits min and max (raws out of this range will be ignored)
'tmax' : 1.0e21,
'outfl' : None, # path to the output file or None (to use '_xxx_.out')
'igrid' : 1, # grid realization number
'nx' : 50, # number of rows, cols and levels
'ny' : 50,
'nz' : 1,
'xmn' : .5, # coordinates of the centroid of first/corner block
'ymn' : .5,
'zmn' : .5,
'xsiz' : 1., # grid node separation
'ysiz' : 1.,
'zsiz' : 1.,
'nlag' : 10, # number of lags
'igdir' : [[1,0,0],
[0,1,0]], # [[ixd1,iyd1,izd1],...] directions along the grid (unit offsets) (array with shape [ndir,3])
'standardize': 1, # standardize sill? (0=no, 1=yes)
'ivpar': [[1, 1, 4, None],
[1, 1, 3, None],
[2, 2, 1, None],
[2, 2, 3, None],
[1, 1, 9, 2.5]]} # tail, head, variogram type, and cut (with shape [nvarg,4])
In [3]:
vg, fig, ax = gam.gam(parameters)
In [4]:
vg
Out[4]:
In [5]:
data = pygslib.gslib.read_gslib_file('../pygslib/data/true.dat')
data.columns
Out[5]:
In [6]:
parameters = {
'datafl' : data[['Primary',
'Secondary']].values, # path to file, or none (to use '_xxx_.in') or numpy array (with columns [x,y])
'tmin' : -1.0e21, # trimming limits min and max (raws out of this range will be ignored)
'tmax' : 1.0e21,
'outfl' : None, # path to the output file or None (to use '_xxx_.out')
'igrid' : 1, # grid realization number
'nx' : 50, # number of rows, cols and levels
'ny' : 50,
'nz' : 1,
'xmn' : .5, # coordinates of the centroid of first/corner block
'ymn' : .5,
'zmn' : .5,
'xsiz' : 1., # grid node separation
'ysiz' : 1.,
'zsiz' : 1.,
'nlag' : 10, # number of lags
'igdir' : [[1,0,0],
[0,1,0]], # [[ixd1,iyd1,izd1],...] directions along the grid (unit offsets) (array with shape [ndir,3])
'standardize': 1, # standardize sill? (0=no, 1=yes)
'ivpar': [[1, 1, 1, None],
[1, 1, 3, None],
[2, 2, 1, None],
[2, 2, 3, None],
[1, 1, 9, 2.5]]} # tail, head, variogram type, and cut (with shape [nvarg,4])
In [7]:
vg = gam.gam(parameters)
In [8]:
import numpy as np
any(np.array([1,2,3,4,5])==40)
Out[8]:
In [ ]: