In [1]:
import gamv
import pygslib
In [2]:
parameters = {
'datafl' : '../pygslib/data/cluster.dat', # path to file, or none (to use '_xxx_.in') or numpy array (with columns [x,y])
'icolx' : 1, # columns for X, Y, Z coordinates
'icoly' : 2,
'icolz' : 0,
'ivar' : [3,4], # 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')
'nlag' : 10, # number of lags
'xlag' : 5.0, # lag separation distance
'xltol' : 3.0, # lag tolerance
'ivdir' : [[0.0,90.0,50.0,0.0,90.0,50.0],
[0.0,22.5,25.0,0.0,22.5,25.0],
[90.,22.5,25.0,0.0,22.5,25.0]], # azm,atol,bandh,dip,dtol,bandv (array with shape [ndir,6])
'standardize': 0, # standardize sill? (0=no, 1=yes)
'ivpar': [[1, 1, 1, None],
[1, 2, 2, None],
[2, 2, 1, None]]} # tail, head, variogram type, and cut (with shape [nvarg,4])
In [3]:
vg, fig, ax = gamv.gamv(parameters)
In [4]:
vg
Out[4]:
In [6]:
data = pygslib.gslib.read_gslib_file('../pygslib/data/cluster.dat')
data['Zlocation'] = 0
data.columns
Out[6]:
In [7]:
parameters = {
'datafl' : data[['Xlocation',
'Ylocation',
'Zlocation',
'Primary',
'Secondary']].values, # path to file, or none (to use '_xxx_.in') or numpy array (with columns [x,y])
'icolx' : 1, # columns for X, Y, Z coordinates
'icoly' : 2,
'icolz' : 0,
'ivar' : [3,4], # 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')
'nlag' : 10, # number of lags
'xlag' : 5.0, # lag separation distance
'xltol' : 3.0, # lag tolerance
'ivdir' : [[0.0,90.0,50.0,0.0,90.0,50.0],
[0.0,22.5,25.0,0.0,22.5,25.0],
[90.,22.5,25.0,0.0,22.5,25.0]], # azm,atol,bandh,dip,dtol,bandv (array with shape [ndir,6])
'standardize': 0, # standardize sill? (0=no, 1=yes)
'ivpar': [[1, 1, 1, None],
[1, 2, 2, None],
[2, 2, 1, None]]} # tail, head, variogram type, and cut (with shape [nvarg,4])
In [8]:
vg = gamv.gamv(parameters)