Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions examples/examples/real/Hecho.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# Aux imports
import pandas as pn
from gempy.modules.serialization.save_load import _validate_serialization

# Importing gempy
import gempy as gp
Expand Down Expand Up @@ -126,7 +127,7 @@
gp.set_section_grid(
grid=geo_model.grid,
section_dict={
'section': ([0, 0], [16, 0], [321, 91])
'section': ((0., 0.), (16., 0.), (321, 91))
},
)

Expand All @@ -149,7 +150,8 @@
y=new_orientations.data['Y'],
z=new_orientations.data['Z'],
pole_vector=new_orientations.grads,
elements_names=fn
elements_names=fn,
name_id_map=element.surface_points.name_id_map
)

# %%
Expand Down Expand Up @@ -216,14 +218,15 @@
# Setting verbose and condition number options for debugging
geo_model.interpolation_options.kernel_options.compute_condition_number = True


# %%
gp.compute_model(
gempy_model=geo_model,
engine_config=gp.data.GemPyEngineConfig(
backend=gp.data.AvailableBackends.PYTORCH,
dtype='float64'
),
validate_serialization=False
validate_serialization=True
)

# %%
Expand Down
4 changes: 3 additions & 1 deletion gempy/modules/data_manipulation/manipulate_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ def add_orientations(geo_model: GeoModel,
elements_names: Sequence[str],
pole_vector: Optional[Union[Sequence[np.ndarray], np.ndarray]] = None,
orientation: Optional[Union[Sequence[np.ndarray], np.ndarray]] = None,
nugget: Optional[Sequence[float]] = None
nugget: Optional[Sequence[float]] = None,
name_id_map: Optional[dict[str, int]] = None #: A mapping between orientation names and ids.
) -> StructuralFrame:
"""Add orientation data to the geological model.

Expand Down Expand Up @@ -176,6 +177,7 @@ def add_orientations(geo_model: GeoModel,
G_z=data['pole_vector'][..., 2],
names=[element_name] * len(data['x']),
nugget=data['nugget'],
name_id_map=name_id_map
)

element: StructuralElement = geo_model.structural_frame.get_element_by_name(element_name)
Expand Down