Beispiel #1
0
    def theano_f(self):
        # Importing the data from csv files and settign extent and resolution
        geo_data = gempy.import_data([0, 10, 0, 10, -10, 0], [50, 50, 50],
                                     path_f="./GeoModeller/test_a/test_a_Foliations.csv",
                                     path_i="./GeoModeller/test_a/test_a_Points.csv")

       # data_interp = gempy.set_interpolator(geo_data,
       #                                      dtype="float64",
       #                                      verbose=['solve_kriging'])


        # Set all the theano shared parameters and return the symbolic variables (the input of the theano function)
        #input_data_T =   data_interp.interpolator.tg.input_parameters_list()

        # Prepare the input data (interfaces, foliations data) to call the theano function.
        # Also set a few theano shared variables with the len of formations series and so on
       # input_data_P =   data_interp.interpolator.data_prep(u_grade=[3])

        # Compile the theano function.
       # compiled_f = theano.function(input_data_T,   data_interp.interpolator.tg.whole_block_model(),
       #                              allow_input_downcast=True, profile=True)

        data_interp = gempy.InterpolatorInput(geo_data, dtype='float64')
        compiled_f = data_interp.compile_th_fn()

        return data_interp, compiled_f
gp.plot_data(geo_data, direction="z")


# In[5]:


gp.plot_data(geo_data, direction="x")


# ## 3.3 - Computing the 3D Model

# In[ ]:


interp_data = gp.InterpolatorInput(geo_data, dtype="float32")


# In[ ]:


lith_block, fault_block = gp.compute_model(interp_data)


# ## 3.4 - Model visualization
# 
# ### 3.4.1 - 2D Sections

# In[ ]:

Beispiel #3
0
import theano
import numpy as np
import matplotlib.pyplot as plt
theano.config.compute_test_value = "ignore"
# This is for sphenix to find the packages
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))

sys.path.append("../gempy")
sys.path.append("../")
# Importing GeMpy modules
import gempy as gp
import pandas as pn

geo_data = gp.read_pickle('../Prototype Notebook/sandstone.pickle')

interp_data = gp.InterpolatorInput(geo_data, compile_theano=False)

import sys
import gempy as gp
from gempy.GeoPhysics import GeoPhysicsPreprocessing

inter_data = gp.InterpolatorInput(geo_data, compile_theano=False)
gpp = GeoPhysicsPreprocessing(
    inter_data,
    580, [7.050000e+05, 747000, 6863000, 6925000, -20000, 200],
    res_grav=[70, 40],
    n_cells=100,
    mode='n_closest')
#res_grav = [125, 85],
#n_cells =1000)
print(gpp)