Clean up imports in DC, move data to forward folder. clean up init statements.

This commit is contained in:
rowanc1
2014-01-15 10:53:45 -08:00
parent 5797fa4110
commit 9b5d19ad8e
6 changed files with 37 additions and 32 deletions
+20
View File
@@ -0,0 +1,20 @@
from SimPEG import utils
class SimPEGData(object):
"""Data holds the observed data, and the standard deviations."""
__metaclass__ = utils.Save.Savable
std = None #: Estimated Standard Deviations
dobs = None #: Observed data
dtrue = None #: True data, if data is synthetic
mtrue = None #: True model, if data is synthetic
def __init__(self, prob, **kwargs):
utils.setKwargs(self, **kwargs)
self.prob = prob
def isSynthetic(self):
"Check if the data is synthetic."
return self.mtrue is not None
+3 -2
View File
@@ -1,4 +1,5 @@
from SimPEG import utils, data, np, sp
from SimPEG import utils, np, sp
import Data
norm = np.linalg.norm
@@ -224,7 +225,7 @@ class Problem(object):
noise = std*abs(dtrue)*np.random.randn(*dtrue.shape)
dobs = dtrue+noise
stdev = dobs*0 + std
return data.SimPEGData(self, dobs=dobs, std=stdev, dtrue=dtrue, mtrue=m)
return Data.SimPEGData(self, dobs=dobs, std=stdev, dtrue=dtrue, mtrue=m)
+1
View File
@@ -1,2 +1,3 @@
from Problem import *
import ModelTransforms
from Data import *