Exemple #1
0
    def vista_obj(self) -> vs.Vista:
        """Return a GemPy Vista instance with basic geomodel attached."""
        from gempy.plot import vista as vs

        geo_model = gp.create_data(
            [0, 2000, 0, 2000, 0, 2000], [50, 50, 50],
            path_o=input_path + '/input_data/tut_chapter1'
            '/simple_fault_model_orientations.csv',
            path_i=input_path + '/input_data/tut_chapter1'
            '/simple_fault_model_points.csv')

        gp.set_series(
            geo_model, {
                "Fault_Series":
                'Main_Fault',
                "Strat_Series":
                ('Sandstone_2', 'Siltstone', 'Shale', 'Sandstone_1')
            })
        geo_model.set_is_fault(['Fault_Series'])
        gp.set_interpolator(geo_model)
        gp.compute_model(geo_model)
        # with open(os.path.dirname(__file__)+"input_data/geomodel_fabian_sol.p", "rb") as f:
        #     geo_model.solutions = load(f)

        return vs.Vista(geo_model)
Exemple #2
0
imageio.mimsave('./learning_cheap.gif', pictures[:500:3], fps=24)

# %%
# Pyvista
# ~~~~~~~
#

# %%
from gempy.plot import vista
import pyvista as pv
from importlib import reload
reload(vista)
pv.set_plot_theme('document')

gv = vista.Vista(geo_model,
                 plotter_type='basic',
                 notebook=False,
                 real_time=True)

a = gv.set_structured_grid()
gv.p.open_gif('learning_3D-block.gif')

# %%
gv.p.show(auto_close=False, cpos='xz')

# %%
for iteration in range(0, 500, 1):
    geo_model.modify_surface_points(
        [0, 1, 2, 3], Z=data.posterior['depths'][
            0, iteration])  #data.get_values('depths')[iteration])
    gp.compute_model(geo_model, output='gravity')
    gv.p.remove_actor(a)