forked from gempy-project/gempy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_data_mutation2.py
41 lines (26 loc) · 1015 Bytes
/
test_data_mutation2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# These two lines are necessary only if GemPy is not installed
import sys, os
sys.path.append("../..")
# Importing GemPy
import gempy as gp
import pytest
def test_add_point():
extend = [0.0, 1.0, 0.0, 1.0, 0.0, 1.1]
discretization = [5, 20, 20]
x, y, z, f = 0.0, 0.0, 0.5, 'surface2'
# %%
geo_model = gp.create_model('test')
gp.init_data(geo_model, extend, discretization)
geo_model.set_default_surfaces()
geo_model.set_default_orientation()
strats = ['surface1', 'surface2', 'basement']
gp.map_stack_to_surfaces(geo_model, {'Strat_Series': strats})
geo_model.add_surface_points(x, y, z, f)
geo_model.add_orientations(x, y, z, f, pole_vector=(1,0,0))
def test_restricting_wrapper():
from gempy.core.model import RestrictingWrapper
surface = gp.Surfaces(gp.core.data_modules.stack.Series(gp.core.data_modules.stack.Faults()))
s = RestrictingWrapper(surface)
print(s)
with pytest.raises(AttributeError):
print(s.add_surfaces)