Skip to content

Commit 0d3eff1

Browse files
committed
[WIP] Saving changes
1 parent 38893d2 commit 0d3eff1

File tree

8 files changed

+13
-40
lines changed

8 files changed

+13
-40
lines changed

gempy/core/data/grid.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,11 @@ def grid_binary(self):
9595
return custom_grid_bytes + topography_bytes
9696

9797

98-
_grid_binary_size: int = 0
9998
@computed_field
10099
def binary_meta_data(self) -> dict:
101100
return {
102101
'custom_grid_binary_length': len(self._custom_grid.values.astype("float64").tobytes()) if self._custom_grid else 0,
103102
'topography_binary_length': len(self._topography.values.astype("float64").tobytes()) if self._topography else 0,
104-
'grid_binary_size': self._grid_binary_size
105103
}
106104

107105
@computed_field(alias="active_grids")

gempy/core/data/structural_frame.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,13 +492,11 @@ def deserialize_binary(cls, data: Union["StructuralFrame", dict], constructor: M
492492

493493
# Access the context variable to get injected data
494494

495-
_input_binary_size: int = 0
496495
@computed_field
497496
def binary_meta_data(self) -> dict:
498497
return {
499498
'sp_binary_length': len(self.surface_points_copy.data.tobytes()),
500499
'ori_binary_length': len(self.orientations_copy.data.tobytes()) ,
501-
'input_binary_size': self._input_binary_size
502500
}
503501

504502
# endregion

test/test_modules/_geophysics_TO_UPDATE/test_gravity.test_gravity.verify/2-layers.approved.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,9 @@
5555
],
5656
"is_dirty": true,
5757
"basement_color": "#ffbe00",
58-
"_input_binary_size": 79,
5958
"binary_meta_data": {
6059
"sp_binary_length": 144,
61-
"ori_binary_length": 60,
62-
"input_binary_size": 79
60+
"ori_binary_length": 60
6361
}
6462
},
6563
"grid": {
@@ -104,11 +102,9 @@
104102
},
105103
"_transform": null,
106104
"_octree_levels": -1,
107-
"_grid_binary_size": 8,
108105
"binary_meta_data": {
109106
"custom_grid_binary_length": 0,
110-
"topography_binary_length": 0,
111-
"grid_binary_size": 8
107+
"topography_binary_length": 0
112108
},
113109
"active_grids": 1058
114110
},

test/test_modules/test_faults/test_finite_faults.test_finite_fault_scalar_field_on_fault.verify/fault.approved.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,9 @@
129129
],
130130
"is_dirty": true,
131131
"basement_color": "#728f02",
132-
"_input_binary_size": 211,
133132
"binary_meta_data": {
134133
"sp_binary_length": 792,
135-
"ori_binary_length": 300,
136-
"input_binary_size": 211
134+
"ori_binary_length": 300
137135
}
138136
},
139137
"grid": {
@@ -160,11 +158,9 @@
160158
"_centered_grid": null,
161159
"_transform": null,
162160
"_octree_levels": -1,
163-
"_grid_binary_size": 8,
164161
"binary_meta_data": {
165162
"custom_grid_binary_length": 0,
166-
"topography_binary_length": 0,
167-
"grid_binary_size": 8
163+
"topography_binary_length": 0
168164
},
169165
"active_grids": 1025
170166
},

test/test_modules/test_grids/test_custom_grid.test_custom_grid.verify/fold.approved.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,9 @@
6161
],
6262
"is_dirty": true,
6363
"basement_color": "#ffbe00",
64-
"_input_binary_size": 233,
6564
"binary_meta_data": {
6665
"sp_binary_length": 1296,
67-
"ori_binary_length": 120,
68-
"input_binary_size": 233
66+
"ori_binary_length": 120
6967
}
7068
},
7169
"grid": {
@@ -92,11 +90,9 @@
9290
"_centered_grid": null,
9391
"_transform": null,
9492
"_octree_levels": -1,
95-
"_grid_binary_size": 29,
9693
"binary_meta_data": {
9794
"custom_grid_binary_length": 192,
98-
"topography_binary_length": 0,
99-
"grid_binary_size": 29
95+
"topography_binary_length": 0
10096
},
10197
"active_grids": 1029
10298
},

test/test_modules/test_grids/test_grids_sections.test_section_grids.verify/fold.approved.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,9 @@
6161
],
6262
"is_dirty": true,
6363
"basement_color": "#ffbe00",
64-
"_input_binary_size": 233,
6564
"binary_meta_data": {
6665
"sp_binary_length": 1296,
67-
"ori_binary_length": 120,
68-
"input_binary_size": 233
66+
"ori_binary_length": 120
6967
}
7068
},
7169
"grid": {
@@ -154,11 +152,9 @@
154152
"_centered_grid": null,
155153
"_transform": null,
156154
"_octree_levels": -1,
157-
"_grid_binary_size": 37758,
158155
"binary_meta_data": {
159156
"custom_grid_binary_length": 0,
160-
"topography_binary_length": 86400,
161-
"grid_binary_size": 37758
157+
"topography_binary_length": 86400
162158
},
163159
"active_grids": 1049
164160
},

test/test_modules/test_grids/test_grids_sections.test_topography_II.verify/Model1.approved.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,9 @@
9696
],
9797
"is_dirty": true,
9898
"basement_color": "#443988",
99-
"_input_binary_size": 165,
10099
"binary_meta_data": {
101100
"sp_binary_length": 360,
102-
"ori_binary_length": 120,
103-
"input_binary_size": 165
101+
"ori_binary_length": 120
104102
}
105103
},
106104
"grid": {
@@ -154,11 +152,9 @@
154152
"_centered_grid": null,
155153
"_transform": null,
156154
"_octree_levels": -1,
157-
"_grid_binary_size": 20161,
158155
"binary_meta_data": {
159156
"custom_grid_binary_length": 0,
160-
"topography_binary_length": 48000,
161-
"grid_binary_size": 20161
157+
"topography_binary_length": 48000
162158
},
163159
"active_grids": 1034
164160
},

test/test_modules/test_serialize_model.test_generate_horizontal_stratigraphic_model.verify/Horizontal Stratigraphic Model serialization.approved.txt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,10 @@
6161
],
6262
"is_dirty": true,
6363
"basement_color": "#ffbe00",
64-
"_input_binary_size": 0,
64+
"": 0,
6565
"binary_meta_data": {
6666
"sp_binary_length": 432,
67-
"ori_binary_length": 120,
68-
"input_binary_size": 0
67+
"ori_binary_length": 120
6968
}
7069
},
7170
"grid": {
@@ -92,11 +91,9 @@
9291
"_centered_grid": null,
9392
"_transform": null,
9493
"_octree_levels": -1,
95-
"_grid_binary_size": 0,
9694
"binary_meta_data": {
9795
"custom_grid_binary_length": 0,
98-
"topography_binary_length": 0,
99-
"grid_binary_size": 0
96+
"topography_binary_length": 0
10097
},
10198
"active_grids": 1026
10299
},

0 commit comments

Comments
 (0)