Directives (SimPEG.directives)#

Directives are classes that allow us to control the inversion, perform tasks between iterations, save information about our inversion process and more. Directives are passed to the SimPEG.inversion.BaseInversion class through the directiveList argument. The tasks specified through the directives are executed after each inversion iteration, following the same order as in which they are passed in the directiveList.

Although you can write your own directive classes and plug them into your inversion, we provide a set of useful directive classes that cover a wide range of applications:

General purpose directives#

AlphasSmoothEstimate_ByEig([alpha0_ratio, ...])

Estimate the alphas multipliers for the smoothness terms of the regularization as a multiple of the ratio between the highest eigenvalue of the smallness term and the highest eigenvalue of each smoothness term of the regularization.

BetaEstimateMaxDerivative([beta0_ratio, seed])

Estimate initial trade-off parameter (beta) using largest derivatives.

BetaEstimate_ByEig([beta0_ratio, n_pw_iter, ...])

Estimate initial trade-off parameter (beta) by power iteration.

BetaSchedule([coolingFactor, coolingRate])

Reduce trade-off parameter (beta) at successive iterations using a cooling schedule.

JointScalingSchedule([warmingFactor, ...])

For multiple data misfits only: rebalance each data misfit term during the inversion when some datasets are fit, and others not using the ratios of current misfits and their respective target.

MultiTargetMisfits([WeightsInTarget, ...])

Attributes

ProjectSphericalBounds([inversion, dmisfit, ...])

Trick for spherical coordinate system.

ScalingMultipleDataMisfits_ByEig([...])

For multiple data misfits only: multiply each data misfit term by the inverse of its highest eigenvalue and then normalize the sum of the data misfit multipliers to one.

TargetMisfit([target, phi_d_star, chifact])

.

UpdatePreconditioner([update_every_iteration])

Create a Jacobi preconditioner for the linear problem

UpdateSensitivityWeights([every_iteration, ...])

Sensitivity weighting for linear and non-linear least-squares inverse problems.

Update_Wj([k, itr])

Create approx-sensitivity base weighting using the probing method

Directives to save inversion results#

SaveEveryIteration([directory, name])

This directive saves an array at each iteration.

SaveModelEveryIteration([directory, name])

This directive saves the model as a numpy array at each iteration.

SaveOutputDictEveryIteration([saveOnDisk])

Saves inversion parameters at every iteration.

SaveOutputEveryIteration([save_txt])

Attributes

Base directive classes#

The InversionDirective class defines the basic class for all directives. Inherit from this class when writing your own directive. The DirectiveList is used under the hood to handle the execution of all directives passed to the SimPEG.inversion.BaseInversion.

InversionDirective([inversion, dmisfit, ...])

Base inversion directive class.

DirectiveList(*directives[, inversion, debug])

Directives list