File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
docs/developers_notes/dev_log Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 7
7
-[ ] Saving and loading models
8
8
-[ ] Better api for nugget effect optimization
9
9
10
+ ## Saving models
11
+ - From gempy
12
+ - StructuralFrame
13
+ - OrientationsTable
14
+ - SurfacePointsTable
15
+ - From Engine
16
+ - Input
17
+ - EngineGrid
18
+ - GeophysicsInput
19
+ - InterpolationOptions
20
+ - InputDataDescriptor
21
+ - InterpolatorInput
22
+ - Solutions (Not sure if I want to save them)
23
+ - RawArraysSolutions
24
+ - Solutions
25
+
26
+ ## What do I have in the engine server logic?
Original file line number Diff line number Diff line change
1
+ import pprint
2
+
3
+ import gempy as gp
4
+ from gempy .core .data .enumerators import ExampleModel
5
+ from gempy_engine .core .data import InterpolationOptions
6
+
7
+
8
+ def test_generate_horizontal_stratigraphic_model ():
9
+ model : gp .data .GeoModel = gp .generate_example_model (ExampleModel .HORIZONTAL_STRAT , compute_model = False )
10
+ print (model .structural_frame )
11
+ options : InterpolationOptions = model .interpolation_options
12
+ pass
13
+
14
+ def test_interpolation_options ():
15
+ options = InterpolationOptions .from_args (
16
+ range = 1.7 ,
17
+ c_o = 10.
18
+ )
19
+ json = options .model_dump ()
20
+ # Pretty print json
21
+ pprint .pp (json )
22
+
23
+ # Deserialize with pydantic
24
+ options2 = InterpolationOptions .model_validate (json )
25
+ assert options .__str__ () == options2 .__str__ ()
You can’t perform that action at this time.
0 commit comments