Commit 2c515cc5 authored by ivar's avatar ivar
Browse files

rejected samples are now correctly flagged with number 2

parent 248888bc
......@@ -132,7 +132,7 @@ class Optimizer(object):
self.obs[:] = np.array(allobs)
self.obs_ids[:] = np.array(allids)
print self.HX_prime[:,:].shape,np.array(allsimulated).shape
self.HX_prime[:,:] = np.array(allsimulated)
self.Hx[:] = self.HX_prime[:,0]
......@@ -354,7 +354,7 @@ class Optimizer(object):
threshold = self.rejection_threshold*np.sqrt(self.R[n,n])
if np.abs(res) > threshold:
msg = 'Rejecting observation %d because residual (%f) exceeds threshold (%f)'%(n,res,threshold) ; logging.debug(msg)
self.flags[n] == 2
self.flags[n] = 2
continue
PHt = 1./(self.nmembers-1)*np.dot(self.X_prime,self.HX_prime[n,:])
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment