diff --git a/SimPEG/Maps.py b/SimPEG/Maps.py index f6b24f10..f17d2314 100644 --- a/SimPEG/Maps.py +++ b/SimPEG/Maps.py @@ -759,27 +759,29 @@ class PolyMap(IdentityMap): m = [\sigma_1, \sigma_2, c] - """ + Can take in an actInd vector to account for topography. + + """ def __init__(self, mesh, order, logSigma=True, normal='X', actInd = None): IdentityMap.__init__(self, mesh) self.logSigma = logSigma self.order = order - self.normal = normal + self.normal = normal self.actInd = actInd - + if getattr(self, 'actInd', None) is None: self.actInd = range(self.mesh.nC) self.nC = self.mesh.nC - + else: - self.nC = len(self.actInd) - - slope = 1e4 - + self.nC = len(self.actInd) + + slope = 1e4 + @property def shape(self): return (self.nC, self.nP) - + @property def nP(self): if np.isscalar(self.order): @@ -818,7 +820,7 @@ class PolyMap(IdentityMap): f = polynomial.polyval2d(X, Y, c.reshape((self.order[0]+1,self.order[1]+1))) - Z else: raise(Exception("Input for normal = X or Y or Z")) - + else: raise(Exception("Only supports 2D")) diff --git a/SimPEG/Survey.py b/SimPEG/Survey.py index f1ec8225..fbc88276 100644 --- a/SimPEG/Survey.py +++ b/SimPEG/Survey.py @@ -375,7 +375,7 @@ class BaseSurvey(object): self.dtrue = self.dpred(m, f=f) noise = std*abs(self.dtrue)*np.random.randn(*self.dtrue.shape) self.dobs = self.dtrue+noise - self.std = self.dobs*0. + std + self.std = self.dobs*0 + std return self.dobs class LinearSurvey(BaseSurvey):