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 1
1
import warnings
2
- from typing import Union , Hashable
2
+ from typing import Union , Hashable , Literal
3
3
4
4
import numpy as np
5
5
from numpy import ndarray
@@ -104,7 +104,9 @@ def create_geomodel(
104
104
105
105
def structural_elements_from_borehole_set (
106
106
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 ]:
108
110
"""Creates a list of StructuralElements from a BoreholeSet.
109
111
110
112
Args:
@@ -123,7 +125,7 @@ def structural_elements_from_borehole_set(
123
125
borehole_set : ss .core .geological_formats .BoreholeSet
124
126
125
127
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 )
127
129
128
130
for name , properties in elements_dict .items ():
129
131
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):
118
118
return bounding_box_points
119
119
120
120
@property
121
- def active_grids (self ):
121
+ def active_grids (self ) -> GridTypes :
122
122
return self ._active_grids
123
123
124
124
@active_grids .setter
125
- def active_grids (self , value ):
125
+ def active_grids (self , value : GridTypes ):
126
126
self ._active_grids = value
127
127
self ._update_values ()
128
128
You can’t perform that action at this time.
0 commit comments