mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-12 12:30:37 +08:00
Merge branch 'master' of https://github.com/simpeg/simpeg into cylClean
Conflicts: SimPEG/Survey.py
This commit is contained in:
+19
-12
@@ -60,7 +60,8 @@ class BaseSurvey(object):
|
||||
@Utils.count
|
||||
@Utils.requires('prob')
|
||||
def dpred(self, m, u=None):
|
||||
"""
|
||||
"""dpred(m, u=None)
|
||||
|
||||
Create the projected data from a model.
|
||||
The field, u, (if provided) will be used for the predicted data
|
||||
instead of recalculating the fields (which may be expensive!).
|
||||
@@ -77,9 +78,9 @@ class BaseSurvey(object):
|
||||
|
||||
@Utils.count
|
||||
def projectFields(self, u):
|
||||
"""
|
||||
This function projects the fields onto the data space.
|
||||
"""projectFields(u)
|
||||
|
||||
This function projects the fields onto the data space.
|
||||
|
||||
.. math::
|
||||
|
||||
@@ -89,22 +90,23 @@ class BaseSurvey(object):
|
||||
|
||||
@Utils.count
|
||||
def projectFieldsDeriv(self, u):
|
||||
"""
|
||||
This function projects the fields onto the data space.
|
||||
"""projectFieldsDeriv(u)
|
||||
|
||||
This function s the derivative of projects the fields onto the data space.
|
||||
|
||||
.. math::
|
||||
|
||||
\\frac{\partial d_\\text{pred}}{\partial u} = \mathbf{P}
|
||||
"""
|
||||
return sp.identity(u.size)
|
||||
raise NotImplemented('projectFields is not yet implemented.')
|
||||
|
||||
@Utils.count
|
||||
def residual(self, m, u=None):
|
||||
"""
|
||||
"""residual(m, u=None)
|
||||
|
||||
:param numpy.array m: geophysical model
|
||||
:param numpy.array u: fields
|
||||
:rtype: float
|
||||
:rtype: numpy.array
|
||||
:return: data residual
|
||||
|
||||
The data residual:
|
||||
@@ -129,6 +131,7 @@ class BaseSurvey(object):
|
||||
|
||||
"""
|
||||
if getattr(self,'_Wd',None) is None:
|
||||
print 'SimPEG is making Survey.Wd to be norm of the data plus a floor.'
|
||||
eps = np.linalg.norm(Utils.mkvc(self.dobs),2)*1e-5
|
||||
self._Wd = 1/(abs(self.dobs)*self.std+eps)
|
||||
return self._Wd
|
||||
@@ -137,11 +140,12 @@ class BaseSurvey(object):
|
||||
self._Wd = value
|
||||
|
||||
def residualWeighted(self, m, u=None):
|
||||
"""
|
||||
"""residualWeighted(m, u=None)
|
||||
|
||||
:param numpy.array m: geophysical model
|
||||
:param numpy.array u: fields
|
||||
:rtype: float
|
||||
:return: data residual
|
||||
:rtype: numpy.array
|
||||
:return: weighted data residual
|
||||
|
||||
The weighted data residual:
|
||||
|
||||
@@ -149,7 +153,7 @@ class BaseSurvey(object):
|
||||
|
||||
\mu_\\text{data}^{\\text{weighted}} = \mathbf{W}_d(\mathbf{d}_\\text{pred} - \mathbf{d}_\\text{obs})
|
||||
|
||||
Where W_d is a covariance matrix that weights the data residual.
|
||||
Where \\\\(W_d\\\\) is a covariance matrix that weights the data residual.
|
||||
"""
|
||||
return Utils.mkvc(self.Wd*self.residual(m, u=u))
|
||||
|
||||
@@ -205,7 +209,10 @@ class BaseRx(object):
|
||||
def nD(self):
|
||||
return self.locs.shape[0]
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
>>>>>>> dbd1334e0bf48dedc12f744841e71725a9d98d50
|
||||
class BaseTx(object):
|
||||
"""SimPEG Transmitter Object"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user