Skip to content

Commit 014032a

Browse files
committed
[CLN] Refactor field names for clarity
1 parent 3c988f3 commit 014032a

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

gempy_engine/core/data/options/evaluation_options.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ class MeshExtractionMaskingOptions(enum.Enum):
1414
class EvaluationOptions:
1515
_number_octree_levels: int = 1
1616
_number_octree_levels_surface: int = 4
17-
curvature_threshold: float = -1 #: Threshold to do octree refinement due to curvature to deal with angular geometries. This curvature assumes that 1 is the maximum curvature of any voxel
18-
error_threshold: float = 1. #: Number of standard deviations to consider a voxel as candidate to refine
19-
min_octree_level: int = 2
17+
octree_curvature_threshold: float = -1 #: Threshold to do octree refinement due to curvature to deal with angular geometries. This curvature assumes that 1 is the maximum curvature of any voxel
18+
octree_error_threshold: float = 1. #: Number of standard deviations to consider a voxel as candidate to refine
19+
octree_min_level: int = 2
2020

2121
mesh_extraction: bool = True
2222
mesh_extraction_masking_options: MeshExtractionMaskingOptions = MeshExtractionMaskingOptions.INTERSECT

gempy_engine/modules/octrees_topology/_octree_internals.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ def _calculate_topology(shift_select_xyz: List[np.ndarray], ids: np.ndarray):
105105
def _additional_refinement_tests(voxel_select, current_octree_level, evaluation_options, prev_octree):
106106
shape = voxel_select.shape[0]
107107

108-
if current_octree_level < evaluation_options.min_octree_level:
108+
if current_octree_level < evaluation_options.octree_min_level:
109109
shape_ = shape
110110
additional_voxel_selected_to_refinement = BackendTensor.t.ones(shape_, dtype=bool)
111111
return BackendTensor.t.array(additional_voxel_selected_to_refinement)
112112

113-
test_for_curvature = 0 <= evaluation_options.curvature_threshold <= 1 and evaluation_options.compute_scalar_gradient
114-
test_for_error = evaluation_options.error_threshold > 0
113+
test_for_curvature = 0 <= evaluation_options.octree_curvature_threshold <= 1 and evaluation_options.compute_scalar_gradient
114+
test_for_error = evaluation_options.octree_error_threshold > 0
115115

116116
additional_voxel_selected_to_refinement = BackendTensor.t.zeros(voxel_select.shape, dtype=bool)
117117
output: InterpOutput
@@ -123,14 +123,14 @@ def _additional_refinement_tests(voxel_select, current_octree_level, evaluation_
123123
gy=(exported_fields.gy_field.reshape((-1, 8))),
124124
gz=(exported_fields.gz_field.reshape((-1, 8))),
125125
voxel_size=np.array(prev_octree.grid_centers.octree_grid.dxdydz),
126-
curvature_threshold=evaluation_options.curvature_threshold # * This curvature assumes that 1 is the maximum curvature of any voxel
126+
curvature_threshold=evaluation_options.octree_curvature_threshold # * This curvature assumes that 1 is the maximum curvature of any voxel
127127
)
128128

129129
if test_for_error:
130130
marked_voxels = _test_refinement_on_stats(
131131
exported_fields=exported_fields,
132132
voxel_select_corners_eval=voxel_select,
133-
n_std=evaluation_options.error_threshold,
133+
n_std=evaluation_options.octree_error_threshold,
134134
plot=evaluation_options.verbose
135135
)
136136
additional_voxel_selected_to_refinement |= marked_voxels

0 commit comments

Comments
 (0)