From 5797fa41101fc3693340dd9176e518812790e755 Mon Sep 17 00:00:00 2001 From: rowanc1 Date: Tue, 14 Jan 2014 12:22:58 -0800 Subject: [PATCH] Get DC inversion working with the changes in the data class. --- SimPEG/examples/DC.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SimPEG/examples/DC.py b/SimPEG/examples/DC.py index ad98d6c2..4fcb68f6 100644 --- a/SimPEG/examples/DC.py +++ b/SimPEG/examples/DC.py @@ -203,7 +203,7 @@ if __name__ == '__main__': problem = DCProblem(mesh) problem.P = P problem.RHS = q - dobs, Wd = problem.createSyntheticData(mSynth, std=0.05) + data = problem.createSyntheticData(mSynth, std=0.05) u = problem.field(mSynth) u = problem.reshapeFields(u) @@ -211,13 +211,13 @@ if __name__ == '__main__': # plt.show() # Now set up the problem to do some minimization - problem.dobs = dobs - problem.std = dobs*0 + 0.05 + # problem.dobs = dobs + # problem.std = dobs*0 + 0.05 m0 = mesh.gridCC[:,0]*0+sig2 opt = inverse.InexactGaussNewton(maxIterLS=20, maxIter=10, tolF=1e-6, tolX=1e-6, tolG=1e-6, maxIterCG=6) reg = inverse.Regularization(mesh) - inv = inverse.Inversion(problem, reg, opt, beta0=1e4) + inv = inverse.Inversion(problem, reg, opt, data, beta0=1e4) # Check Derivative derChk = lambda m: [inv.dataObj(m), inv.dataObjDeriv(m)]