minor update to survey, to return dobs from makeSyntheticData

This commit is contained in:
Rowan Cockett
2015-03-03 10:00:36 -08:00
parent 0220ee57f2
commit 6ffeb5cc1a
+2 -1
View File
@@ -366,9 +366,10 @@ class BaseSurvey(object):
"""
if getattr(self, 'dobs', None) is not None and not force:
raise Exception('Survey already has dobs.')
raise Exception('Survey already has dobs. You can use force=True to override this exception.')
self.mtrue = m
self.dtrue = self.dpred(m, u=u)
noise = std*abs(self.dtrue)*np.random.randn(*self.dtrue.shape)
self.dobs = self.dtrue+noise
self.std = self.dobs*0 + std
return self.dobs