msg="The total dimension of the covariance matrices passed (%d) does not add up to the prescribed nparams (%d), exiting..."%(dims,self.nparams);logging.error(msg)
raiseValueError
# Loop over list if identity matrices and create a matrix of (nparams,nmembers) with the deviations
all_devs=[]
formatrixincovariancematrixlist:
# Make a cholesky decomposition of the covariance matrix
U,s,Vh=np.linalg.svd(covariancematrix)
dof=np.sum(s)**2/sum(s**2)
C=np.linalg.cholesky(covariancematrix)
dummy=logging.debug("Covariance matrix visualized for inspection")
msg='Cholesky decomposition has succeeded offline';logging.debug(msg)
msg='Appr. degrees of freedom in covariance matrix is %s'%(int(dof));logging.info(msg)
# Draw nmembers instances of this distribution
npoints=matrix.shape[0]
randstate=np.random.get_state()
formemberinrange(1,self.nmembers):
rands=np.random.randn(npoints)
deviations=np.dot(C,rands)
all_devs.append(deviations)
sys.exit(2)
# Create mean values
NewMean=np.ones(self.nparams,float)# standard value for a new time step is 1.0
# If this is not the start of the filter, average previous two optimized steps into the mix