diff --git a/impala/superCal/models_withLik.py b/impala/superCal/models_withLik.py index d622573..8883f89 100644 --- a/impala/superCal/models_withLik.py +++ b/impala/superCal/models_withLik.py @@ -487,7 +487,7 @@ def discrep_sample(self, yobs, pred, cov, itemp): #Added by Lauren on 11/17/23. + self.D.T @ (cov['inv'].flatten() * np.eye(len(yobs))) @ self.D ) m = self.D.T @ (cov['inv'] * np.eye(len(yobs))) @ (yobs - pred) - discrep_vars = sc.chol_sample(S @ m, S/itemp) + discrep_vars = chol_sample(S @ m, S/itemp) return discrep_vars @@ -540,7 +540,7 @@ def discrep_sample(self, yobs, pred, cov, itemp): #Added by Lauren on 11/17/23. + self.D.T @ self.vmat ) self.m = self.D.T @ self.vec - discrep_vars = sc.chol_sample((S @ self.m).flatten(), S/itemp) + discrep_vars = chol_sample((S @ self.m).flatten(), S/itemp) return discrep_vars def llik(self, yobs, pred, cov): # assumes diagonal cov self.vec = yobs.flatten() - pred.flatten()