In [4]:
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 [7]:
GeoMig.Interpolator??

In [ ]:
testmodel = GeoMig.Interpolator(0,140,
                                0,10,
                                0,100,
                               u_grade=0)

# set grid resolution
testmodel.set_resolutions(140,1,100)
testmodel.create_regular_grid_3D()

# compile
testmodel.theano_compilation_3D()
load data

In [79]:
testmodel.load_data_csv("foliations", os.pardir+"/input_data/foliations.csv")
testmodel.load_data_csv("interfaces", os.pardir+"/input_data/interfaces_.csv")

In [80]:
testmodel.formations


Out[80]:
array(['Layer2', 'Layer3', 'Layer5', 'Layer1', 'Layer4'], dtype=object)

In [81]:
testmodel.set_series({"Initial": (testmodel.formations[0],
                                  testmodel.formations[1],
                                  testmodel.formations[3],
                                  testmodel.formations[4]),
                      "Unconformity": testmodel.formations[2]
                     })

In [82]:
testmodel.series


Out[82]:
Unconformity Initial
0 Layer5 Layer2
1 Layer5 Layer3
2 Layer5 Layer1
3 Layer5 Layer4

In [83]:
testmodel


Out[83]:
<GeoMig.Interpolator instance at 0x0000000010CAE6C8>

In [98]:
testmodel.compute_potential_field("Initial", verbose = 1)
testmodel.plot_potential_field_2D(direction = "y", cell_pos = 0, figsize=(7,6), contour_lines = 20)


The serie formations are Layer2|Layer3|Layer1|Layer4

In [91]:
testmodel.potential_interfaces


Out[91]:
array([-0.028655, -0.028655, -0.028655, -0.028655, -0.028655, -0.028655, -0.028655, -0.028655, -0.028655, -0.028655, -0.028655,
       -0.028655, -0.028655])

In [92]:
testmodel.compute_potential_field("Unconformity", verbose = 1)
testmodel.plot_potential_field_2D(direction = "y", cell_pos = 0, figsize=(7,6), contour_lines = 20)


The serie formations are Layer5

In [ ]:


In [99]:
testmodel.compute_block_model??

Sandstone Example


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()


C:\Users\lebobcrash\Anaconda2\lib\site-packages\ipykernel\__main__.py:11: DeprecationWarning: stack(*tensors) interface is deprecated, use stack(tensors, axis=0) instead.

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]:
EarlyGranite_Series SimpleMafic_Series BIF_Series
0 EarlyGranite SimpleMafic1 SimpleMafic2
1 EarlyGranite SimpleMafic1 SimpleBIF

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)


The serie formations are EarlyGranite

In [ ]: