mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-01 18:58:00 +08:00
Updates to Survey TimeRx
This commit is contained in:
+23
-3
@@ -68,6 +68,26 @@ class BaseTimeRx(BaseRx):
|
||||
"""Number of data in the receiver."""
|
||||
return self.locs.shape[0] * len(self.times)
|
||||
|
||||
def getSpatialP(self, mesh):
|
||||
"""
|
||||
Returns the spatial projection matrix.
|
||||
|
||||
.. note::
|
||||
|
||||
This is not stored in memory, but is created on demand.
|
||||
"""
|
||||
return mesh.getInterpolationMat(self.locs, self.projGLoc)
|
||||
|
||||
def getTimeP(self, timeMesh):
|
||||
"""
|
||||
Returns the time projection matrix.
|
||||
|
||||
.. note::
|
||||
|
||||
This is not stored in memory, but is created on demand.
|
||||
"""
|
||||
return timeMesh.getInterpolationMat(self.times, self.projTLoc)
|
||||
|
||||
def getP(self, mesh, timeMesh):
|
||||
"""
|
||||
Returns the projection matrices as a
|
||||
@@ -76,13 +96,13 @@ class BaseTimeRx(BaseRx):
|
||||
|
||||
.. note::
|
||||
|
||||
Projection matrices are stored as a dictionary (mesh, timeMesh)
|
||||
Projection matrices are stored as a dictionary (mesh, timeMesh) if storeProjections is True
|
||||
"""
|
||||
if (mesh, timeMesh) in self._Ps:
|
||||
return self._Ps[(mesh, timeMesh)]
|
||||
|
||||
Ps = mesh.getInterpolationMat(self.locs, self.projGLoc)
|
||||
Pt = timeMesh.getInterpolationMat(self.times, self.projTLoc)
|
||||
Ps = self.getSpatialP(mesh)
|
||||
Pt = self.getTimeP(timeMesh)
|
||||
P = sp.kron(Pt, Ps)
|
||||
|
||||
if self.storeProjections:
|
||||
|
||||
Reference in New Issue
Block a user