Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
"cooling_rate": {
"group": "Optimization",
"label": "Iterations per beta",
"value": 2,
"value": 1,
"min": 1,
"LineEdit": false,
"max": 10,
Expand Down Expand Up @@ -489,7 +489,7 @@
"group": "Update sensitivity weights directive",
"tooltip": "Update sensitivity weight threshold",
"label": "Threshold (%)",
"value": 0.001,
"value": 1.0,
"max": 100.0,
"min": 0.0,
"precision": 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
"cooling_rate": {
"group": "Optimization",
"label": "Iterations per beta",
"value": 2,
"value": 1,
"min": 1,
"LineEdit": false,
"max": 10,
Expand Down Expand Up @@ -459,7 +459,7 @@
"group": "Update sensitivity weights directive",
"tooltip": "Update sensitivity weight threshold",
"label": "Threshold (%)",
"value": 0.001,
"value": 1.0,
"max": 100.0,
"min": 0.0,
"precision": 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@
"cooling_rate": {
"group": "Optimization",
"label": "Iterations per beta",
"value": 2,
"value": 1,
"min": 1,
"LineEdit": false,
"max": 10,
Expand Down Expand Up @@ -470,7 +470,7 @@
"group": "Update sensitivity weights directive",
"tooltip": "Update sensitivity weight threshold",
"label": "Threshold (%)",
"value": 0.001,
"value": 1.0,
"max": 100.0,
"min": 0.0,
"precision": 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@
"cooling_rate": {
"group": "Optimization",
"label": "Iterations per beta",
"value": 2,
"value": 1,
"min": 1,
"LineEdit": false,
"max": 10,
Expand Down Expand Up @@ -500,7 +500,7 @@
"group": "Update sensitivity weights directive",
"tooltip": "Update sensitivity weight threshold",
"label": "Threshold (%)",
"value": 0.001,
"value": 1.0,
"max": 100.0,
"min": 0.0,
"precision": 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
"cooling_rate": {
"group": "Optimization",
"label": "Iterations per beta",
"value": 2,
"value": 1,
"min": 1,
"LineEdit": false,
"max": 10,
Expand Down Expand Up @@ -475,7 +475,7 @@
"group": "Update sensitivity weights directive",
"tooltip": "Update sensitivity weight threshold",
"label": "Threshold (%)",
"value": 0.001,
"value": 1.0,
"max": 100.0,
"min": 0.0,
"precision": 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@
"cooling_rate": {
"group": "Optimization",
"label": "Iterations per beta",
"value": 2,
"value": 1,
"min": 1,
"LineEdit": false,
"max": 10,
Expand Down Expand Up @@ -482,7 +482,7 @@
"group": "Update sensitivity weights directive",
"tooltip": "Update sensitivity weight threshold",
"label": "Threshold (%)",
"value": 0.001,
"value": 1.0,
"max": 100.0,
"min": 0.0,
"precision": 3,
Expand Down
2 changes: 1 addition & 1 deletion simpeg_drivers/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ class DirectiveOptions(BaseModel):
auto_scale_misfits: bool = False
every_iteration_bool: bool = True
save_sensitivities: bool = False
sens_wts_threshold: float | None = 1e-3
sens_wts_threshold: float | None = 1e-0


class DrapeModelOptions(BaseModel):
Expand Down
8 changes: 7 additions & 1 deletion simpeg_drivers/potential_fields/gravity/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
from geoh5py.data import FloatData

from simpeg_drivers import assets_path
from simpeg_drivers.options import BaseForwardOptions, BaseInversionOptions
from simpeg_drivers.options import (
BaseForwardOptions,
BaseInversionOptions,
DirectiveOptions,
)


class GravityForwardOptions(BaseForwardOptions):
Expand Down Expand Up @@ -105,3 +109,5 @@ class GravityInversionOptions(BaseInversionOptions):
gyy_uncertainty: FloatData | float | None = None
gyz_uncertainty: FloatData | float | None = None
gzz_uncertainty: FloatData | float | None = None

directives: DirectiveOptions = DirectiveOptions(sens_wts_threshold=1e-3)
3 changes: 3 additions & 0 deletions simpeg_drivers/potential_fields/magnetic_scalar/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from simpeg_drivers.options import (
BaseForwardOptions,
BaseInversionOptions,
DirectiveOptions,
ModelOptions,
)

Expand Down Expand Up @@ -137,3 +138,5 @@ class MagneticInversionOptions(BaseInversionOptions):
inducing_field_declination: float | FloatData

models: MagneticModelOptions

directives: DirectiveOptions = DirectiveOptions(sens_wts_threshold=1e-3)
3 changes: 3 additions & 0 deletions simpeg_drivers/potential_fields/magnetic_vector/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from simpeg_drivers.options import (
BaseForwardOptions,
BaseInversionOptions,
DirectiveOptions,
ModelOptions,
)

Expand Down Expand Up @@ -140,3 +141,5 @@ class MVIInversionOptions(BaseInversionOptions):
inducing_field_inclination: float | FloatData
inducing_field_declination: float | FloatData
models: VectorModelOptions

directives: DirectiveOptions = DirectiveOptions(sens_wts_threshold=1e-3)
1 change: 0 additions & 1 deletion tests/driver_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def test_smallness_terms(tmp_path: Path):
max_global_iterations=1,
initial_beta_ratio=1e-2,
percentile=100,
store_sensitivities="ram",
)
params.alpha_s = None
driver = GravityInversionDriver(params)
Expand Down
4 changes: 2 additions & 2 deletions tests/run_tests/driver_2d_rotated_gradients_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# To test the full run and validate the inversion.
# Move this file out of the test directory and run.

target_run = {"data_norm": 0.6345768240307744, "phi_d": 1090, "phi_m": 3.99}
target_run = {"data_norm": 0.63464358755296, "phi_d": 1100, "phi_m": 5.04}


def test_dc2d_rotated_grad_fwr_run(
Expand Down Expand Up @@ -154,7 +154,7 @@ def test_dc2d_rotated_grad_run(
reference_model=100.0,
s_norm=1.0,
x_norm=0.0,
z_norm=0.0,
z_norm=2.0,
max_global_iterations=max_iterations,
initial_beta=None,
initial_beta_ratio=1e0,
Expand Down
4 changes: 1 addition & 3 deletions tests/run_tests/driver_airborne_fem_1d_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# To test the full run and validate the inversion.
# Move this file out of the test directory and run.

target_run = {"data_norm": 638.15180, "phi_d": 59500, "phi_m": 168}
target_run = {"data_norm": 638.1518041350254, "phi_d": 177000, "phi_m": 2860}


def test_fem_fwr_1d_run(
Expand Down Expand Up @@ -143,8 +143,6 @@ def test_fem_1d_run(tmp_path: Path, max_iterations=1, pytest=True):
percentile=100,
cooling_rate=3,
chi_factor=0.25,
store_sensitivities="ram",
sens_wts_threshold=1.0,
**data_kwargs,
)
params.write_ui_json(path=tmp_path / "Inv_run.ui.json")
Expand Down
2 changes: 0 additions & 2 deletions tests/run_tests/driver_airborne_tem_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ def test_airborne_tem_run(tmp_path: Path, max_iterations=1, pytest=True):
cooling_rate=4,
max_cg_iterations=200,
percentile=5,
sens_wts_threshold=1.0,
store_sensitivities="ram",
solver_type="Mumps",
**data_kwargs,
)
Expand Down
6 changes: 1 addition & 5 deletions tests/run_tests/driver_dc_2d_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@
# To test the full run and validate the inversion.
# Move this file out of the test directory and run.

target_run = {
"data_norm": 0.59563,
"phi_d": 2820,
"phi_m": 16.8,
}
target_run = {"data_norm": 0.5963140277544549, "phi_d": 2640, "phi_m": 20.4}


def test_dc_2d_fwr_run(
Expand Down
3 changes: 1 addition & 2 deletions tests/run_tests/driver_dc_b2d_rotated_gradients_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
# To test the full run and validate the inversion.
# Move this file out of the test directory and run.

target_run = {"data_norm": 1.1038993594022803, "phi_d": 308, "phi_m": 0.0237}
target_run = {"data_norm": 1.1039080237658845, "phi_d": 185, "phi_m": 0.491}


def test_dc_rotated_p3d_fwr_run(
Expand Down Expand Up @@ -147,7 +147,6 @@ def test_dc_rotated_gradient_p3d_run(
s_norm=0.0,
x_norm=0.0,
z_norm=0.0,
gradient_type="components",
max_global_iterations=max_iterations,
initial_beta=None,
initial_beta_ratio=10.0,
Expand Down
2 changes: 1 addition & 1 deletion tests/run_tests/driver_dc_b2d_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# To test the full run and validate the inversion.
# Move this file out of the test directory and run.

target_run = {"data_norm": 1.099, "phi_d": 8657, "phi_m": 1.217}
target_run = {"data_norm": 1.0999182820848885, "phi_d": 3060, "phi_m": 19.1}


def test_dc_p3d_fwr_run(
Expand Down
3 changes: 1 addition & 2 deletions tests/run_tests/driver_dc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# To test the full run and validate the inversion.
# Move this file out of the test directory and run.

target_run = {"data_norm": 0.150326, "phi_d": 212, "phi_m": 374}
target_run = {"data_norm": 0.1503264550032795, "phi_d": 43.9, "phi_m": 935}


def test_dc_3d_fwr_run(
Expand Down Expand Up @@ -111,7 +111,6 @@ def test_dc_3d_run(
percentile=100,
upper_bound=10,
tile_spatial=n_lines,
store_sensitivities="ram",
auto_scale_misfits=False,
save_sensitivities=True,
cooling_rate=1,
Expand Down
2 changes: 0 additions & 2 deletions tests/run_tests/driver_fem_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ def test_fem_run(tmp_path: Path, max_iterations=1, pytest=True):
percentile=100,
cooling_rate=3,
chi_factor=0.25,
store_sensitivities="ram",
sens_wts_threshold=1.0,
**data_kwargs,
)
params.write_ui_json(path=tmp_path / "Inv_run.ui.json")
Expand Down
3 changes: 1 addition & 2 deletions tests/run_tests/driver_grav_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# To test the full run and validate the inversion.
# Move this file out of the test directory and run.
target_run = {"data_norm": 0.0028055269276044915, "phi_d": 8.32e-05, "phi_m": 0.0038}
target_run = {"data_norm": 0.0028055270497087128, "phi_d": 8.24e-06, "phi_m": 0.0234}


def test_gravity_fwr_run(
Expand Down Expand Up @@ -156,7 +156,6 @@ def test_gravity_run(
starting_model=1e-4,
topography_object=topography,
reference_model=0.0,
store_sensitivities="ram",
save_sensitivities=True,
)
params.write_ui_json(path=tmp_path / "Inv_run.ui.json")
Expand Down
2 changes: 0 additions & 2 deletions tests/run_tests/driver_ground_tem_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ def test_ground_tem_run(tmp_path: Path, max_iterations=1, pytest=True):
cooling_rate=2,
max_cg_iterations=200,
percentile=100,
sens_wts_threshold=1.0,
store_sensitivities="ram",
solver_type="Mumps",
**data_kwargs,
)
Expand Down
3 changes: 1 addition & 2 deletions tests/run_tests/driver_ip_2d_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# To test the full run and validate the inversion.
# Move this file out of the test directory and run.

target_run = {"data_norm": 0.09052544, "phi_d": 24900, "phi_m": 0.185}
target_run = {"data_norm": 0.09045976331683352, "phi_d": 19600, "phi_m": 0.213}


def test_ip_2d_fwr_run(
Expand Down Expand Up @@ -107,7 +107,6 @@ def test_ip_2d_run(
initial_beta_ratio=1e0,
percentile=100,
upper_bound=0.1,
store_sensitivities="ram",
cooling_rate=1,
)
params.write_ui_json(path=tmp_path / "Inv_run.ui.json")
Expand Down
2 changes: 1 addition & 1 deletion tests/run_tests/driver_ip_b2d_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# To test the full run and validate the inversion.
# Move this file out of the test directory and run.

target_run = {"data_norm": 0.0919313, "phi_d": 25600, "phi_m": 0.201}
target_run = {"data_norm": 0.09218916148142815, "phi_d": 3490, "phi_m": 0.473}


def test_ip_p3d_fwr_run(
Expand Down
3 changes: 1 addition & 2 deletions tests/run_tests/driver_ip_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# To test the full run and validate the inversion.
# Move this file out of the test directory and run.

target_run = {"data_norm": 0.0082997, "phi_d": 178, "phi_m": 0.684}
target_run = {"data_norm": 0.008301530028556213, "phi_d": 107, "phi_m": 0.863}


def test_ip_3d_fwr_run(
Expand Down Expand Up @@ -101,7 +101,6 @@ def test_ip_3d_run(
percentile=100,
upper_bound=0.1,
tile_spatial=n_lines,
store_sensitivities="ram",
cooling_rate=1,
)
params.write_ui_json(path=tmp_path / "Inv_run.ui.json")
Expand Down
3 changes: 1 addition & 2 deletions tests/run_tests/driver_joint_cross_gradient_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
# To test the full run and validate the inversion.
# Move this file out of the test directory and run.

target_run = {"data_norm": 53.29601, "phi_d": 10200, "phi_m": 0.123}
target_run = {"data_norm": 53.29585552088844, "phi_d": 7970, "phi_m": 26.7}


def test_joint_cross_gradient_fwr_run(
Expand Down Expand Up @@ -256,7 +256,6 @@ def test_joint_cross_gradient_inv_run(
y_norm=0.0,
z_norm=0.0,
percentile=100,
store_sensitivities="ram",
)

driver = JointCrossGradientDriver(joint_params)
Expand Down
2 changes: 1 addition & 1 deletion tests/run_tests/driver_joint_pgi_homogeneous_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
# To test the full run and validate the inversion.
# Move this file out of the test directory and run.

target_run = {"data_norm": 390.65805009978556, "phi_d": 2470, "phi_m": 0.674}
target_run = {"data_norm": 390.70695894864303, "phi_d": 2020, "phi_m": 8.98}


def test_homogeneous_fwr_run(
Expand Down
3 changes: 1 addition & 2 deletions tests/run_tests/driver_joint_surveys_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# To test the full run and validate the inversion.
# Move this file out of the test directory and run.

target_run = {"data_norm": 0.2997791602206556, "phi_d": 1410, "phi_m": 74.4}
target_run = {"data_norm": 0.2997791660779469, "phi_d": 398, "phi_m": 102}


def test_joint_surveys_fwr_run(
Expand Down Expand Up @@ -155,7 +155,6 @@ def test_joint_surveys_inv_run(
max_global_iterations=max_iterations,
initial_beta_ratio=1e-2,
percentile=100,
store_sensitivities="ram",
)

driver = JointSurveyDriver(joint_params)
Expand Down
Loading