File tree Expand file tree Collapse file tree 3 files changed +16
-5
lines changed
docs/developers_notes/dev_log Expand file tree Collapse file tree 3 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1+ ### From gempy_prob notes:
2+ ** Saving models**
3+ - ? Do we want to try to save the full input as versioning so that we can just have one system to go back and forth?
4+ - A way to save the model already with the correct ** nugget effects** instead of having to "load nuggets"
5+
6+ # TODO:
7+ -[ ] Saving and loading models
8+ -[ ] Better api for nugget effect optimization
9+
Original file line number Diff line number Diff line change 11import warnings
2- from typing import Union , Hashable
2+ from typing import Union , Hashable , Literal
33
44import numpy as np
55from numpy import ndarray
@@ -104,7 +104,9 @@ def create_geomodel(
104104
105105def structural_elements_from_borehole_set (
106106 borehole_set : "subsurface.core.geological_formats.BoreholeSet" ,
107- elements_dict : dict ) -> list [StructuralElement ]:
107+ elements_dict : dict ,
108+ group_by : Literal ['component lith' , 'lith_ids' ] = 'lith_ids'
109+ ) -> list [StructuralElement ]:
108110 """Creates a list of StructuralElements from a BoreholeSet.
109111
110112 Args:
@@ -123,7 +125,7 @@ def structural_elements_from_borehole_set(
123125 borehole_set : ss .core .geological_formats .BoreholeSet
124126
125127 elements = []
126- component_lith : dict [Hashable , np .ndarray ] = borehole_set .get_bottom_coords_for_each_lith ()
128+ component_lith : dict [Hashable , np .ndarray ] = borehole_set .get_bottom_coords_for_each_lith (group_by = group_by )
127129
128130 for name , properties in elements_dict .items ():
129131 top_coordinates = component_lith .get (properties ['id' ])
Original file line number Diff line number Diff line change @@ -118,11 +118,11 @@ def bounding_box(self):
118118 return bounding_box_points
119119
120120 @property
121- def active_grids (self ):
121+ def active_grids (self ) -> GridTypes :
122122 return self ._active_grids
123123
124124 @active_grids .setter
125- def active_grids (self , value ):
125+ def active_grids (self , value : GridTypes ):
126126 self ._active_grids = value
127127 self ._update_values ()
128128
You can’t perform that action at this time.
0 commit comments