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
4 changes: 2 additions & 2 deletions SimPEG/regularization/tikhonov.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tutorials/05-dcr/plot_inv_2_dcr2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

#######################################################################
Expand Down
2 changes: 1 addition & 1 deletion tutorials/05-dcr/plot_inv_2_dcr2d_irls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

#######################################################################
Expand Down
11 changes: 3 additions & 8 deletions tutorials/05-dcr/plot_inv_3_dcr3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

#################################################################
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions tutorials/06-ip/plot_inv_2_dcip2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

#######################################################################
Expand Down Expand Up @@ -525,7 +525,8 @@
survey=ip_survey,
etaMap=chargeability_map,
sigma=conductivity_map * recovered_conductivity_model,
Solver=Solver,
solver=Solver,
storeJ=True,
)

#####################################################
Expand Down
15 changes: 6 additions & 9 deletions tutorials/06-ip/plot_inv_3_dcip3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

#################################################################
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -595,7 +590,8 @@
survey=ip_survey,
etaMap=chargeability_map,
sigma=conductivity_map * recovered_conductivity_model,
Solver=Solver,
solver=Solver,
storeJ=True,
)

#################################################
Expand Down Expand Up @@ -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
# ----------------------------------------------------
Expand Down