In [2]:
from SimPEG import *
import simpegEM as EM
from simpegem1d import Utils1D
%pylab inline


Populating the interactive namespace from numpy and matplotlib

In [3]:
mesh3D = Utils.meshutils.readUBCTensorMesh('mesh.msh')
sigma3D = Utils.meshutils.readUBCTensorModel('sigma_realistic.con', mesh3D)

In [4]:
x2 = np.arange(30)*10 + 10.
y2 = np.arange(30)*10 - 150.
xyz2 = Utils.ndgrid(x2, y2, np.r_[0.])
xc2 = 150
yc2 = 0.
r2 = np.sqrt((xyz2[:,0]-xc2)**2+(xyz2[:,1]-yc2)**2)

In [7]:
frequency = np.r_[1., 10., 100.]
ind = np.argwhere(xyz2[:,1]==0.).flatten()

In [8]:
dobs = np.load('bzobs_FD_realistic.npy')
Dobs = dobs.reshape((900, 2, frequency.size, 2), order='F')
Dobsr1 = Dobs[:,0,:,0]
Dobsi1 = Dobs[:,1,:,0]
Dobsr2 = Dobs[:,0,:,1]
Dobsi2 = Dobs[:,1,:,1]
DobsLine = Utils.mkvc(Dobs[ind,:,:,:])
np.save('bzobs_FD_realistic_line', DobsLine)

In [6]:
meshType = 'CYL'
cs, ncx, ncz, npad = 20., 25, 30, 12
hx = [(cs,ncx), (cs,npad,1.3)]
hz = [(cs,npad,-1.4), (cs,ncz), (cs,npad,1.4)]
mesh = Mesh.CylMesh([hx,1,hz], '00C')

In [7]:
active = mesh.vectorCCz<0.
layer1 = (mesh.vectorCCz<0.) & (mesh.vectorCCz>=-60.)
layer2 = (mesh.vectorCCz<-60) & (mesh.vectorCCz>=-100.)
layer3 = (mesh.vectorCCz<-100) & (mesh.vectorCCz>=-200.)
actMap = Maps.ActiveCells(mesh, active, np.log(1e-8), nC=mesh.nCz)
mapping = Maps.ExpMap(mesh) * Maps.Vertical1DMap(mesh) * actMap

In [8]:
sig_half = 1e-3
sig_air = 1e-8
sig_layer1 = 1./300
sig_layer2 = 1./100
sig_layer3 = 1./10
sigma = np.ones(mesh.nCz)*sig_air
sigma[active] = sig_half
sigma[layer1] = sig_layer1
sigma[layer2] = sig_layer2
sigma[layer3] = sig_layer3
mtrue = np.log(sigma[active])

In [11]:
def circfun(xc, yc, r, npoint):
    theta = np.linspace(np.pi, -np.pi, npoint)
    x = r*np.cos(theta)
    y = r*np.sin(theta)
    return x+xc, y+yc

In [12]:
xcirc1, ycirc1 = circfun(-150., 0., 250., 60)
xcirc2, ycirc2 = circfun(150., 0., 250., 60)

In [14]:
DobsLine = Dobs[ind,:,:,:]

In [15]:
plt.plot(DobsLine[0,0,:,1], 'b.-')
plt.plot(DobsLine[0,1,:,1], 'k.-')


Out[15]:
[<matplotlib.lines.Line2D at 0xb4fb828>]

In [16]:
print Dobs.shape
print DobsLine.shape


(900L, 2L, 3L, 2L)
(30L, 2L, 3L, 2L)

In [17]:
# Dobs = dobs.reshape((900, 2, frequency.size, 2), order='F')
# Dobsr1 = Dobs[:,0,:,0]

In [18]:
fig, ax = plt.subplots(1,1, figsize=(7,3))
indz = 20
print mesh.vectorCCz[indz]
mesh3D.plotSlice(np.log10(sigma3D), ind = indz, ax = ax, clim=(-3, -0.5))
ax.plot(xyz2[:,0], xyz2[:,1], 'b.')
ax.plot(xyz2[ind,0], xyz2[ind,1], 'k.', ms=10)
# ax.plot(xyz2[:,0], xyz2[:,1], 'b.')
# ax.plot(xcirc1, ycirc1, 'r-')
ax.plot(xcirc2, ycirc2, 'b-')
ax.set_xlim(-500, 500)
ax.set_ylim(-300, 300)


-130.0
Out[18]:
(-300, 300)

In [38]:
sig_test = (sigma[active])

In [39]:
Sig_test = (sig_test.reshape([1,-1])).repeat(10, axis=0)
x = xyz2[ind,0]
z = mesh.vectorCCz[active]
Z, X = np.meshgrid(z, x)

In [24]:
z = mesh.vectorCCz[active]
Frequency, X = np.meshgrid(frequency, x)

In [25]:
fig, ax = plt.subplots(1,1, figsize = (3, 6))
Utils1D.plotLayer(sig_test, mesh.vectorCCz[active], showlayers=True, ax = ax)
ax.set_ylim(-300., 0.)


Out[25]:
(-300.0, 0.0)

In [26]:
prb = EM.FDEM.ProblemFDEM_b(mesh, mapping=mapping, verbose=False)

In [27]:
prb.Solver = SolverLU

In [31]:
Mopt = []
Dest=[]

for i in range(r2[ind].size):
# for i in range(1):
#     i = 29
    txList = []
    for freq in frequency:
        rxoffset=r2[ind][i]
        rxr = EM.FDEM.RxFDEM(np.array([[rxoffset, 0., 0.]]),'bzr')
        rxi = EM.FDEM.RxFDEM(np.array([[rxoffset, 0., 0.]]),'bzi')
        tx = EM.FDEM.TxFDEM(np.array([0., 0., 0.]), 'CircularLoop', freq, [rxr, rxi])
        tx.radius = 250.
        txList.append(tx)

    survey = EM.FDEM.SurveyFDEM(txList)
    if prb.ispaired:
        prb.unpair()
    if survey.ispaired:
        survey.unpair()
    prb.pair(survey)
    std = 0.2   
    survey.dobs = Utils.mkvc(DobsLine[i,:,:,1])
    survey.std = survey.dobs*0 + std
    dmisfit = DataMisfit.l2_DataMisfit(survey)
    dmisfit.Wd = 1/(abs(survey.dobs)*std+1e-12)
    regMesh = Mesh.TensorMesh([mesh.hz[mapping.maps[-1].indActive]])
    reg = Regularization.Tikhonov(regMesh)
    opt = Optimization.InexactGaussNewton(maxIter = 5)
    invProb = InvProblem.BaseInvProblem(dmisfit, reg, opt)
    # Create an inversion object
    beta = Directives.BetaSchedule(coolingFactor=5, coolingRate=2)
    betaest = Directives.BetaEstimate_ByEig(beta0_ratio=1e0)
    inv = Inversion.BaseInversion(invProb, directiveList=[beta,betaest])
    m0 = np.log(np.ones(mtrue.size)*2e-3)
    reg.alpha_s = 1e-2
    reg.alpha_x = 1.
    prb.counter = opt.counter = Utils.Counter()
    opt.LSshorten = 0.5
    opt.remember('xc')
    mopt = inv.run(m0)
    Mopt.append(mopt)
    Dest.append(invProb.dpred)


SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  5.22e-02  2.86e+01  0.00e+00  2.86e+01    2.00e+00      0              
   1  5.22e-02  4.03e+00  2.62e+00  4.17e+00    6.22e+00      2              
   2  1.04e-02  2.31e+00  3.11e+00  2.34e+00    1.11e+00      0              
   3  1.04e-02  2.12e+00  3.80e+00  2.16e+00    4.11e+00      3   Skip BFGS  
   4  2.09e-03  1.98e+00  4.05e+00  1.99e+00    4.18e+00      4              
   5  2.09e-03  1.88e+00  4.52e+00  1.89e+00    5.13e+00      3   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 9.8990e-02 <= tolF*(1+|f0|) = 2.9601e+00
1 : |xc-x_last| = 8.9200e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 5.1264e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 5.1264e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  2.26e-02  2.89e+01  0.00e+00  2.89e+01    2.03e+00      0              
   1  2.26e-02  3.56e+00  2.82e+00  3.63e+00    4.35e+00      2              
   2  4.53e-03  2.20e+00  3.73e+00  2.21e+00    1.48e+00      3   Skip BFGS  
   3  4.53e-03  1.98e+00  4.90e+00  2.01e+00    5.39e+00      2              
   4  9.05e-04  1.81e+00  5.20e+00  1.81e+00    5.26e+00      3              
   5  9.05e-04  1.63e+00  5.44e+00  1.63e+00    5.00e+00      3   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 1.8067e-01 <= tolF*(1+|f0|) = 2.9901e+00
1 : |xc-x_last| = 4.9790e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 5.0045e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 5.0045e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  1.76e-02  3.00e+01  0.00e+00  3.00e+01    1.90e+00      0              
   1  1.76e-02  2.16e+00  3.66e+00  2.23e+00    2.97e+00      2              
   2  3.52e-03  2.08e+00  4.28e+00  2.10e+00    4.80e+00      3   Skip BFGS  
   3  3.52e-03  1.97e+00  4.63e+00  1.98e+00    5.47e+00      3   Skip BFGS  
   4  7.03e-04  1.29e+00  4.36e+00  1.29e+00    7.02e-01      0              
   5  7.03e-04  1.08e+00  4.93e+00  1.09e+00    1.71e+00      3   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 2.0448e-01 <= tolF*(1+|f0|) = 3.1030e+00
1 : |xc-x_last| = 8.5693e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 1.7083e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 1.7083e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  9.53e-03  3.06e+01  0.00e+00  3.06e+01    1.90e+00      0              
   1  9.53e-03  3.54e+00  3.50e+00  3.57e+00    8.36e-01      2              
   2  1.91e-03  3.49e+00  4.60e+00  3.50e+00    5.75e+00      3   Skip BFGS  
   3  1.91e-03  3.42e+00  5.06e+00  3.43e+00    7.18e+00      3              
   4  3.81e-04  3.38e+00  5.58e+00  3.38e+00    7.33e+00      4              
   5  3.81e-04  3.31e+00  6.13e+00  3.31e+00    7.50e+00      4              
------------------------- STOP! -------------------------
1 : |fc-fOld| = 7.2629e-02 <= tolF*(1+|f0|) = 3.1584e+00
1 : |xc-x_last| = 8.4543e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 7.4964e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 7.4964e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  2.40e-02  3.12e+01  0.00e+00  3.12e+01    1.81e+00      0              
   1  2.40e-02  2.57e+00  4.14e+00  2.67e+00    8.04e+00      2              
   2  4.80e-03  1.65e+00  3.90e+00  1.67e+00    1.02e+00      0              
   3  4.80e-03  1.47e+00  4.52e+00  1.49e+00    3.04e+00      3   Skip BFGS  
   4  9.60e-04  1.33e+00  5.12e+00  1.33e+00    3.62e+00      3              
   5  9.60e-04  1.19e+00  5.66e+00  1.20e+00    3.78e+00      3   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 1.3222e-01 <= tolF*(1+|f0|) = 3.2188e+00
1 : |xc-x_last| = 7.7022e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 3.7849e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 3.7849e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  2.40e-02  3.11e+01  0.00e+00  3.11e+01    1.87e+00      0              
   1  2.40e-02  3.21e+00  3.53e+00  3.29e+00    1.06e+00      2              
   2  4.79e-03  2.78e+00  4.49e+00  2.80e+00    3.19e+00      3   Skip BFGS  
   3  4.79e-03  2.68e+00  4.98e+00  2.71e+00    4.99e+00      3              
   4  9.58e-04  2.59e+00  5.35e+00  2.59e+00    5.00e+00      4              
   5  9.58e-04  2.49e+00  5.74e+00  2.50e+00    4.99e+00      4   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 9.5680e-02 <= tolF*(1+|f0|) = 3.2075e+00
1 : |xc-x_last| = 5.8461e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 4.9887e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 4.9887e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  1.78e-02  3.19e+01  0.00e+00  3.19e+01    1.84e+00      0              
   1  1.78e-02  3.45e+00  3.85e+00  3.52e+00    2.25e+00      2              
   2  3.56e-03  3.21e+00  4.32e+00  3.23e+00    3.09e+00      4   Skip BFGS  
   3  3.56e-03  3.00e+00  4.65e+00  3.02e+00    3.57e+00      4   Skip BFGS  
   4  7.13e-04  2.94e+00  5.19e+00  2.94e+00    5.69e+00      3   Skip BFGS  
   5  7.13e-04  2.80e+00  5.49e+00  2.80e+00    6.68e+00      3   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 1.4304e-01 <= tolF*(1+|f0|) = 3.2869e+00
1 : |xc-x_last| = 7.5037e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 6.6824e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 6.6824e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  8.64e-03  3.24e+01  0.00e+00  3.24e+01    1.81e+00      0              
   1  8.64e-03  4.22e+00  4.20e+00  4.26e+00    7.57e+00      2              
   2  1.73e-03  3.33e+00  3.97e+00  3.33e+00    1.17e+00      0              
   3  1.73e-03  3.00e+00  4.48e+00  3.01e+00    2.04e+00      4   Skip BFGS  
   4  3.46e-04  2.62e+00  5.66e+00  2.62e+00    4.07e+00      3              
   5  3.46e-04  2.40e+00  6.56e+00  2.40e+00    4.86e+00      3              
------------------------- STOP! -------------------------
1 : |fc-fOld| = 2.2199e-01 <= tolF*(1+|f0|) = 3.3378e+00
1 : |xc-x_last| = 1.1532e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 4.8628e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 4.8628e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  4.21e-02  3.26e+01  0.00e+00  3.26e+01    1.76e+00      0              
   1  4.21e-02  3.15e+00  3.77e+00  3.31e+00    2.11e+00      2              
   2  8.42e-03  2.47e+00  4.65e+00  2.51e+00    1.46e+00      3   Skip BFGS  
   3  8.42e-03  2.24e+00  5.20e+00  2.28e+00    3.50e+00      3              
   4  1.68e-03  2.11e+00  5.53e+00  2.12e+00    3.61e+00      4              
   5  1.68e-03  2.00e+00  5.86e+00  2.01e+00    3.68e+00      4   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 1.1437e-01 <= tolF*(1+|f0|) = 3.3602e+00
1 : |xc-x_last| = 5.0017e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 3.6797e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 3.6797e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  9.08e-03  3.31e+01  0.00e+00  3.31e+01    1.75e+00      0              
   1  9.08e-03  7.70e+00  4.92e+00  7.74e+00    2.31e+01      2              
   2  1.82e-03  2.64e+00  4.43e+00  2.65e+00    3.53e+00      0              
   3  1.82e-03  2.39e+00  5.50e+00  2.40e+00    4.91e+00      3   Skip BFGS  
   4  3.63e-04  2.27e+00  5.95e+00  2.28e+00    5.11e+00      4              
   5  3.63e-04  2.14e+00  6.90e+00  2.14e+00    5.74e+00      3   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 1.3035e-01 <= tolF*(1+|f0|) = 3.4086e+00
1 : |xc-x_last| = 1.2059e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 5.7433e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 5.7433e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  1.49e-02  3.24e+01  0.00e+00  3.24e+01    1.81e+00      0              
   1  1.49e-02  3.77e+00  4.01e+00  3.83e+00    2.91e+00      2              
   2  2.98e-03  3.58e+00  4.52e+00  3.59e+00    3.88e+00      4   Skip BFGS  
   3  2.98e-03  3.38e+00  4.87e+00  3.39e+00    4.40e+00      4   Skip BFGS  
   4  5.97e-04  3.17e+00  5.12e+00  3.17e+00    4.62e+00      4   Skip BFGS  
   5  5.97e-04  3.08e+00  5.54e+00  3.08e+00    6.29e+00      3   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 8.8892e-02 <= tolF*(1+|f0|) = 3.3414e+00
1 : |xc-x_last| = 8.7874e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 6.2915e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 6.2915e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  9.81e-03  3.27e+01  0.00e+00  3.27e+01    1.83e+00      0              
   1  9.81e-03  4.71e+00  3.81e+00  4.75e+00    1.04e+00      2              
   2  1.96e-03  4.34e+00  4.49e+00  4.35e+00    2.72e+00      4   Skip BFGS  
   3  1.96e-03  4.05e+00  4.91e+00  4.06e+00    3.50e+00      4   Skip BFGS  
   4  3.92e-04  3.77e+00  5.20e+00  3.77e+00    3.88e+00      4   Skip BFGS  
   5  3.92e-04  3.62e+00  5.68e+00  3.62e+00    6.01e+00      3   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 1.4497e-01 <= tolF*(1+|f0|) = 3.3661e+00
1 : |xc-x_last| = 1.0149e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 6.0055e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 6.0055e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  1.54e-02  3.22e+01  0.00e+00  3.22e+01    1.87e+00      0              
   1  1.54e-02  4.61e+00  3.53e+00  4.67e+00    1.85e+00      2              
   2  3.07e-03  4.52e+00  5.10e+00  4.54e+00    6.79e+00      3   Skip BFGS  
   3  3.07e-03  4.29e+00  5.36e+00  4.30e+00    6.94e+00      4              
   4  6.14e-04  4.17e+00  5.66e+00  4.18e+00    6.72e+00      5              
   5  6.14e-04  4.13e+00  6.39e+00  4.13e+00    7.07e+00      4   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 4.8522e-02 <= tolF*(1+|f0|) = 3.3154e+00
1 : |xc-x_last| = 9.6884e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 7.0680e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 7.0680e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  3.82e-02  3.21e+01  0.00e+00  3.21e+01    1.87e+00      0              
   1  3.82e-02  5.27e+00  3.19e+00  5.39e+00    5.19e+00      2              
   2  7.65e-03  4.15e+00  3.59e+00  4.18e+00    5.13e-01      0              
   3  7.65e-03  3.84e+00  4.23e+00  3.87e+00    2.89e+00      4   Skip BFGS  
   4  1.53e-03  3.81e+00  4.82e+00  3.82e+00    4.92e+00      4              
   5  1.53e-03  3.75e+00  5.28e+00  3.75e+00    5.92e+00      4              
------------------------- STOP! -------------------------
1 : |fc-fOld| = 6.2958e-02 <= tolF*(1+|f0|) = 3.3091e+00
1 : |xc-x_last| = 8.5327e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 5.9224e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 5.9224e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  6.11e-03  3.17e+01  0.00e+00  3.17e+01    1.92e+00      0              
   1  6.11e-03  5.77e+00  3.21e+00  5.79e+00    3.25e+00      2              
   2  1.22e-03  4.64e+00  4.11e+00  4.64e+00    1.09e+00      4   Skip BFGS  
   3  1.22e-03  4.01e+00  5.25e+00  4.02e+00    4.14e+00      3              
   4  2.44e-04  3.75e+00  5.64e+00  3.75e+00    4.29e+00      4              
   5  2.44e-04  3.62e+00  6.34e+00  3.62e+00    5.75e+00      3   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 1.2809e-01 <= tolF*(1+|f0|) = 3.2729e+00
1 : |xc-x_last| = 1.0637e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 5.7521e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 5.7521e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  3.09e-02  3.16e+01  0.00e+00  3.16e+01    1.97e+00      0              
   1  3.09e-02  9.04e+00  2.54e+00  9.12e+00    6.17e+00      2              
   2  6.18e-03  6.58e+00  3.23e+00  6.60e+00    1.05e+00      0              
   3  6.18e-03  6.30e+00  4.20e+00  6.33e+00    4.48e+00      4   Skip BFGS  
   4  1.24e-03  6.21e+00  4.97e+00  6.22e+00    6.17e+00      4              
   5  1.24e-03  5.97e+00  5.59e+00  5.98e+00    6.82e+00      4   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 2.3749e-01 <= tolF*(1+|f0|) = 3.2649e+00
1 : |xc-x_last| = 9.5236e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 6.8173e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 6.8173e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  1.94e-02  3.16e+01  0.00e+00  3.16e+01    1.95e+00      0              
   1  1.94e-02  6.74e+00  2.90e+00  6.80e+00    5.12e+00      2              
   2  3.87e-03  5.50e+00  3.34e+00  5.51e+00    5.58e-01      0              
   3  3.87e-03  5.23e+00  4.17e+00  5.25e+00    4.11e+00      4   Skip BFGS  
   4  7.74e-04  5.10e+00  4.51e+00  5.10e+00    4.54e+00      5              
   5  7.74e-04  4.92e+00  4.81e+00  4.93e+00    4.74e+00      5   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 1.7899e-01 <= tolF*(1+|f0|) = 3.2597e+00
1 : |xc-x_last| = 5.4853e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 4.7377e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 4.7377e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  1.14e-02  3.10e+01  0.00e+00  3.10e+01    2.07e+00      0              
   1  1.14e-02  9.44e+00  2.36e+00  9.46e+00    5.83e+00      2              
   2  2.27e-03  7.18e+00  3.02e+00  7.19e+00    1.01e+00      0              
   3  2.27e-03  6.80e+00  3.53e+00  6.81e+00    1.93e+00      5   Skip BFGS  
   4  4.55e-04  6.35e+00  4.43e+00  6.35e+00    4.06e+00      4              
   5  4.55e-04  6.23e+00  5.25e+00  6.23e+00    5.91e+00      4              
------------------------- STOP! -------------------------
1 : |fc-fOld| = 1.2572e-01 <= tolF*(1+|f0|) = 3.2044e+00
1 : |xc-x_last| = 1.2549e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 5.9115e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 5.9115e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  2.85e-02  3.04e+01  0.00e+00  3.04e+01    2.07e+00      0              
   1  2.85e-02  9.33e+00  2.24e+00  9.40e+00    6.30e+00      2              
   2  5.70e-03  6.42e+00  3.03e+00  6.44e+00    1.70e+00      0              
   3  5.70e-03  6.34e+00  4.01e+00  6.36e+00    5.31e+00      4   Skip BFGS  
   4  1.14e-03  6.31e+00  4.75e+00  6.31e+00    6.79e+00      4              
   5  1.14e-03  6.09e+00  5.34e+00  6.10e+00    7.32e+00      4   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 2.1217e-01 <= tolF*(1+|f0|) = 3.1366e+00
1 : |xc-x_last| = 9.3578e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 7.3197e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 7.3197e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  3.41e-02  2.90e+01  0.00e+00  2.90e+01    2.23e+00      0              
   1  3.41e-02  1.29e+01  1.54e+00  1.29e+01    6.08e+00      2              
   2  6.82e-03  8.74e+00  2.70e+00  8.76e+00    4.89e+00      0              
   3  6.82e-03  8.56e+00  3.21e+00  8.58e+00    5.42e+00      5   Skip BFGS  
   4  1.36e-03  8.31e+00  3.59e+00  8.32e+00    5.51e+00      5   Skip BFGS  
   5  1.36e-03  8.12e+00  4.42e+00  8.12e+00    6.79e+00      4   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 1.9388e-01 <= tolF*(1+|f0|) = 3.0021e+00
1 : |xc-x_last| = 1.2504e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 6.7916e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 6.7916e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  3.55e-02  2.81e+01  0.00e+00  2.81e+01    2.37e+00      0              
   1  3.55e-02  1.51e+01  1.12e+00  1.51e+01    5.54e+00      2              
   2  7.09e-03  1.11e+01  2.46e+00  1.11e+01    7.59e+00      0              
   3  7.09e-03  9.81e+00  2.30e+00  9.83e+00    1.50e+00      0              
   4  1.42e-03  9.44e+00  2.82e+00  9.44e+00    2.51e+00      5   Skip BFGS  
   5  1.42e-03  9.35e+00  4.02e+00  9.36e+00    5.88e+00      4              
------------------------- STOP! -------------------------
1 : |fc-fOld| = 8.1295e-02 <= tolF*(1+|f0|) = 2.9121e+00
1 : |xc-x_last| = 1.8388e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 5.8830e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 5.8830e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  1.37e-01  2.74e+01  0.00e+00  2.74e+01    2.43e+00      0              
   1  1.37e-01  1.87e+01  3.38e+00  1.92e+01    2.66e+01      1              
   2  2.73e-02  9.74e+00  2.76e+00  9.81e+00    4.53e+00      0              
   3  2.73e-02  9.47e+00  3.14e+00  9.56e+00    4.57e+00      5   Skip BFGS  
   4  5.47e-03  9.37e+00  3.86e+00  9.39e+00    5.96e+00      4   Skip BFGS  
   5  5.47e-03  9.10e+00  4.28e+00  9.12e+00    6.03e+00      5              
------------------------- STOP! -------------------------
1 : |fc-fOld| = 2.7146e-01 <= tolF*(1+|f0|) = 2.8365e+00
1 : |xc-x_last| = 7.4828e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 6.0350e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 6.0350e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  4.35e-02  2.61e+01  0.00e+00  2.61e+01    2.53e+00      0              
   1  4.35e-02  2.37e+01  3.39e+00  2.39e+01    3.59e+01      1              
   2  8.70e-03  1.01e+01  2.69e+00  1.01e+01    6.20e+00      0              
   3  8.70e-03  9.60e+00  3.99e+00  9.63e+00    7.21e+00      4   Skip BFGS  
   4  1.74e-03  9.30e+00  4.45e+00  9.30e+00    6.99e+00      5              
   5  1.74e-03  8.99e+00  5.61e+00  9.00e+00    8.82e+00      4              
------------------------- STOP! -------------------------
1 : |fc-fOld| = 3.0143e-01 <= tolF*(1+|f0|) = 2.7118e+00
1 : |xc-x_last| = 1.5306e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 8.8151e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 8.8151e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  5.38e-02  2.49e+01  0.00e+00  2.49e+01    2.67e+00      0              
   1  5.38e-02  1.30e+01  2.09e+00  1.31e+01    8.10e+00      1              
   2  1.08e-02  1.12e+01  1.77e+00  1.12e+01    1.27e+00      0              
   3  1.08e-02  1.08e+01  3.11e+00  1.08e+01    4.09e+00      4   Skip BFGS  
   4  2.15e-03  1.03e+01  4.21e+00  1.03e+01    4.87e+00      4              
   5  2.15e-03  9.53e+00  5.21e+00  9.54e+00    5.23e+00      4   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 7.1712e-01 <= tolF*(1+|f0|) = 2.5890e+00
1 : |xc-x_last| = 1.3579e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 5.2342e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 5.2342e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  3.09e-02  2.43e+01  0.00e+00  2.43e+01    2.69e+00      0              
   1  3.09e-02  1.30e+01  1.90e+00  1.31e+01    6.79e+00      1              
   2  6.18e-03  1.16e+01  1.61e+00  1.16e+01    1.02e+00      0              
   3  6.18e-03  1.11e+01  2.29e+00  1.11e+01    1.97e+00      5   Skip BFGS  
   4  1.24e-03  1.04e+01  3.91e+00  1.04e+01    3.78e+00      4              
   5  1.24e-03  9.59e+00  5.15e+00  9.59e+00    4.25e+00      4              
------------------------- STOP! -------------------------
1 : |fc-fOld| = 8.1512e-01 <= tolF*(1+|f0|) = 2.5318e+00
1 : |xc-x_last| = 1.5887e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 4.2513e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 4.2513e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  1.10e-01  2.20e+01  0.00e+00  2.20e+01    2.84e+00      0              
   1  1.10e-01  9.55e+00  2.73e+00  9.85e+00    2.22e+00      1              
   2  2.19e-02  5.65e+00  5.89e+00  5.78e+00    1.21e+00      2              
   3  2.19e-02  3.00e+00  8.95e+00  3.20e+00    1.09e+00      2              
   4  4.39e-03  2.93e+00  8.41e+00  2.97e+00    4.17e+00      2              
   5  4.39e-03  2.45e+00  8.73e+00  2.49e+00    4.17e+00      2              
------------------------- STOP! -------------------------
1 : |fc-fOld| = 4.8060e-01 <= tolF*(1+|f0|) = 2.2976e+00
1 : |xc-x_last| = 9.5339e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 4.1650e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 4.1650e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  1.89e-01  2.07e+01  0.00e+00  2.07e+01    2.88e+00      0              
   1  1.89e-01  1.21e+01  7.70e-01  1.22e+01    1.51e+00      1              
   2  3.79e-02  1.08e+01  2.88e+00  1.10e+01    3.30e+00      1   Skip BFGS  
   3  3.79e-02  1.06e+01  4.89e+00  1.07e+01    5.59e+00      3              
   4  7.58e-03  9.87e+00  6.53e+00  9.92e+00    5.84e+00      3              
   5  7.58e-03  8.91e+00  7.94e+00  8.97e+00    5.86e+00      3   Skip BFGS  
------------------------- STOP! -------------------------
1 : |fc-fOld| = 9.5625e-01 <= tolF*(1+|f0|) = 2.1746e+00
1 : |xc-x_last| = 1.6570e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 5.8550e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 5.8550e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  1.38e-01  1.88e+01  0.00e+00  1.88e+01    2.83e+00      0              
   1  1.38e-01  1.21e+01  6.31e+00  1.30e+01    6.05e+00      0              
   2  2.76e-02  9.87e+00  8.68e+00  1.01e+01    5.29e+00      2              
   3  2.76e-02  8.37e+00  1.12e+01  8.68e+00    5.26e+00      2              
   4  5.52e-03  8.06e+00  1.07e+01  8.12e+00    5.07e+00      4              
   5  5.52e-03  7.93e+00  1.00e+01  7.98e+00    5.00e+00      5              
------------------------- STOP! -------------------------
1 : |fc-fOld| = 1.3837e-01 <= tolF*(1+|f0|) = 1.9813e+00
1 : |xc-x_last| = 7.8702e-01 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 4.9951e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 4.9951e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  1.62e-01  1.62e+01  0.00e+00  1.62e+01    2.54e+00      0              
   1  1.62e-01  1.11e+01  4.54e+00  1.19e+01    2.87e+00      0              
   2  3.24e-02  9.16e+00  7.31e+00  9.40e+00    2.75e+00      2              
   3  3.24e-02  6.91e+00  1.08e+01  7.26e+00    2.97e+00      2              
   4  6.47e-03  6.46e+00  9.92e+00  6.52e+00    3.18e+00      3              
   5  6.47e-03  6.38e+00  8.68e+00  6.43e+00    3.64e+00      4              
------------------------- STOP! -------------------------
1 : |fc-fOld| = 9.0493e-02 <= tolF*(1+|f0|) = 1.7185e+00
1 : |xc-x_last| = 1.4828e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 3.6427e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 3.6427e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------
SimPEG.InvProblem will set Regularization.mref to m0.
SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
                    ***Done using same solver as the problem***
============================ Inexact Gauss Newton ============================
  #     beta     phi_d     phi_m       f      |proj(x-g)-x|  LS    Comment   
-----------------------------------------------------------------------------
   0  1.33e-01  1.50e+01  0.00e+00  1.50e+01    2.12e+00      0              
   1  1.33e-01  1.34e+01  7.09e+00  1.43e+01    5.93e+00      0              
   2  2.65e-02  1.06e+01  9.84e+00  1.08e+01    4.62e+00      2              
   3  2.65e-02  8.48e+00  1.24e+01  8.81e+00    4.06e+00      2              
   4  5.30e-03  8.36e+00  1.15e+01  8.42e+00    4.52e+00      3              
   5  5.30e-03  7.61e+00  1.17e+01  7.67e+00    4.17e+00      2              
------------------------- STOP! -------------------------
1 : |fc-fOld| = 7.5320e-01 <= tolF*(1+|f0|) = 1.6013e+00
1 : |xc-x_last| = 1.8709e+00 <= tolX*(1+|x0|) = 3.3292e+00
0 : |proj(x-g)-x|    = 4.1739e+00 <= tolG          = 1.0000e-01
0 : |proj(x-g)-x|    = 4.1739e+00 <= 1e3*eps       = 1.0000e-02
1 : maxIter   =       5    <= iter          =      5
------------------------- DONE! -------------------------

In [29]:
# fig, ax = plt.subplots(1,1, figsize = (3, 6))
# Utils1D.plotLayer(np.exp(mopt), mesh.vectorCCz[active], showlayers=True, ax = ax)
# ax.set_ylim(-500., 0.)


Out[29]:
(-500.0, 0.0)

In [30]:
# plt.semilogy(abs(invProb.dpred.reshape((2,3), order='F')[0,:]), 'b.-')
# plt.semilogy(abs(invProb.dpred.reshape((2,3), order='F')[1,:]), 'r.-')
# plt.semilogy(abs(survey.dobs.reshape((2,3), order='F')[0,:]), 'bo')
# plt.semilogy(abs(survey.dobs.reshape((2,3), order='F')[1,:]), 'ro')


Out[30]:
[<matplotlib.lines.Line2D at 0xa984b00>]

In [34]:
np.save('Mopt2_realistic_FD', Mopt)
np.save('Dest2_realistic_FD', Dest)

In [35]:
Mopt = np.load('Mopt2_realistic_FD.npy')
Dest = np.load('Dest2_realistic_FD.npy')

In [44]:
SigMat = np.exp(np.vstack(Mopt))
DpreMat = np.vstack(Dest)
DpreMatR = DpreMat[:,[0,2,4]]
DpreMatI = DpreMat[:,[1,3,5]]

In [45]:
plt.pcolor(X, Z, np.log10(SigMat))
plt.ylim(-700, 0.)


Out[45]:
(-700, 0.0)

In [47]:
plt.semilogy(xyz2[ind,0], -DpreMatR[:,0], 'k')
plt.semilogy(xyz2[ind,0], -DpreMatR[:,1], 'b')
plt.semilogy(xyz2[ind,0],-DpreMatR[:,2], 'r')
plt.semilogy(xyz2[ind,0], -DobsLine[:,0,0,1], 'ko')
plt.semilogy(xyz2[ind,0], -DobsLine[:,0,1,1], 'bo')
plt.semilogy(xyz2[ind,0],-DobsLine[:,0,2,1], 'ro')


Out[47]:
[<matplotlib.lines.Line2D at 0xada5908>]

In [53]:
plt.semilogy(xyz2[ind,0], -DpreMatI[:,0], 'k')
plt.semilogy(xyz2[ind,0], -DpreMatI[:,1], 'b')
plt.semilogy(xyz2[ind,0],-DpreMatI[:,2], 'r')
plt.semilogy(xyz2[ind,0], -DobsLine[:,1,0,1], 'ko')
plt.semilogy(xyz2[ind,0], -DobsLine[:,1,1,1], 'bo')
plt.semilogy(xyz2[ind,0],-DobsLine[:,1,2,1], 'ro')


Out[53]:
[<matplotlib.lines.Line2D at 0xb916828>]

In [49]:
fig, ax = plt.subplots(1,2, figsize = (12, 5))
vmin = np.log10(Utils.mkvc(SigMat).min())
vmax = np.log10(Utils.mkvc(SigMat).max())
ax[0].contourf(X, Z, np.log10(SigMat), 31, vmin = -3, vmax = -1)
mesh3D.plotSlice(np.log10(sigma3D), ind = 20, normal='Y', ax = ax[1], clim=(-3, -1))
for i in range(2):
    ax[i].set_ylim(-700., 0.)
    ax[i].set_xlim(10., 300.)