cov_fromsim module

Calculate the numerical covariance matrix for the 3x2pt power spectra measured from simulation. Can be either a full 3x2pt analysis, or a 1x2pt (cosmic shear only or angular clustering only).

pcl_measurement.cov_fromsim.main()

Main function to calculate the numerical covariance matrix. Can be either 3x2pt or 1x2pt (‘E’ or ‘N’) depending on which parameters are specified in the ‘set_variables_3x2pt_measurement.ini’ file.

Returns

Numerical covariance matrix, saved as an array in .npz to specified location on disk - the ‘cov_fromsim’ subdirectory within the main measurement directory.

pcl_measurement.cov_fromsim.mysplit(s)

Function to split string into float and number. Used to extract which field and which tomographic bin should be identified and collected.

Parameters

s(str)

String describing field and tomographic bin number

Returns

head(str)

String describing field

tail(float)

Float describing tomographic bin id

pcl_measurement.cov_fromsim.open_spectrum(id_a, id_b, measured_cls_dir, no_iter)

Extract the specific power spectrum corresponding to a given block of the covariance matrix.

Parameters

id_a(str)

String describing the first signal in the covariance calculation, e.g. ‘N1’

id_b(str)

String describing the second signal in the covariance calculation, e.g. ‘E1’

measured_cls_dir(str)

Path to directory where 3x2pt Cls measured from simulation are stored.

no_iter(int)

Number of realisations used in analysis.

Returns

Given Cl power spectrum data