|
21 | 21 |
|
22 | 22 | from typing import Any |
23 | 23 |
|
| 24 | +from geoh5py.groups.giftools.parameters import BASE_PARAMETERS, merge_field |
| 25 | + |
24 | 26 |
|
25 | 27 | # Parameters shared by the GIFtools octree inversion groups. |
26 | 28 | # Note -- this will likely be restructured as we know more about what the commonalities and |
27 | 29 | # differences are between different GIFtools/GIFtools octree/GIFtools inversion groups. |
28 | | -# pylint: disable=duplicate-code |
| 30 | + |
29 | 31 | OCTREE_INVERSION_PARAMETERS: dict[str, Any] = { |
30 | | - "active_model": { |
31 | | - "association": "Cell", |
32 | | - "dataType": ["Integer", "Boolean"], |
33 | | - "default": "", |
34 | | - "enabled": False, |
35 | | - "group": "Model parameters", |
36 | | - "label": "Active model", |
37 | | - "optional": True, |
38 | | - "parent": "mesh", |
39 | | - "suffix": ".act", |
40 | | - "value": "", |
41 | | - }, |
| 32 | + "active_model": BASE_PARAMETERS["active_model"], |
42 | 33 | "assignConRes": { |
43 | 34 | "alternateLabel": "Resistivity", |
44 | 35 | "group": "Model parameters", |
|
75 | 66 | "label": "No bounds", |
76 | 67 | "value": True, |
77 | 68 | }, |
78 | | - "cell_weight": { |
79 | | - "association": "Cell", |
80 | | - "dataType": "Float", |
81 | | - "default": "", |
82 | | - "enabled": False, |
83 | | - "group": "Model objective function", |
84 | | - "label": "Weights (Ws)", |
85 | | - "ndv": 1, |
86 | | - "optional": True, |
87 | | - "parent": "mesh", |
88 | | - "suffix": ".wgt", |
89 | | - "value": "", |
90 | | - }, |
| 69 | + "cell_weight": BASE_PARAMETERS["cell_weight"], |
91 | 70 | "delta_beta": { |
92 | 71 | "default": -1234567, |
93 | 72 | "dependency": "beta_given", |
94 | 73 | "group": "Inversion parameters", |
95 | 74 | "label": "Beta step", |
96 | 75 | "value": 0.25, |
97 | 76 | }, |
98 | | - "face_weight": { |
99 | | - "association": "Face", |
100 | | - "dataType": "Float", |
101 | | - "default": "", |
102 | | - "enabled": False, |
103 | | - "group": "Model objective function", |
104 | | - "label": "Weights (Wxyz)", |
105 | | - "ndv": 1, |
106 | | - "optional": True, |
107 | | - "parent": "mesh", |
108 | | - "suffix": ".wgt", |
109 | | - "value": "", |
110 | | - }, |
| 77 | + "face_weight": BASE_PARAMETERS["face_weight"], |
111 | 78 | "global_weight": { |
112 | 79 | "association": "Cell", |
113 | 80 | "dataType": "Float", |
|
126 | 93 | "label": "Solver tolerance", |
127 | 94 | "value": 0.009999999776482582, |
128 | 95 | }, |
129 | | - "initial_model": { |
130 | | - "association": "Cell", |
131 | | - "dataType": "Float", |
132 | | - "default": 0.0010000000474974513, |
133 | | - "group": "Model parameters", |
134 | | - "isValue": True, |
135 | | - "label": "Initial model", |
136 | | - "main": False, |
137 | | - "max": 100000000, |
138 | | - "min": 9.99999993922529e-09, |
139 | | - "parent": "mesh", |
140 | | - "property": "", |
141 | | - "value": 0.0010000000474974513, |
142 | | - }, |
| 96 | + # initial_model shares the common base and octree adds max/min bounds. |
| 97 | + "initial_model": merge_field( |
| 98 | + BASE_PARAMETERS["initial_model"], |
| 99 | + max=100000000, |
| 100 | + min=9.99999993922529e-09, |
| 101 | + ), |
143 | 102 | "inversion_chifact": { |
144 | 103 | "default": 1, |
145 | 104 | "group": "Inversion parameters", |
|
231 | 190 | "property": "", |
232 | 191 | "value": 0.0010000000474974513, |
233 | 192 | }, |
234 | | - "results_loaded": False, |
235 | | - "smooth_mod": { |
236 | | - "default": False, |
237 | | - "group": "Model objective function", |
238 | | - "label": "Reference model in Wxyz", |
239 | | - "tooltip": "Wxyz(m-mref): SMOOTH_MOD_DIF option", |
240 | | - "value": False, |
241 | | - }, |
| 193 | + "results_loaded": BASE_PARAMETERS["results_loaded"], |
| 194 | + "smooth_mod": BASE_PARAMETERS["smooth_mod"], |
242 | 195 | "topography": { |
243 | 196 | "association": "Cell", |
244 | 197 | "dataType": ["Integer", "Boolean"], |
|
273 | 226 | "property": "", |
274 | 227 | "value": 10, |
275 | 228 | }, |
276 | | - "uuid": "", |
| 229 | + "uuid": BASE_PARAMETERS["uuid"], |
277 | 230 | "version": "", |
278 | | - "working_directory": "", |
| 231 | + "working_directory": BASE_PARAMETERS["working_directory"], |
279 | 232 | } |
0 commit comments