From 50ea33d43e1c8303596a3b895e2de0e04b90ff10 Mon Sep 17 00:00:00 2001 From: domfournier Date: Tue, 29 Sep 2026 11:14:12 -0400 Subject: [PATCH 1/7] Add reference form --- .../uijson/apparent_conductivity_inversion.ui.json | 8 ++++++++ .../uijson/borehole_tdem_inversion.ui.json | 8 ++++++++ .../uijson/direct_current_2d_inversion.ui.json | 8 ++++++++ .../uijson/direct_current_3d_inversion.ui.json | 8 ++++++++ simpeg_drivers-assets/uijson/fdem1d_inversion.ui.json | 8 ++++++++ simpeg_drivers-assets/uijson/fdem_inversion.ui.json | 8 ++++++++ simpeg_drivers-assets/uijson/gravity_inversion.ui.json | 8 ++++++++ .../uijson/induced_polarization_2d_inversion.ui.json | 8 ++++++++ .../uijson/induced_polarization_3d_inversion.ui.json | 8 ++++++++ .../uijson/joint_cross_gradient_inversion.ui.json | 8 ++++++++ .../uijson/joint_petrophysics_inversion.ui.json | 8 ++++++++ .../uijson/joint_surveys_inversion.ui.json | 8 ++++++++ .../uijson/magnetic_scalar_inversion.ui.json | 8 ++++++++ .../uijson/magnetic_vector_inversion.ui.json | 8 ++++++++ .../uijson/magnetic_vector_pde_inversion.ui.json | 8 ++++++++ .../uijson/magnetotellurics_inversion.ui.json | 8 ++++++++ simpeg_drivers-assets/uijson/tdem1d_inversion.ui.json | 8 ++++++++ simpeg_drivers-assets/uijson/tdem_inversion.ui.json | 8 ++++++++ simpeg_drivers-assets/uijson/tipper_inversion.ui.json | 8 ++++++++ 19 files changed, 152 insertions(+) diff --git a/simpeg_drivers-assets/uijson/apparent_conductivity_inversion.ui.json b/simpeg_drivers-assets/uijson/apparent_conductivity_inversion.ui.json index 949ae31f..5b2b26bc 100644 --- a/simpeg_drivers-assets/uijson/apparent_conductivity_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/apparent_conductivity_inversion.ui.json @@ -281,6 +281,14 @@ "value": "", "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components." }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/borehole_tdem_inversion.ui.json b/simpeg_drivers-assets/uijson/borehole_tdem_inversion.ui.json index 80b40d27..7afc31be 100644 --- a/simpeg_drivers-assets/uijson/borehole_tdem_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/borehole_tdem_inversion.ui.json @@ -358,6 +358,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "enabled": false }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": "Float", diff --git a/simpeg_drivers-assets/uijson/direct_current_2d_inversion.ui.json b/simpeg_drivers-assets/uijson/direct_current_2d_inversion.ui.json index eb418ed5..b179b894 100644 --- a/simpeg_drivers-assets/uijson/direct_current_2d_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/direct_current_2d_inversion.ui.json @@ -316,6 +316,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/direct_current_3d_inversion.ui.json b/simpeg_drivers-assets/uijson/direct_current_3d_inversion.ui.json index 2f6d2b31..53ffe699 100644 --- a/simpeg_drivers-assets/uijson/direct_current_3d_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/direct_current_3d_inversion.ui.json @@ -279,6 +279,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/fdem1d_inversion.ui.json b/simpeg_drivers-assets/uijson/fdem1d_inversion.ui.json index 25602098..542e7062 100644 --- a/simpeg_drivers-assets/uijson/fdem1d_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/fdem1d_inversion.ui.json @@ -311,6 +311,14 @@ "property": "", "enabled": true }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "gradient_rotation": "", "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/fdem_inversion.ui.json b/simpeg_drivers-assets/uijson/fdem_inversion.ui.json index cf113bdb..c95a702c 100644 --- a/simpeg_drivers-assets/uijson/fdem_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/fdem_inversion.ui.json @@ -347,6 +347,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/gravity_inversion.ui.json b/simpeg_drivers-assets/uijson/gravity_inversion.ui.json index 2d9c5786..96a9cb42 100644 --- a/simpeg_drivers-assets/uijson/gravity_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/gravity_inversion.ui.json @@ -545,6 +545,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/induced_polarization_2d_inversion.ui.json b/simpeg_drivers-assets/uijson/induced_polarization_2d_inversion.ui.json index 46190dc3..a854334b 100644 --- a/simpeg_drivers-assets/uijson/induced_polarization_2d_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/induced_polarization_2d_inversion.ui.json @@ -330,6 +330,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/induced_polarization_3d_inversion.ui.json b/simpeg_drivers-assets/uijson/induced_polarization_3d_inversion.ui.json index 445dbca4..10f750de 100644 --- a/simpeg_drivers-assets/uijson/induced_polarization_3d_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/induced_polarization_3d_inversion.ui.json @@ -299,6 +299,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/joint_cross_gradient_inversion.ui.json b/simpeg_drivers-assets/uijson/joint_cross_gradient_inversion.ui.json index 18ea3cbc..86eb0720 100644 --- a/simpeg_drivers-assets/uijson/joint_cross_gradient_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/joint_cross_gradient_inversion.ui.json @@ -243,6 +243,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "min": 0.0, "max": 2.0, diff --git a/simpeg_drivers-assets/uijson/joint_petrophysics_inversion.ui.json b/simpeg_drivers-assets/uijson/joint_petrophysics_inversion.ui.json index 9612de76..41ae6241 100644 --- a/simpeg_drivers-assets/uijson/joint_petrophysics_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/joint_petrophysics_inversion.ui.json @@ -189,6 +189,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "min": 0.0, "max": 2.0, diff --git a/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json b/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json index 22790db9..3c3546ff 100644 --- a/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json @@ -281,6 +281,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/magnetic_scalar_inversion.ui.json b/simpeg_drivers-assets/uijson/magnetic_scalar_inversion.ui.json index 80c8a0cc..e69b0725 100644 --- a/simpeg_drivers-assets/uijson/magnetic_scalar_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/magnetic_scalar_inversion.ui.json @@ -576,6 +576,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/magnetic_vector_inversion.ui.json b/simpeg_drivers-assets/uijson/magnetic_vector_inversion.ui.json index 0fb5348d..b177cb69 100644 --- a/simpeg_drivers-assets/uijson/magnetic_vector_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/magnetic_vector_inversion.ui.json @@ -633,6 +633,14 @@ "parent": "mesh", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/magnetic_vector_pde_inversion.ui.json b/simpeg_drivers-assets/uijson/magnetic_vector_pde_inversion.ui.json index 48d60666..ec0d8664 100644 --- a/simpeg_drivers-assets/uijson/magnetic_vector_pde_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/magnetic_vector_pde_inversion.ui.json @@ -415,6 +415,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/magnetotellurics_inversion.ui.json b/simpeg_drivers-assets/uijson/magnetotellurics_inversion.ui.json index f32681c1..51b61718 100644 --- a/simpeg_drivers-assets/uijson/magnetotellurics_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/magnetotellurics_inversion.ui.json @@ -495,6 +495,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/tdem1d_inversion.ui.json b/simpeg_drivers-assets/uijson/tdem1d_inversion.ui.json index a00eef9b..3608cecc 100644 --- a/simpeg_drivers-assets/uijson/tdem1d_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/tdem1d_inversion.ui.json @@ -284,6 +284,14 @@ "property": "", "enabled": true }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "gradient_rotation": "", "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/tdem_inversion.ui.json b/simpeg_drivers-assets/uijson/tdem_inversion.ui.json index 45271cbc..e432e049 100644 --- a/simpeg_drivers-assets/uijson/tdem_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/tdem_inversion.ui.json @@ -392,6 +392,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "enabled": false }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ diff --git a/simpeg_drivers-assets/uijson/tipper_inversion.ui.json b/simpeg_drivers-assets/uijson/tipper_inversion.ui.json index 759d14b3..b62fae8e 100644 --- a/simpeg_drivers-assets/uijson/tipper_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/tipper_inversion.ui.json @@ -375,6 +375,14 @@ "tooltip": "Rotate the gradient of the regularization to align with a provided structural orientation.\nThe data should be provided as a data group in the form of either strike & dip, dip direction & dip, or x/y/z components.", "value": "" }, + "reference_model_in_smooth": { + "group": "Regularization", + "label": "Reference model in smoothness", + "value": false, + "verbose": 3, + "visible": true, + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + }, "s_norm": { "association": "Cell", "dataType": [ From 676bfb5449bcee205389eebe08fe85b45c5d3c76 Mon Sep 17 00:00:00 2001 From: domfournier Date: Tue, 29 Sep 2026 11:15:47 -0400 Subject: [PATCH 2/7] Add reference_model_in_smooth in reg and options --- simpeg_drivers/driver.py | 1 + simpeg_drivers/options.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/simpeg_drivers/driver.py b/simpeg_drivers/driver.py index 42d1a52e..88b19c55 100644 --- a/simpeg_drivers/driver.py +++ b/simpeg_drivers/driver.py @@ -753,6 +753,7 @@ def get_regularization(self): active_cells=self.models.active_cells if forward_mesh is None else None, mapping=mapping, reference_model=self.models.reference_model, + reference_model_in_smooth=self.params.reference_model_in_smooth, ) functions = self.get_modified_regularization( diff --git a/simpeg_drivers/options.py b/simpeg_drivers/options.py index 45ced345..b61bc20d 100644 --- a/simpeg_drivers/options.py +++ b/simpeg_drivers/options.py @@ -558,7 +558,7 @@ class BaseInversionOptions(CoreOptions): :param conda_environment: Name of the conda environment used to run the program :param data_object: Data object containing the survey data. :param models: Model options for the inversion. - :param regularization: Options specific to the regularization function. + :param reference_model_in_smooth: Whether to include the reference model in the smoothness term of the regularization. :param irls: Options specific to the IRLS (Iteratively Reweighted Least Squares) directive. :param directives: Additional directives to be used in the inversion. :param cooling_schedule: Options controlling the trade-off schedule between data misfit and model regularization. @@ -580,6 +580,7 @@ class BaseInversionOptions(CoreOptions): data_object: Points models: ModelOptions + reference_model_in_smooth: bool = False irls: IRLSOptions = IRLSOptions() directives: DirectiveOptions = DirectiveOptions() cooling_schedule: CoolingSceduleOptions = CoolingSceduleOptions() From 1b84395e332b2410804f3dd74d1110d34cf68078 Mon Sep 17 00:00:00 2001 From: domfournier Date: Tue, 29 Sep 2026 13:18:06 -0400 Subject: [PATCH 3/7] Fix reference_model_in_smooth for joint inversions --- simpeg_drivers/joint/driver.py | 26 ++++++++++++++++++- .../joint/joint_cross_gradient/driver.py | 5 ++++ simpeg_drivers/joint/joint_surveys/driver.py | 2 ++ simpeg_drivers/joint/options.py | 1 + 4 files changed, 33 insertions(+), 1 deletion(-) diff --git a/simpeg_drivers/joint/driver.py b/simpeg_drivers/joint/driver.py index 20fda8be..b9b560e0 100644 --- a/simpeg_drivers/joint/driver.py +++ b/simpeg_drivers/joint/driver.py @@ -252,6 +252,23 @@ def n_values(self): return self._n_values + @property + def params(self) -> BaseJointOptions: + """Application parameters.""" + return self._params + + @params.setter + def params( + self, + val: BaseJointOptions, + ): + if not isinstance( + val, + BaseJointOptions, + ): + raise TypeError("Parameters must be of type 'BaseJointOptions'.") + self._params = val + def simpeg_run(self): """Run inversion from params""" self.initialize() @@ -559,7 +576,14 @@ def _overload_regularization(self, regularization: ComboObjectiveFunction): for driver in self.drivers: reg_block = [] for mapping in driver.mapping: - reg_block.append(reg_dict[self._mapping[driver, mapping]]) + reg = reg_dict[self._mapping[driver, mapping]] + reference_model_in_smooth = driver.params.reference_model_in_smooth + + if "reference_model_in_smooth" in self.params.model_fields_set: + reference_model_in_smooth = self.params.reference_model_in_smooth + + reg.reference_model_in_smooth = reference_model_in_smooth + reg_block.append(reg) driver.regularization = ComboObjectiveFunction(objfcts=reg_block) diff --git a/simpeg_drivers/joint/joint_cross_gradient/driver.py b/simpeg_drivers/joint/joint_cross_gradient/driver.py index 512b916b..8c86c459 100644 --- a/simpeg_drivers/joint/joint_cross_gradient/driver.py +++ b/simpeg_drivers/joint/joint_cross_gradient/driver.py @@ -56,6 +56,11 @@ def get_regularization(self): for mapping in driver.mapping: self._mapping[driver, mapping] = mapping + if "reference_model_in_smooth" in self.params.model_fields_set: + driver.params.reference_model_in_smooth = ( + self.params.reference_model_in_smooth + ) + for multiplier, objfct in driver.regularization: multipliers.append(multiplier) reg_list.append(objfct) diff --git a/simpeg_drivers/joint/joint_surveys/driver.py b/simpeg_drivers/joint/joint_surveys/driver.py index b822bd91..3c467d36 100644 --- a/simpeg_drivers/joint/joint_surveys/driver.py +++ b/simpeg_drivers/joint/joint_surveys/driver.py @@ -45,6 +45,8 @@ def get_regularization(self): driver._inversion_mesh = self.inversion_mesh # pylint: disable=protected-access driver._n_values = self.models.n_active # pylint: disable=protected-access driver.mapping = self.mapping + + driver.params.reference_model_in_smooth = self.params.reference_model_in_smooth return driver.get_regularization() def validate_create_models(self): diff --git a/simpeg_drivers/joint/options.py b/simpeg_drivers/joint/options.py index 8a09f04f..ea9f9090 100644 --- a/simpeg_drivers/joint/options.py +++ b/simpeg_drivers/joint/options.py @@ -96,6 +96,7 @@ class BaseJointOptions(CoreOptions): group_c: SimPEGGroup | None = None group_c_multiplier: float | None = None + reference_model_in_smooth: bool = False irls: IRLSOptions = IRLSOptions() directives: DirectiveOptions = DirectiveOptions() cooling_schedule: CoolingSceduleOptions = CoolingSceduleOptions() From 50e6b2e8748298da1b66a9a470e530360878e88e Mon Sep 17 00:00:00 2001 From: domfournier Date: Tue, 29 Sep 2026 13:19:34 -0400 Subject: [PATCH 4/7] Change mvi_pde get_regularization --- simpeg_drivers/potential_fields/magnetic_vector_pde/inversion.py | 1 + 1 file changed, 1 insertion(+) diff --git a/simpeg_drivers/potential_fields/magnetic_vector_pde/inversion.py b/simpeg_drivers/potential_fields/magnetic_vector_pde/inversion.py index 18a2c675..e2a46a88 100644 --- a/simpeg_drivers/potential_fields/magnetic_vector_pde/inversion.py +++ b/simpeg_drivers/potential_fields/magnetic_vector_pde/inversion.py @@ -43,6 +43,7 @@ def get_regularization(self): active_cells=self.models.active_cells, mapping=mapping, reference_model=self.models.reference_model, + reference_model_in_smooth=self.params.reference_model_in_smooth, ) functions = self.get_modified_regularization( From 2e12841393fc549dc36f048d47b52da900fc37d2 Mon Sep 17 00:00:00 2001 From: domfournier Date: Tue, 29 Sep 2026 13:41:45 -0400 Subject: [PATCH 5/7] Update tests to validate new_parameter --- tests/run_tests/driver_grav_test.py | 2 ++ tests/run_tests/driver_joint_pgi_homogeneous_test.py | 11 +++++++++-- tests/run_tests/driver_joint_surveys_test.py | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/run_tests/driver_grav_test.py b/tests/run_tests/driver_grav_test.py index bc3f4bc9..ba88fd99 100644 --- a/tests/run_tests/driver_grav_test.py +++ b/tests/run_tests/driver_grav_test.py @@ -151,6 +151,7 @@ def test_gravity_run( starting_model=1e-4, topography_object=components.topography, reference_model=reference, + reference_model_in_smooth=True, sens_wts_threshold=1.0, save_sensitivities=True, ) @@ -159,6 +160,7 @@ def test_gravity_run( driver = GravityInversionDriver.start(str(tmp_path / "Inv_run.ui.json")) + assert driver.regularization.objfcts[0].reference_model_in_smooth if not pytest: return diff --git a/tests/run_tests/driver_joint_pgi_homogeneous_test.py b/tests/run_tests/driver_joint_pgi_homogeneous_test.py index 0454dafb..482a83e0 100644 --- a/tests/run_tests/driver_joint_pgi_homogeneous_test.py +++ b/tests/run_tests/driver_joint_pgi_homogeneous_test.py @@ -19,6 +19,7 @@ from geoh5py.groups.property_group import GroupTypeEnum, PropertyGroup from geoh5py.objects import Octree, Points from geoh5py.workspace import Workspace +from simpeg.regularization import PGIsmallness from simpeg_drivers.joint.joint_petrophysics.driver import JointPetrophysicsDriver from simpeg_drivers.joint.joint_petrophysics.options import JointPetrophysicsOptions @@ -56,7 +57,7 @@ # To test the full run and validate the inversion. # Move this file out of the test directory and run. -target_run = {"data_norm": 422.92317507375105, "phi_d": 2920, "phi_m": 417} +target_run = {"data_norm": 4.2090e02, "phi_d": 2.8860e03, "phi_m": 8.2700e01} INDUCING_FIELD = (50000.0, 90.0, 0.0) @@ -337,6 +338,7 @@ def test_homogeneous_run( petrophysical_model=petrophysics, initial_beta_ratio=1e2, max_global_iterations=max_iterations, + reference_model_in_smooth=True, max_irls_iterations=1, ) driver = JointPetrophysicsDriver(joint_params) @@ -352,9 +354,14 @@ def test_homogeneous_run( new_driver = MagneticInversionDriver(params) joint_params.group_b = new_driver.out_group driver = JointPetrophysicsDriver(joint_params) - driver.run() + assert all( + objfct.reference_model_in_smooth + for objfct in driver.regularization.objfcts + if not isinstance(objfct, PGIsmallness) + ) + if use_pytest: assert driver.regularization.objfcts[-1].gmm.fixed_membership[0, 1] == 1 diff --git a/tests/run_tests/driver_joint_surveys_test.py b/tests/run_tests/driver_joint_surveys_test.py index d3e01955..ff225a6c 100644 --- a/tests/run_tests/driver_joint_surveys_test.py +++ b/tests/run_tests/driver_joint_surveys_test.py @@ -213,6 +213,7 @@ def test_joint_surveys_inv_run( x_norm=0.0, y_norm=0.0, z_norm=0.0, + reference_model_in_smooth=True, lower_bound=0.0, max_global_iterations=max_iterations, initial_beta_ratio=1e-2, @@ -224,6 +225,8 @@ def test_joint_surveys_inv_run( driver = JointSurveysDriver.start(str(tmp_path / "Inv_run.ui.json")) + assert driver.regularization.objfcts[0].reference_model_in_smooth + # The rescaling is done evenly on the two tiles for both surveys np.testing.assert_allclose( driver.data_misfit.multipliers, From 1edae27fec081adce3a09086747e3c6a433f951a Mon Sep 17 00:00:00 2001 From: domfournier Date: Tue, 29 Sep 2026 14:06:43 -0400 Subject: [PATCH 6/7] Expand tests --- tests/run_tests/driver_joint_cross_gradient_test.py | 2 ++ tests/run_tests/driver_mvi_pde_test.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/tests/run_tests/driver_joint_cross_gradient_test.py b/tests/run_tests/driver_joint_cross_gradient_test.py index 81608ed9..01651b10 100644 --- a/tests/run_tests/driver_joint_cross_gradient_test.py +++ b/tests/run_tests/driver_joint_cross_gradient_test.py @@ -533,10 +533,12 @@ def test_joint_cross_gradient_rotated_run( group_b=drivers[1].out_group, group_b_multiplier=1.0, max_global_iterations=max_iterations, + reference_model_in_smooth=True, ) joint_driver = JointCrossGradientDriver(joint_params) joint_driver.run() + assert joint_driver.regularization.objfcts[0].reference_model_in_smooth assert joint_driver.models.gradient_dip is not None diff --git a/tests/run_tests/driver_mvi_pde_test.py b/tests/run_tests/driver_mvi_pde_test.py index ee197153..ba482ece 100644 --- a/tests/run_tests/driver_mvi_pde_test.py +++ b/tests/run_tests/driver_mvi_pde_test.py @@ -137,12 +137,15 @@ def test_mvi_pde_run( upper_bound=upper_bound, max_global_iterations=max_iterations, initial_beta_ratio=1e-0, + reference_model_in_smooth=True, ) params.write_ui_json(path=tmp_path / "Inv_run.ui.json") driver = MagneticVectorPDEInversionDriver(params) driver.run() + assert driver.regularization.objfcts[0].reference_model_in_smooth is True + if pytest: with Workspace(driver.params.geoh5.h5file) as ws: # Re-open the workspace and get iterations From 3271304d932a388955965c91798fc8092a0782ee Mon Sep 17 00:00:00 2001 From: domfournier Date: Tue, 29 Sep 2026 14:09:33 -0400 Subject: [PATCH 7/7] Remove duplicate article in tooltip --- .../uijson/apparent_conductivity_inversion.ui.json | 2 +- simpeg_drivers-assets/uijson/borehole_tdem_inversion.ui.json | 2 +- .../uijson/direct_current_2d_inversion.ui.json | 2 +- .../uijson/direct_current_3d_inversion.ui.json | 2 +- simpeg_drivers-assets/uijson/fdem1d_inversion.ui.json | 2 +- simpeg_drivers-assets/uijson/fdem_inversion.ui.json | 2 +- simpeg_drivers-assets/uijson/gravity_inversion.ui.json | 2 +- .../uijson/induced_polarization_2d_inversion.ui.json | 2 +- .../uijson/induced_polarization_3d_inversion.ui.json | 2 +- .../uijson/joint_cross_gradient_inversion.ui.json | 2 +- .../uijson/joint_petrophysics_inversion.ui.json | 2 +- simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json | 2 +- simpeg_drivers-assets/uijson/magnetic_scalar_inversion.ui.json | 2 +- simpeg_drivers-assets/uijson/magnetic_vector_inversion.ui.json | 2 +- .../uijson/magnetic_vector_pde_inversion.ui.json | 2 +- simpeg_drivers-assets/uijson/magnetotellurics_inversion.ui.json | 2 +- simpeg_drivers-assets/uijson/tdem1d_inversion.ui.json | 2 +- simpeg_drivers-assets/uijson/tdem_inversion.ui.json | 2 +- simpeg_drivers-assets/uijson/tipper_inversion.ui.json | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/simpeg_drivers-assets/uijson/apparent_conductivity_inversion.ui.json b/simpeg_drivers-assets/uijson/apparent_conductivity_inversion.ui.json index 5b2b26bc..a6c3cc23 100644 --- a/simpeg_drivers-assets/uijson/apparent_conductivity_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/apparent_conductivity_inversion.ui.json @@ -287,7 +287,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/borehole_tdem_inversion.ui.json b/simpeg_drivers-assets/uijson/borehole_tdem_inversion.ui.json index 7afc31be..073c3052 100644 --- a/simpeg_drivers-assets/uijson/borehole_tdem_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/borehole_tdem_inversion.ui.json @@ -364,7 +364,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/direct_current_2d_inversion.ui.json b/simpeg_drivers-assets/uijson/direct_current_2d_inversion.ui.json index b179b894..5688b8b1 100644 --- a/simpeg_drivers-assets/uijson/direct_current_2d_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/direct_current_2d_inversion.ui.json @@ -322,7 +322,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/direct_current_3d_inversion.ui.json b/simpeg_drivers-assets/uijson/direct_current_3d_inversion.ui.json index 53ffe699..afb094ec 100644 --- a/simpeg_drivers-assets/uijson/direct_current_3d_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/direct_current_3d_inversion.ui.json @@ -285,7 +285,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/fdem1d_inversion.ui.json b/simpeg_drivers-assets/uijson/fdem1d_inversion.ui.json index 542e7062..510beca1 100644 --- a/simpeg_drivers-assets/uijson/fdem1d_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/fdem1d_inversion.ui.json @@ -317,7 +317,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "gradient_rotation": "", "s_norm": { diff --git a/simpeg_drivers-assets/uijson/fdem_inversion.ui.json b/simpeg_drivers-assets/uijson/fdem_inversion.ui.json index c95a702c..73032864 100644 --- a/simpeg_drivers-assets/uijson/fdem_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/fdem_inversion.ui.json @@ -353,7 +353,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/gravity_inversion.ui.json b/simpeg_drivers-assets/uijson/gravity_inversion.ui.json index 96a9cb42..fdcc5fd1 100644 --- a/simpeg_drivers-assets/uijson/gravity_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/gravity_inversion.ui.json @@ -551,7 +551,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/induced_polarization_2d_inversion.ui.json b/simpeg_drivers-assets/uijson/induced_polarization_2d_inversion.ui.json index a854334b..8b01d0f4 100644 --- a/simpeg_drivers-assets/uijson/induced_polarization_2d_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/induced_polarization_2d_inversion.ui.json @@ -336,7 +336,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/induced_polarization_3d_inversion.ui.json b/simpeg_drivers-assets/uijson/induced_polarization_3d_inversion.ui.json index 10f750de..499f76d3 100644 --- a/simpeg_drivers-assets/uijson/induced_polarization_3d_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/induced_polarization_3d_inversion.ui.json @@ -305,7 +305,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/joint_cross_gradient_inversion.ui.json b/simpeg_drivers-assets/uijson/joint_cross_gradient_inversion.ui.json index 86eb0720..2f8a9b6a 100644 --- a/simpeg_drivers-assets/uijson/joint_cross_gradient_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/joint_cross_gradient_inversion.ui.json @@ -249,7 +249,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "min": 0.0, diff --git a/simpeg_drivers-assets/uijson/joint_petrophysics_inversion.ui.json b/simpeg_drivers-assets/uijson/joint_petrophysics_inversion.ui.json index 41ae6241..e8bea3c8 100644 --- a/simpeg_drivers-assets/uijson/joint_petrophysics_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/joint_petrophysics_inversion.ui.json @@ -195,7 +195,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "min": 0.0, diff --git a/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json b/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json index 3c3546ff..3df4c714 100644 --- a/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/joint_surveys_inversion.ui.json @@ -287,7 +287,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/magnetic_scalar_inversion.ui.json b/simpeg_drivers-assets/uijson/magnetic_scalar_inversion.ui.json index e69b0725..7c8404ea 100644 --- a/simpeg_drivers-assets/uijson/magnetic_scalar_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/magnetic_scalar_inversion.ui.json @@ -582,7 +582,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/magnetic_vector_inversion.ui.json b/simpeg_drivers-assets/uijson/magnetic_vector_inversion.ui.json index b177cb69..23154702 100644 --- a/simpeg_drivers-assets/uijson/magnetic_vector_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/magnetic_vector_inversion.ui.json @@ -639,7 +639,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/magnetic_vector_pde_inversion.ui.json b/simpeg_drivers-assets/uijson/magnetic_vector_pde_inversion.ui.json index ec0d8664..9865b672 100644 --- a/simpeg_drivers-assets/uijson/magnetic_vector_pde_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/magnetic_vector_pde_inversion.ui.json @@ -421,7 +421,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/magnetotellurics_inversion.ui.json b/simpeg_drivers-assets/uijson/magnetotellurics_inversion.ui.json index 51b61718..e1adeb5f 100644 --- a/simpeg_drivers-assets/uijson/magnetotellurics_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/magnetotellurics_inversion.ui.json @@ -501,7 +501,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/tdem1d_inversion.ui.json b/simpeg_drivers-assets/uijson/tdem1d_inversion.ui.json index 3608cecc..245ab975 100644 --- a/simpeg_drivers-assets/uijson/tdem1d_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/tdem1d_inversion.ui.json @@ -290,7 +290,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "gradient_rotation": "", "s_norm": { diff --git a/simpeg_drivers-assets/uijson/tdem_inversion.ui.json b/simpeg_drivers-assets/uijson/tdem_inversion.ui.json index e432e049..d1503386 100644 --- a/simpeg_drivers-assets/uijson/tdem_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/tdem_inversion.ui.json @@ -398,7 +398,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell", diff --git a/simpeg_drivers-assets/uijson/tipper_inversion.ui.json b/simpeg_drivers-assets/uijson/tipper_inversion.ui.json index b62fae8e..bf9584e1 100644 --- a/simpeg_drivers-assets/uijson/tipper_inversion.ui.json +++ b/simpeg_drivers-assets/uijson/tipper_inversion.ui.json @@ -381,7 +381,7 @@ "value": false, "verbose": 3, "visible": true, - "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from the a reference model" + "tooltip": "Whether to subtract the reference model before computing the smoothness terms (x, y and z). \nThis is useful for preserving sharp contrasts from a reference model" }, "s_norm": { "association": "Cell",