|
16 | 16 | from geoh5py.groups.property_group import GroupTypeEnum |
17 | 17 | from geoh5py.objects import Curve |
18 | 18 | from geoh5py.workspace import Workspace |
| 19 | +from pytest import warns |
19 | 20 |
|
20 | 21 | from simpeg_drivers.params import ActiveCellsOptions |
21 | 22 | from simpeg_drivers.potential_fields import ( |
@@ -166,30 +167,34 @@ def test_magnetic_vector_bounds_run( |
166 | 167 |
|
167 | 168 | # Run the inverse |
168 | 169 | active_cells = ActiveCellsOptions(topography_object=topography) |
169 | | - params = MVIInversionOptions( |
170 | | - geoh5=geoh5, |
171 | | - mesh=mesh, |
172 | | - active_cells=active_cells, |
173 | | - inducing_field_strength=inducing_field[0], |
174 | | - inducing_field_inclination=inducing_field[1], |
175 | | - inducing_field_declination=inducing_field[2], |
176 | | - data_object=tmi.parent, |
177 | | - starting_model=1e-4, |
178 | | - reference_model=0.0, |
179 | | - s_norm=0.0, |
180 | | - x_norm=1.0, |
181 | | - y_norm=1.0, |
182 | | - z_norm=1.0, |
183 | | - gradient_type="components", |
184 | | - tmi_channel=tmi, |
185 | | - tmi_uncertainty=4.0, |
186 | | - upper_bound=upper_bound, |
187 | | - max_global_iterations=max_iterations, |
188 | | - initial_beta_ratio=1e1, |
189 | | - store_sensitivities="ram", |
190 | | - save_sensitivities=True, |
191 | | - percentile=100, |
192 | | - ) |
| 170 | + with warns( |
| 171 | + UserWarning, match="Parameter 'lower_bound' for Magnetic Vector Inversion" |
| 172 | + ): |
| 173 | + params = MVIInversionOptions( |
| 174 | + geoh5=geoh5, |
| 175 | + mesh=mesh, |
| 176 | + active_cells=active_cells, |
| 177 | + inducing_field_strength=inducing_field[0], |
| 178 | + inducing_field_inclination=inducing_field[1], |
| 179 | + inducing_field_declination=inducing_field[2], |
| 180 | + data_object=tmi.parent, |
| 181 | + starting_model=1e-4, |
| 182 | + reference_model=0.0, |
| 183 | + s_norm=0.0, |
| 184 | + x_norm=1.0, |
| 185 | + y_norm=1.0, |
| 186 | + z_norm=1.0, |
| 187 | + gradient_type="components", |
| 188 | + tmi_channel=tmi, |
| 189 | + tmi_uncertainty=4.0, |
| 190 | + lower_bound=1e-6, |
| 191 | + upper_bound=upper_bound, |
| 192 | + max_global_iterations=max_iterations, |
| 193 | + initial_beta_ratio=1e1, |
| 194 | + store_sensitivities="ram", |
| 195 | + save_sensitivities=True, |
| 196 | + percentile=100, |
| 197 | + ) |
193 | 198 | params.write_ui_json(path=tmp_path / "Inv_run.ui.json") |
194 | 199 |
|
195 | 200 | driver = MVIInversionDriver(params) |
|
0 commit comments