---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-31-496b6a805e71> in <module>()
1 if True:
2 for dat in mt1DdataZyxList:
----> 3 runInversionModel(dat,problem,m1d,'zyx')
4
5 for dat in mt1DdataZxyList:
<ipython-input-22-5072715ac24c> in runInversionModel(data, problem, m1d, nameflag)
39 m_0 = np.log(1e-2+0*problem.sigmaPrimary[problem.mapping.sigmaMap.maps[-1].indActive])
40 problem.survey.mtrue = m_0
---> 41 mopt = inv.run(m_0)
42 # Save the model
43
/media/gudni/ExtraDrive1/Codes/python/simpeg/SimPEG/Utils/CounterUtils.pyc in wrapper(self, *args, **kwargs)
90 counter = getattr(self,'counter',None)
91 if type(counter) is Counter: counter.countTic(self.__class__.__name__+'.'+f.__name__)
---> 92 out = f(self,*args,**kwargs)
93 if type(counter) is Counter: counter.countToc(self.__class__.__name__+'.'+f.__name__)
94 return out
/media/gudni/ExtraDrive1/Codes/python/simpeg/SimPEG/Inversion.pyc in run(self, m0)
60 self.invProb.startup(m0)
61 self.directiveList.call('initialize')
---> 62 self.m = self.opt.minimize(self.invProb.evalFunction, self.invProb.curModel)
63 self.directiveList.call('finish')
64
/media/gudni/ExtraDrive1/Codes/python/simpeg/SimPEG/Utils/CounterUtils.pyc in wrapper(self, *args, **kwargs)
90 counter = getattr(self,'counter',None)
91 if type(counter) is Counter: counter.countTic(self.__class__.__name__+'.'+f.__name__)
---> 92 out = f(self,*args,**kwargs)
93 if type(counter) is Counter: counter.countToc(self.__class__.__name__+'.'+f.__name__)
94 return out
/media/gudni/ExtraDrive1/Codes/python/simpeg/SimPEG/Optimization.pyc in minimize(self, evalFunction, x0)
206 while True:
207 self.doStartIteration()
--> 208 self.f, self.g, self.H = evalFunction(self.xc, return_g=True, return_H=True)
209 self.printIter()
210 if self.stoppingCriteria(): break
/media/gudni/ExtraDrive1/Codes/python/simpeg/SimPEG/Utils/CounterUtils.pyc in wrapper(self, *args, **kwargs)
90 counter = getattr(self,'counter',None)
91 if type(counter) is Counter: counter.countTic(self.__class__.__name__+'.'+f.__name__)
---> 92 out = f(self,*args,**kwargs)
93 if type(counter) is Counter: counter.countToc(self.__class__.__name__+'.'+f.__name__)
94 return out
/media/gudni/ExtraDrive1/Codes/python/simpeg/SimPEG/InvProblem.pyc in evalFunction(self, m, return_g, return_H)
124 out = (f,)
125 if return_g:
--> 126 phi_dDeriv = self.dmisfit.evalDeriv(m, u=u)
127 phi_mDeriv = self.reg.evalDeriv(m)
128
/media/gudni/ExtraDrive1/Codes/python/simpeg/SimPEG/Utils/CounterUtils.pyc in wrapper(self, *args, **kwargs)
90 counter = getattr(self,'counter',None)
91 if type(counter) is Counter: counter.countTic(self.__class__.__name__+'.'+f.__name__)
---> 92 out = f(self,*args,**kwargs)
93 if type(counter) is Counter: counter.countToc(self.__class__.__name__+'.'+f.__name__)
94 return out
/media/gudni/ExtraDrive1/Codes/python/simpeg/SimPEG/DataMisfit.pyc in evalDeriv(self, m, u)
156 survey = self.survey
157 if u is None: u = prob.fields(m)
--> 158 return prob.Jtvec(m, self.Wd * (self.Wd * survey.residual(m, u=u)), u=u)
159
160 @Utils.timeIt
/media/gudni/ExtraDrive1/Codes/python/simpegmt/simpegMT/BaseMT.py in Jtvec(self, m, v, u)
125 # Get the
126 dA_duIT = ATinv * PTv
--> 127 dA_dmT = self.getADeriv_m(freq, u_src, mkvc(dA_duIT), adjoint=True)
128 dRHS_dmT = self.getRHSDeriv_m(freq, mkvc(dA_duIT), adjoint=True)
129 # Make du_dmT
/media/gudni/ExtraDrive1/Codes/python/simpegmt/simpegMT/ProblemMT1D/Problems.pyc in getADeriv_m(self, freq, u, v, adjoint)
68 #
69 u_src = u['e_1dSolution']
---> 70 dMf_dsig = self.mesh.getFaceInnerProductDeriv(self.curModel.sigma)(u_src) * self.curModel.sigmaDeriv
71 if adjoint:
72 return 1j * omega(freq) * ( dMf_dsig.T * v )
/media/gudni/ExtraDrive1/Codes/python/simpeg/SimPEG/PropMaps.pyc in fget(self)
107
108 m = getattr(self, '%sModel'%prop.name)
--> 109 return mapping.deriv( m )
110 return property(fget=fget)
111
/media/gudni/ExtraDrive1/Codes/python/simpeg/SimPEG/Maps.pyc in deriv(self, m)
181 mi = m
182 for map_i in reversed(self.maps):
--> 183 deriv = map_i.deriv(mi) * deriv
184 mi = map_i * mi
185 return deriv
/media/gudni/ExtraDrive1/Codes/python/simpeg/SimPEG/Maps.pyc in deriv(self, m)
249 \\frac{\partial \exp{m}}{\partial m} = \\text{sdiag}(\exp{m})
250 """
--> 251 return Utils.sdiag(np.exp(Utils.mkvc(m)))
252
253 class ReciprocalMap(IdentityMap):
/media/gudni/ExtraDrive1/Codes/python/simpeg/SimPEG/Utils/matutils.pyc in sdiag(h)
38 def sdiag(h):
39 """Sparse diagonal matrix"""
---> 40 return sp.spdiags(mkvc(h), 0, h.size, h.size, format="csr")
41
42 def sdInv(M):
/home/gudni/anaconda/lib/python2.7/site-packages/scipy/sparse/construct.pyc in spdiags(data, diags, m, n, format)
58
59 """
---> 60 return dia_matrix((data, diags), shape=(m,n)).asformat(format)
61
62
/home/gudni/anaconda/lib/python2.7/site-packages/scipy/sparse/base.pyc in asformat(self, format)
211 return self
212 else:
--> 213 return getattr(self,'to' + format)()
214
215 ###################################################################
/home/gudni/anaconda/lib/python2.7/site-packages/scipy/sparse/dia.pyc in tocsr(self)
225 def tocsr(self):
226 #this could be faster
--> 227 return self.tocoo().tocsr()
228
229 def tocsc(self):
/home/gudni/anaconda/lib/python2.7/site-packages/scipy/sparse/dia.pyc in tocoo(self)
250
251 from .coo import coo_matrix
--> 252 return coo_matrix((data,(row,col)), shape=self.shape)
253
254 # needed by _data_matrix
/home/gudni/anaconda/lib/python2.7/site-packages/scipy/sparse/coo.pyc in __init__(self, arg1, shape, dtype, copy)
204 self.data = self.data.astype(dtype)
205
--> 206 self._check()
207
208 def getnnz(self, axis=None):
/home/gudni/anaconda/lib/python2.7/site-packages/scipy/sparse/coo.pyc in _check(self)
257
258 if nnz > 0:
--> 259 if self.row.max() >= self.shape[0]:
260 raise ValueError('row index exceeds matrix dimensions')
261 if self.col.max() >= self.shape[1]:
KeyboardInterrupt: