diff --git a/SimPEG/regularization/tikhonov.py b/SimPEG/regularization/tikhonov.py index 2371f55205..d6b6ba1824 100755 --- a/SimPEG/regularization/tikhonov.py +++ b/SimPEG/regularization/tikhonov.py @@ -54,7 +54,7 @@ def W(self): Weighting matrix """ if self.cell_weights is not None: - return utils.sdiag(np.sqrt(self.cell_weights)) + return utils.sdiag(np.sqrt(self.cell_weights * self.regmesh.vol)) elif self._nC_residual != "*": return sp.eye(self._nC_residual) else: @@ -122,7 +122,7 @@ def W(self): ) if self.cell_weights is not None: - W = utils.sdiag((Ave * (self.cell_weights)) ** 0.5) * W + W = utils.sdiag((Ave * (self.cell_weights * self.regmesh.vol)) ** 0.5) * W else: W = utils.sdiag((Ave * self.regmesh.vol) ** 0.5) * W diff --git a/tutorials/05-dcr/plot_inv_2_dcr2d.py b/tutorials/05-dcr/plot_inv_2_dcr2d.py index 2d1901ed58..f1e5514c4b 100644 --- a/tutorials/05-dcr/plot_inv_2_dcr2d.py +++ b/tutorials/05-dcr/plot_inv_2_dcr2d.py @@ -270,7 +270,7 @@ # Define the problem. Define the cells below topography and the mapping simulation = dc.simulation_2d.Simulation2DNodal( - mesh, survey=survey, sigmaMap=conductivity_map, Solver=Solver + mesh, survey=survey, sigmaMap=conductivity_map, solver=Solver, storeJ=True ) ####################################################################### diff --git a/tutorials/05-dcr/plot_inv_2_dcr2d_irls.py b/tutorials/05-dcr/plot_inv_2_dcr2d_irls.py index b2890d9aa7..f57697335c 100644 --- a/tutorials/05-dcr/plot_inv_2_dcr2d_irls.py +++ b/tutorials/05-dcr/plot_inv_2_dcr2d_irls.py @@ -275,7 +275,7 @@ # Define the problem. Define the cells below topography and the mapping simulation = dc.simulation_2d.Simulation2DNodal( - mesh, survey=survey, sigmaMap=conductivity_map, Solver=Solver + mesh, survey=survey, sigmaMap=conductivity_map, solver=Solver, storeJ=True ) ####################################################################### diff --git a/tutorials/05-dcr/plot_inv_3_dcr3d.py b/tutorials/05-dcr/plot_inv_3_dcr3d.py index 6a402030db..f5ec005de1 100644 --- a/tutorials/05-dcr/plot_inv_3_dcr3d.py +++ b/tutorials/05-dcr/plot_inv_3_dcr3d.py @@ -276,7 +276,7 @@ # dc_simulation = dc.simulation.Simulation3DNodal( - mesh, survey=dc_survey, sigmaMap=conductivity_map, Solver=Solver + mesh, survey=dc_survey, sigmaMap=conductivity_map, solver=Solver, storeJ=True ) ################################################################# @@ -300,13 +300,7 @@ # Define the regularization (model objective function) dc_regularization = regularization.Simple( - mesh, - indActive=ind_active, - mref=starting_conductivity_model, - alpha_s=1e-2, - alpha_x=1, - alpha_y=1, - alpha_z=1, + mesh, indActive=ind_active, mref=starting_conductivity_model, ) dc_regularization.mrefInSmooth = True # Include reference model in smoothness @@ -468,6 +462,7 @@ ax2, cmap=mpl.cm.viridis, norm=norm, orientation="vertical", format="$10^{%.1f}$" ) cbar.set_label("Conductivity [S/m]", rotation=270, labelpad=15, size=12) +plt.show() ####################################################################### # Plotting Normalized Data Misfit or Predicted DC Data diff --git a/tutorials/06-ip/plot_inv_2_dcip2d.py b/tutorials/06-ip/plot_inv_2_dcip2d.py index 46314faf6f..0eebb73918 100644 --- a/tutorials/06-ip/plot_inv_2_dcip2d.py +++ b/tutorials/06-ip/plot_inv_2_dcip2d.py @@ -287,7 +287,7 @@ # Define the problem. Define the cells below topography and the mapping dc_simulation = dc.simulation_2d.Simulation2DNodal( - mesh, survey=dc_survey, sigmaMap=conductivity_map, Solver=Solver + mesh, survey=dc_survey, sigmaMap=conductivity_map, solver=Solver, storeJ=True ) ####################################################################### @@ -525,7 +525,8 @@ survey=ip_survey, etaMap=chargeability_map, sigma=conductivity_map * recovered_conductivity_model, - Solver=Solver, + solver=Solver, + storeJ=True, ) ##################################################### diff --git a/tutorials/06-ip/plot_inv_3_dcip3d.py b/tutorials/06-ip/plot_inv_3_dcip3d.py index d9aca81754..4e48fdc1d7 100644 --- a/tutorials/06-ip/plot_inv_3_dcip3d.py +++ b/tutorials/06-ip/plot_inv_3_dcip3d.py @@ -325,7 +325,7 @@ # dc_simulation = dc.simulation.Simulation3DNodal( - mesh, survey=dc_survey, sigmaMap=conductivity_map, Solver=Solver + mesh, survey=dc_survey, sigmaMap=conductivity_map, solver=Solver, storeJ=True ) ################################################################# @@ -349,13 +349,7 @@ # Define the regularization (model objective function) dc_regularization = regularization.Simple( - mesh, - indActive=ind_active, - mref=starting_conductivity_model, - alpha_s=0.01, - alpha_x=1, - alpha_y=1, - alpha_z=1, + mesh, indActive=ind_active, mref=starting_conductivity_model, ) dc_regularization.mrefInSmooth = True # Include reference model in smoothness @@ -509,6 +503,7 @@ ax2, cmap=mpl.cm.viridis, norm=norm, orientation="vertical", format="$10^{%.1f}$" ) cbar.set_label("Conductivity [S/m]", rotation=270, labelpad=15, size=12) +plt.show() ####################################################################### # Plotting Normalized Data Misfit or Predicted DC Data @@ -595,7 +590,8 @@ survey=ip_survey, etaMap=chargeability_map, sigma=conductivity_map * recovered_conductivity_model, - Solver=Solver, + solver=Solver, + storeJ=True, ) ################################################# @@ -744,6 +740,7 @@ ) cbar.set_label("Intrinsic Chargeability [V/V]", rotation=270, labelpad=15, size=12) +plt.show() ########################################################## # Plotting Normalized Data Misfit or Predicted IP Data # ----------------------------------------------------