Skip to content

Commit 72f2dc3

Browse files
committed
[TEST] Adding code to grab scalar field
1 parent 1525af4 commit 72f2dc3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/test_private/test_terranigma/test_2025_2.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ def test_2025_2():
143143
# * The scalar fields can be found for dense and octree grids:
144144
print(geo_model.solutions.raw_arrays.scalar_field_matrix)
145145

146+
# * For custom grids so far we do not have a property that gives it directly, but it can be accessed here
147+
148+
octree_lvl = 0 # * All the grids that are not octree are computed on octree level 0
149+
stack_number = -1 # * Here we choose the stack that we need. At the moment boolean operations--for erosion-- are not calculated on the scalar field
150+
gempy_output = geo_model.solutions.octrees_output[octree_lvl].outputs_centers[stack_number]
151+
slice_ = gempy_output.grid.custom_grid_slice
152+
scalar_field = gempy_output.scalar_fields.exported_fields.scalar_field[slice_]
153+
print(scalar_field)
146154
# endregion
147155

148156

0 commit comments

Comments
 (0)