You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
) ->GeoModel: # ? Do I need to pass pandas read kwargs?
30
31
"""
31
-
Initializes and returns a GeoModel instance with specified parameters.
32
+
Creates a geological model based on input parameters, spatial configuration, and interpolation options.
33
+
34
+
This function initializes a geological model by defining the grid (dense grid or
35
+
octree-based), selecting interpolation options based on the desired type, and
36
+
configuring the structural frame using either a provided structural frame or an
37
+
importer helper instance. The geological model is tailored for specific project-based
38
+
requirements and can be either dense or with variable resolution depending on the
39
+
refinement level.
32
40
33
41
Args:
34
-
project_name (str, optional): The name of the project. Defaults to 'default_project'.
35
-
extent (Union[List, np.ndarray], optional): The 3D extent of the grid. Must be provided if resolution is specified. Defaults to None.
36
-
resolution (Union[List, np.ndarray], optional): The resolution of the grid. If None, an octree grid will be initialized. Defaults to None.
37
-
refinement (int, optional): The level of refinement for the octree grid. Defaults to 1.
38
-
structural_frame (StructuralFrame, optional): The structural frame of the GeoModel. Either this or importer_helper must be provided. Defaults to None.
39
-
importer_helper (ImporterHelper, optional): Helper object for importing structural elements. Either this or structural_frame must be provided. Defaults to None.
42
+
project_name (str): Name of the geological model project. Defaults to 'default_project'.
43
+
extent (list, ndarray): Spatial extent of the geological model in the form of
44
+
[min_x, max_x, min_y, max_y, min_z, max_z].
45
+
resolution (list, ndarray): Resolution of the model grid in the form [x_res, y_res, z_res].
46
+
If not provided, the function will default to octree initialization.
47
+
refinement (int): Refinement level for the octree grid. Ignored if resolution is provided.
48
+
Defaults to 1.
49
+
structural_frame (StructuralFrame): Pre-configured instance of StructuralFrame
50
+
for the geological model. If not provided, an importer_helper must be supplied.
51
+
importer_helper (ImporterHelper): Helper object for initializing a structural frame if none
52
+
is explicitly provided.
53
+
intpolation_options_tye (InterpolationOptionsType): Enum representing the desired type of
54
+
interpolation options. Defaults to InterpolationOptionsType.OCTREE.
40
55
41
56
Returns:
42
-
GeoModel: The initialized GeoModel object.
57
+
GeoModel: An initialized geological model with specified spatial configuration
58
+
and interpolation properties.
43
59
44
60
Raises:
45
61
ValueError: If neither structural_frame nor importer_helper is provided.
62
+
ValueError: If the interpolation options type is unrecognized.
raiseValueError(f"Interpolation options type {intpolation_options_tye} not recognized. Use InterpolationOptionsType.DENSE_GRID or InterpolationOptionsType.OCTREE.")
0 commit comments