getdist.covmat

class getdist.covmat.CovMat(filename='', matrix=None, paramNames=None)[source]

Class holding a covariance matrix for some named parameters

Variables:
  • matrix – the covariance matrix (square numpy array)
  • paramNames – list of parameter name strings
Parameters:

filename – optionally, a file name to load from

correlation()[source]

Get the correlation matrix

Returns:numpy array giving the correlation matrix
plot()[source]

Plot the correlation matrix as grid of colored squares

rescaleParameter(name, scale)[source]

Used to rescale a covariance if a parameter is renormalized

Parameters:name – parameter name to rescale
Scale scale:value to rescale by
saveToFile(filename)[source]

Save the covariance matrix to a text file, with comment header listing the parameter names

Parameters:filename – name of file to save to (.covmat)