SimPEG.regularization.BaseRegularization#
- class SimPEG.regularization.BaseRegularization(mesh: RegularizationMesh | BaseMesh, active_cells: np.ndarray | None = None, mapping: maps.IdentityMap | None = None, reference_model: np.ndarray | None = None, units: str | None = None, weights: dict | None = None, **kwargs)[source]#
Bases:
BaseObjectiveFunction
Base regularization class.
The
BaseRegularization
class defines properties and methods inherited by SimPEG regularization classes, and is not directly used to construct inversions.- Parameters:
- mesh
SimPEG.regularization.RegularizationMesh
,discretize.base.BaseMesh
Mesh on which the regularization is discretized. This is not necessarily the same as the mesh on which the simulation is defined.
- active_cells
None
, (n_cells
, )numpy.ndarray
of
bool Boolean array defining the set of
RegularizationMesh
cells that are active in the inversion. IfNone
, all cells are active.- mapping
None
,SimPEG.maps.BaseMap
The mapping from the model parameters to the active cells in the inversion. If
None
, the mapping is set toSimPEG.maps.IdentityMap
.- reference_model
None
, (n_param
, )numpy.ndarray
Reference model. If
None
, the reference model in the inversion is set to the starting model.- units
None
,str
Units for the model parameters. Some regularization classes behave differently depending on the units; e.g. ‘radian’.
- weights
None
,dict
Weight multipliers to customize the least-squares function. Each value is a numpy.ndarray of shape(:py:property:`~.regularization.RegularizationMesh.n_cells`, ).
- mesh
Attributes
Weighting matrix.
Active cells defined on the regularization mesh.
Deprecated property for 'volume' and user defined weights.
active_cells.indActive has been deprecated.
Mapping from the inversion model parameters to the regularization mesh.
The model parameters.
reference_model.mref has been deprecated.
The parent objective function
Reference model.
regularization_mesh.regmesh has been deprecated.
Regularization mesh.
Units for the model parameters.
Methods
__call__
(m)Evaluate the regularization function for the model provided.
deriv
(m)Gradient of the regularization function evaluated for the model provided.
deriv2
(m[, v])Hessian of the regularization function evaluated for the model provided.
f_m
(m)Not implemented for
BaseRegularization
class.f_m_deriv
(m)Not implemented for
BaseRegularization
class.get_weights
(key)Cell weights for a given key.
remove_weights
(key)Removes the weights for the key provided.
set_weights
(**weights)Adds (or updates) the specified weights to the regularization.
Galleries and Tutorials using SimPEG.regularization.BaseRegularization
#
Method of Equivalent Sources for Removing VRM Responses
Cross-gradient Joint Inversion of Gravity and Magnetic Anomaly Data