InvProblem¶
-
class
SimPEG.inverse_problem.
BaseInvProblem
(dmisfit, reg, opt)[source]¶ Bases:
SimPEG.props.BaseSimPEG
Optional Properties:
model (
Model
): Inversion model., a numpy array of <class ‘float’>, <class ‘int’> with shape (*, *) or (*)
-
beta
= 1.0¶ Trade-off parameter
-
debug
= False¶ Print debugging information
-
counter
= None¶ Set this to a SimPEG.utils.Counter() if you want to count things
-
deleteTheseOnModelUpdate
= []¶ List of strings, e.g. [‘_MeSigma’, ‘_MeSigmaI’]
-
property
model
¶ model (
Model
): Inversion model., a numpy array of <class ‘float’>, <class ‘int’> with shape (*, *) or (*)
-
dmisfit
= None¶ DataMisfit
-
reg
= None¶ Regularization
-
opt
= None¶ Optimization program
-
startup
(m0)[source]¶ Called when inversion is first starting.
If you have things that also need to run in the method startup, you can create a method:
def _startup*(self, ... ): pass
Where the * can be any string. If present, _startup* will be called at the start of the default startup call. You may also completely overwrite this function.
-
property
warmstart
¶
Inversion¶
Directives¶
-
class
SimPEG.directives.
InversionDirective
(*args, **kwargs)[source]¶ Bases:
properties.base.base.HasProperties
-
debug
= False¶ Print debugging information
-
property
inversion
¶ This is the inversion of the InversionDirective instance.
-
property
invProb
¶
-
property
opt
¶
-
property
reg
¶
-
property
dmisfit
¶
-
property
survey
¶ Assuming that dmisfit is always a ComboObjectiveFunction, return a list of surveys for each dmisfit [survey1, survey2, … ]
-
property
simulation
¶ Assuming that dmisfit is always a ComboObjectiveFunction, return a list of problems for each dmisfit [prob1, prob2, …]
-
property
prob
¶ simulation.prob has been deprecated. See simulation for documentation
-
-
class
SimPEG.directives.
DirectiveList
(*directives, **kwargs)[source]¶ Bases:
object
-
dList
= None¶ The list of Directives
-
property
debug
¶
-
property
inversion
¶ This is the inversion of the InversionDirective instance.
-
-
class
SimPEG.directives.
BetaEstimate_ByEig
(*args, **kwargs)[source]¶ Bases:
SimPEG.directives.InversionDirective
BetaEstimate
-
beta0
= None¶ The initial Beta (regularization parameter)
-
beta0_ratio
= 100.0¶ estimateBeta0 is used with this ratio
-
initialize
()[source]¶ The initial beta is calculated by comparing the estimated eigenvalues of JtJ and WtW. To estimate the eigenvector of A, we will use one iteration of the Power Method:
\[\mathbf{x_1 = A x_0}\]Given this (very course) approximation of the eigenvector, we can use the Rayleigh quotient to approximate the largest eigenvalue.
\[\lambda_0 = \frac{\mathbf{x^\top A x}}{\mathbf{x^\top x}}\]We will approximate the largest eigenvalue for both JtJ and WtW, and use some ratio of the quotient to estimate beta0.
\[\beta_0 = \gamma \frac{\mathbf{x^\top J^\top J x}}{\mathbf{x^\top W^\top W x}}\]- Return type
- Returns
beta0
-
-
class
SimPEG.directives.
BetaSchedule
(*args, **kwargs)[source]¶ Bases:
SimPEG.directives.InversionDirective
-
coolingFactor
= 8.0¶
-
coolingRate
= 3¶
-
-
class
SimPEG.directives.
TargetMisfit
(*args, **kwargs)[source]¶ Bases:
SimPEG.directives.InversionDirective
… note:: Currently the target misfit is not set up for joint inversions. Get in touch if you would like to help with the upgrade!
-
chifact
= 1.0¶
-
phi_d_star
= None¶
-
property
target
¶
-
-
class
SimPEG.directives.
SaveEveryIteration
(*args, **kwargs)[source]¶ Bases:
SimPEG.directives.InversionDirective
This directive saves an array at each iteration. The default directory is the current directoy and the models are saved as
InversionModel-YYYY-MM-DD-HH-MM-iter.npy
Required Properties:
directory (
String
): directory to save results in, a unicode string, Default: .name (
String
): root of the filename to be saved, a unicode string, Default: InversionModel
-
property
name
¶ name (
String
): root of the filename to be saved, a unicode string, Default: InversionModel
-
property
fileName
¶
-
class
SimPEG.directives.
SaveModelEveryIteration
(*args, **kwargs)[source]¶ Bases:
SimPEG.directives.SaveEveryIteration
This directive saves the model as a numpy array at each iteration. The default directory is the current directoy and the models are saved as
InversionModel-YYYY-MM-DD-HH-MM-iter.npy
Required Properties:
-
class
SimPEG.directives.
SaveOutputEveryIteration
(*args, **kwargs)[source]¶ Bases:
SimPEG.directives.SaveEveryIteration
Required Properties:
directory (
String
): directory to save results in, a unicode string, Default: .name (
String
): root of the filename to be saved, a unicode string, Default: InversionModel
-
header
= None¶
-
save_txt
= True¶
-
beta
= None¶
-
phi_d
= None¶
-
phi_m
= None¶
-
phi_m_small
= None¶
-
phi_m_smooth_x
= None¶
-
phi_m_smooth_y
= None¶
-
phi_m_smooth_z
= None¶
-
phi
= None¶
-
class
SimPEG.directives.
SaveOutputDictEveryIteration
(*args, **kwargs)[source]¶ Bases:
SimPEG.directives.SaveEveryIteration
Saves inversion parameters at every iteration.
Required Properties:
directory (
String
): directory to save results in, a unicode string, Default: .name (
String
): root of the filename to be saved, a unicode string, Default: InversionModel
-
outDict
= None¶
-
saveOnDisk
= False¶
-
class
SimPEG.directives.
Update_IRLS
(*args, **kwargs)[source]¶ Bases:
SimPEG.directives.InversionDirective
Required Properties:
beta_search (
Boolean
): Do a beta serarch, a boolean, Default: FalsecoolingFactor (
Float
): Cooling factor, a float, Default: 2.0coolingRate (
Integer
): Cooling rate, an integer, Default: 1max_irls_iterations (
Integer
): maximum irls iterations, an integer, Default: 20update_beta (
Boolean
): Update beta, a boolean, Default: True
-
f_old
= 0¶
-
f_min_change
= 0.01¶
-
beta_tol
= 0.1¶
-
beta_ratio_l2
= None¶
-
prctile
= 100¶
-
chifact_start
= 1.0¶
-
chifact_target
= 1.0¶
-
irls_iteration
= 0¶
-
minGNiter
= 1¶
-
property
max_irls_iterations
¶ max_irls_iterations (
Integer
): maximum irls iterations, an integer, Default: 20
-
iterStart
= 0¶
-
sphericalDomain
= False¶
-
ComboObjFun
= False¶
-
mode
= 1¶
-
coolEpsOptimized
= True¶
-
coolEps_p
= True¶
-
coolEps_q
= True¶
-
floorEps_p
= 1e-08¶
-
floorEps_q
= 1e-08¶
-
coolEpsFact
= 1.2¶
-
silent
= False¶
-
fix_Jmatrix
= False¶
-
property
maxIRLSiters
¶ maxIRLSiters has been deprecated. See max_irls_iterations for documentation
-
property
updateBeta
¶ updateBeta has been deprecated. See update_beta for documentation
-
property
betaSearch
¶ betaSearch has been deprecated. See beta_search for documentation
-
property
target
¶
-
property
start
¶
-
class
SimPEG.directives.
UpdatePreconditioner
(*args, **kwargs)[source]¶ Bases:
SimPEG.directives.InversionDirective
Create a Jacobi preconditioner for the linear problem
-
update_every_iteration
= True¶ Update every iterations if False
-
-
class
SimPEG.directives.
Update_Wj
(*args, **kwargs)[source]¶ Bases:
SimPEG.directives.InversionDirective
Create approx-sensitivity base weighting using the probing method
-
k
= None¶
-
itr
= None¶
-
-
class
SimPEG.directives.
UpdateSensitivityWeights
(*args, **kwargs)[source]¶ Bases:
SimPEG.directives.InversionDirective
Directive to take care of re-weighting the non-linear magnetic problems.
-
mapping
= None¶
-
JtJdiag
= None¶
-
everyIter
= True¶
-
threshold
= 1e-12¶
-
switch
= True¶
-
-
class
SimPEG.directives.
ProjectSphericalBounds
(*args, **kwargs)[source]¶ Bases:
SimPEG.directives.InversionDirective
Trick for spherical coordinate system. Project heta and phi angles back to [-pi,pi] using back and forth conversion. spherical->cartesian->spherical