In [18]:
import sys, os
#sys.path.append("C:/Users/lebobcrash/Documents/GitHub/Theano/")
import theano.tensor as T
#sys.path.append("/home/bl3/PycharmProjects/GeMpy/GeMpy")
sys.path.append("C:/Users/lebobcrash/Documents/GitHub/pygeomod/pygeomod")
#sys.path.append("/home/miguel/PycharmProjects/GeMpy/GeMpy")
sys.path.append("C:/Users/lebobcrash/Documents/GitHub/GeMpy/GeMpy")
sys.path.append("/home/bl3/PycharmProjects/GeMpy/GeMpy")
sys.path.append("/home/bl3/PycharmProjects/pygeomod/pygeomod")
sys.path.append("/home/miguel/PycharmProjects/GeMpy/GeMpy")
import GeoMig
import importlib
#import geogrid
importlib.reload(GeoMig)
import importlib
#importlib.reload(GeoMig)
import numpy as np
import pandas as pn
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import matplotlib
import matplotlib.cm as cm
from skimage import measure
os.environ['CUDA_LAUNCH_BLOCKING'] = '1'
np.set_printoptions(precision = 6, linewidth= 130, suppress = True)
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
from matplotlib import cm
#%matplotlib inline
%matplotlib notebook
In [28]:
GeoMig.Interpolator??
In [67]:
testmodel = GeoMig.Interpolator(0,140,
0,10,
0,100,
u_grade=3)
# set grid resolution
testmodel.set_resolutions(140,4,100)
testmodel.create_regular_grid_3D()
# compile
testmodel.theano_compilation_3D()
In [68]:
testmodel.load_data_csv("foliations", os.pardir+"/input_data/foliations_alex2.csv")
testmodel.load_data_csv("interfaces", os.pardir+"/input_data/interfaces_alex2.csv")
testmodel.Foliations = testmodel.Foliations.drop('Unnamed: 0', 1)
testmodel.Interfaces = testmodel.Interfaces.drop('Unnamed: 0', 1)
testmodel.Foliations
Out[68]:
In [69]:
testmodel.formations
Out[69]:
In [70]:
testmodel.set_series({"Initial": (testmodel.formations[0],
testmodel.formations[1],
testmodel.formations[3],
testmodel.formations[4]),
"Unconformity": testmodel.formations[2]
})
In [71]:
testmodel.series
Out[71]:
In [72]:
testmodel
Out[72]:
In [73]:
testmodel.compute_potential_field("Initial", verbose = 2)
testmodel.plot_potential_field_2D(direction = "y", cell_pos = 0, figsize=(7,6), contour_lines = 20)
In [74]:
testmodel.compute_potential_field("Unconformity", verbose = 1)
testmodel.plot_potential_field_2D(direction = "y", cell_pos = 0, figsize=(7,6), contour_lines = 20)
In [75]:
%matplotlib qt4
# Reset the block
testmodel.block.set_value(np.zeros_like(testmodel.grid[:,0]))
# Compute the block
testmodel.compute_block_model([0,1], verbose = 1)
sandstone = testmodel
plot_block = sandstone.block.get_value().reshape(140,4,100)
plt.imshow(plot_block[:,2,:].T, origin = "bottom", aspect = "equal",
extent = (sandstone.xmin, sandstone.xmax,
sandstone.zmin, sandstone.zmax), interpolation = "none")
Out[75]:
In [125]:
# Setting the extent
sandstone = GeoMig.Interpolator(696000,747000,6863000,6950000,-20000, 2000,
range_var = np.float32(110000),
u_grade = 9) # Range used in geomodeller
# Setting resolution of the grid
sandstone.set_resolutions(40,40,150)
sandstone.create_regular_grid_3D()
# Compiling
sandstone.theano_compilation_3D()
In [126]:
sandstone.load_data_csv("foliations", "C:/Users/lebobcrash/Documents/GitHub/GeMpy/input_data/a_Foliations.csv")
sandstone.load_data_csv("interfaces", "C:/Users/lebobcrash/Documents/GitHub/GeMpy/input_data/a_Points.csv")
In [127]:
sandstone.set_series({"EarlyGranite_Series":sandstone.formations[-1],
"BIF_Series":(sandstone.formations[0], sandstone.formations[1]),
"SimpleMafic_Series":sandstone.formations[2]})
sandstone.series
Out[127]:
In [128]:
sandstone.compute_potential_field("EarlyGranite_Series", verbose = 1)
sandstone.plot_potential_field_2D(direction = "y", cell_pos = 13, figsize=(7,6), contour_lines = 20)
In [ ]: