InvProblem

class SimPEG.InvProblem.BaseInvProblem(dmisfit, reg, opt)

Bases: SimPEG.Props.BaseSimPEG

Optional Properties:

  • model (Model): Inversion model., a numpy array of <type ‘float’>, <type ‘int’> with shape (*) or (*, *)
beta = 1.0
counter = None
debug = False
deleteTheseOnModelUpdate = []
dmisfit = None
evalFunction(m, return_g=True, return_H=True)
getFields(m, store=False, deleteWarmstart=True)
get_dpred(m, f)
model

model (Model) – Inversion model., a numpy array of <type ‘float’>, <type ‘int’> with shape (*) or (*, *)

opt = None
reg = None
startup(m0)

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.

warmstart

Inversion

class SimPEG.Inversion.BaseInversion(invProb, directiveList=None, **kwargs)

Bases: object

Inversion Class

counter = None
debug = False
directiveList
name = 'BaseInversion'
run(m0)

Runs the inversion!

Directives

class SimPEG.Directives.BetaEstimate_ByEig(**kwargs)

Bases: SimPEG.Directives.InversionDirective

BetaEstimate

beta0 = None
beta0_ratio = 100.0
initialize()

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:float
Returns:beta0
class SimPEG.Directives.BetaSchedule(**kwargs)

Bases: SimPEG.Directives.InversionDirective

coolingFactor = 8.0
coolingRate = 3
endIter()
class SimPEG.Directives.DirectiveList(*directives, **kwargs)

Bases: object

call(ruleType)
dList = None
debug
inversion

This is the inversion of the InversionDirective instance.

validate()
class SimPEG.Directives.InversionDirective(**kwargs)

Bases: object

debug = False
dmisfit
endIter()
finish()
initialize()
invProb
inversion

This is the inversion of the InversionDirective instance.

opt
prob

Assuming that dmisfit is always a ComboObjectiveFunction, return a list of problems for each dmisfit [prob1, prob2, ...]

reg
survey

Assuming that dmisfit is always a ComboObjectiveFunction, return a list of surveys for each dmisfit [survey1, survey2, ... ]

validate(directiveList=None)
class SimPEG.Directives.SaveEveryIteration(**kwargs)

Bases: SimPEG.Directives.InversionDirective

fileName
name
class SimPEG.Directives.SaveModelEveryIteration(**kwargs)

Bases: SimPEG.Directives.SaveEveryIteration

endIter()
initialize()
class SimPEG.Directives.SaveOutputDictEveryIteration(**kwargs)

Bases: SimPEG.Directives.SaveEveryIteration

Saves inversion parameters at every iteraion.

endIter()
initialize()
outDict = {}
saveOnDisk = False
class SimPEG.Directives.SaveOutputEveryIteration(**kwargs)

Bases: SimPEG.Directives.SaveEveryIteration

SaveModelEveryIteration

beta = None
endIter()
header = None
initialize()
load_results()
phi = 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
plot_misfit_curves(fname=None, plot_small_smooth=False)
plot_tikhonov_curves(fname=None, dpi=200)
save_txt = True
class SimPEG.Directives.TargetMisfit(**kwargs)

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
endIter()
phi_d_star = None
target
class SimPEG.Directives.UpdatePreconditioner(**kwargs)

Bases: SimPEG.Directives.InversionDirective

Create a Jacobi preconditioner for the linear problem

ComboObjFun = False
endIter()
initialize()
mapping = None
onlyOnStart = False
class SimPEG.Directives.UpdateSensitivityWeights(**kwargs)

Bases: SimPEG.Directives.InversionDirective

Directive to take care of re-weighting the non-linear magnetic problems.

JtJdiag = None
endIter()
everyIter = True
getJtJdiag()

Compute explicitely the main diagonal of JtJ Good for any problem where J is formed explicitely

getWr()

Take the diagonal of JtJ and return a normalized sensitivty weighting vector

initialize()
mapping = None
switch = True
threshold = 1e-12
update()
updateOpt()

Update a copy of JtJdiag to optimization for preconditioner

updateReg()

Update the cell weights with the approximated sensitivity

class SimPEG.Directives.Update_IRLS(**kwargs)

Bases: SimPEG.Directives.InversionDirective

ComboObjFun = False
IRLSiter = 0
betaSearch = True
beta_ratio_l2 = None
beta_tol = 0.1
chifact_start = 1.0
chifact_target = 1.0
coolEpsFact = 1.2
coolEpsOptimized = True
coolEps_p = True
coolEps_q = True
coolingFactor = 2.0
coolingRate = 1
endIter()
f_min_change = 0.01
f_old = 0
fix_Jmatrix = False
floorEps_p = 1e-08
floorEps_q = 1e-08
initialize()
iterStart = 0
maxIRLSiter = 20
minGNiter = 1
mode = 1
prctile = 100
silent = False
sphericalDomain = False
start
startIRLS()
target
updateBeta = True
updateGamma = False
validate(directiveList)
class SimPEG.Directives.Update_Wj(**kwargs)

Bases: SimPEG.Directives.InversionDirective

Create approx-sensitivity base weighting using the probing method

endIter()
itr = None
k = None