In [1]:
#general imports
import pygslib
In [2]:
import numpy as np
x= np.array([0, 0.5, 1, 2, 3, 4, 5, 6, 7, 8, 9])
y= np.array([0, 0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0])
z= np.array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
v= np.array([0, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9])
bhid = np.array ([1,1,1,1,1,1,1,1,1,1,1])
In [3]:
bhid.shape, v.shape,x.shape, y.shape, z.shape
Out[3]:
In [4]:
# these are the parameters we need. Note that at difference of GSLIB this dictionary also stores
# the actual data (ex, X, Y, etc.).
#important! python is case sensitive 'bhid' is not equal to 'BHID'
parameters = {
'x' : x, # mydata['Xlocation'].values,
'y' : y, # mydata['Ylocation'].values,
'z' : z, # mydata['Zlocation'].values,
'bhid' : bhid, # mydata['bhid'].values,
'vr' : v, # mydata['Primary'].values,
'tmin' : -1.0e21,
'tmax' : 1.0e21,
'nlag' : 11,
'xlag' : 1,
'ndir' : 2,
'ndip' : 1,
'orgdir': 0.,
'orgdip': 0.,
'isill' : 1,
'sills' : v.var(),
'ivtail' : [1],
'ivhead' : [1],
'ivtype' : [1]
}
In [5]:
#Now we are ready to calculate the veriogram
np, dis, gam, hm, tm, hv, tv = pygslib.gslib.gamv3D(parameters)
In [6]:
np
Out[6]:
In [7]:
dis
Out[7]:
In [ ]:
In [ ]: