From e88b6fdc183f8dcf6a70f31cfe880cd678f10424 Mon Sep 17 00:00:00 2001 From: c-d-leonard Date: Thu, 18 Jun 2026 17:42:57 +0100 Subject: [PATCH 1/4] N(z) for legacy + benchmarking script (WiP) --- benchmarks/covariance/README.md | 18 +++ .../covariance/benchmark_covariance_script.py | 137 ++++++++++++++++++ .../covariance/generate_dNdz_for_legacy.py | 36 +++++ 3 files changed, 191 insertions(+) create mode 100644 benchmarks/covariance/benchmark_covariance_script.py create mode 100644 benchmarks/covariance/generate_dNdz_for_legacy.py diff --git a/benchmarks/covariance/README.md b/benchmarks/covariance/README.md index ea57656..e82786a 100644 --- a/benchmarks/covariance/README.md +++ b/benchmarks/covariance/README.md @@ -3,3 +3,21 @@ Benchmarks for the DSF DeltaSigma covariance calculation. These scripts compare DSF covariance predictions against legacy or reference implementations. + +## Compare to legacy code + +### One lens / source bin pair + +We compare the covariance output from the legacy code from Dani Leonard et al. with the dsf covariance builder, using a single bin for DESI LRGs and the highest-z bin of sources in an LSST Year 1 set up with 5 equipopulated photometric bins. + +``` generate_dNdz_for_legacy.py``` generates the redshift distributions that are fed into the legacy code to produce the covariance. + +``` dNdz_source_LSSTY1Bin5.dat``` contains (z, dNdz) for the sources + +```dNdz_lens_DESI_LRG_1bin.dat``` contains (z, dNdz) for the lenses + +```rp_bin_edges.dat``` contains the edges of the projected radial bins, in Mpc/h. + +```rp_bin_centres.dat``` contains the centres of the projected radial bins, in Mpc/h. + +``` cov_gmgm_LSSTY1Bin5_DESILRG.dat``` contains the covariance of Delta Sigma from the legacy code, using projected radial bins defined by rp_bin_edges/centres, in units ```Msun^2 h^2 / pc^4```. diff --git a/benchmarks/covariance/benchmark_covariance_script.py b/benchmarks/covariance/benchmark_covariance_script.py new file mode 100644 index 0000000..d6afa7f --- /dev/null +++ b/benchmarks/covariance/benchmark_covariance_script.py @@ -0,0 +1,137 @@ +import matplotlib.pyplot as plt +import numpy as np + +from dsf.covariance.cov_builder import DeltaSigmaCovarianceBuilder +from dsf.modelling import make_ccl_cosmology +from dsf.tomography.tomo_builder import TomographyBuilder +import pyccl as ccl + + +cosmo = make_ccl_cosmology( + transfer_function="boltzmann_camb", + matter_power_spectrum="halofit", +) + +z = np.linspace(0.0, 5.0, 1000) + +tomography = TomographyBuilder( + lens_survey="desi", + source_survey="lsst", + lens_sample='lrg', + source_sample=None, + lens_year=None, + source_year="1", + lens_role="lens", + source_role="source", + overlap_threshold=0.1, + source_behind_lens=True, + shared_overrides={ + "bins": { + "count": 5, + }, + }, +) + +tomo_inputs = tomography.prepare_bins() + +bin_pairs = tomo_inputs["bin_pairs"][:1] +# This set up gives the highest-z source bin with the single lens bin + +# Load the bin edges from the legacy code (Mpc/h) +rp_bin_edges = np.loadtxt('./rp_bin_edges.dat') + +# Make a CCL cosmology object with the parameters at which we have run the legacy code. +h=0.69 +OmB = 0.022/h**2 +params = {'OmB':OmB, 'h':h, 'n_s':0.965, 'A_s':2.115 * 10**(-9),'b':2.333, 'OmM': 0.292} +cosmo = ccl.Cosmology(Omega_c = params['OmM'] - params['OmB'], Omega_b = params['OmB'], h = params['h'], A_s=params['A_s'], n_s = params['n_s']) + +# Load the grid in line-of-sight projection used in the legacy code for the gm x gg case (Mpc/h) +#pi_grid = np.loadtxt('./Pi_grid.dat') + +# Specifics here are set to match what was provided for the legacy code. +covariance_builder = DeltaSigmaCovarianceBuilder( + cosmo=cosmo, + lens_result=tomo_inputs["lens_result"], + source_result=tomo_inputs["source_result"], + lens_population_stats=tomo_inputs["lens_population_stats"], + source_population_stats=tomo_inputs["source_population_stats"], + bin_pairs=bin_pairs, + rp_bin_edges=rp_bin_edges, + area_deg2=5000.0, + sigma_e=0.26, + galaxy_bias=params['b'], + k=np.geomspace(10**(-4), 3.0, 5000), + #pi = pi_grid, + hankel_kwargs={ + "r_min": 0.6, + "r_max": 110, + "k_min": 10**(-4), + "k_max": 30.0, + "orders": (2,), + "n_zeros": 480000, # Starting here after some trial and error. + "n_zeros_step": 1000, + "prune_r": 0, + "verbose": True, + "max_iterations": 1000, + }, + taper=False, +) + + +dsf_cov_dict = covariance_builder.covariance_for_pair(lens_bin_index=0, + source_bin_index=0) + +cov_gm_gm_dsf = dsf_cov_dict['cov_gm_gm'] +cov_gg_gg_dsf = dsf_cov_dict['cov_gg_gg'] +cov_gm_gg_dsf = dsf_cov_dict['cov_gm_gg'] +cov_joint_dsf = dsf_cov_dict['cov_joint'] + +# Save the covariance matrices from dsf +np.savetxt('./cov_gmgm_LSSTY1Bin5_DESILRG_dsf.dat', cov_gm_gm_dsf) +np.savetxt('./cov_gggg_LSSTY1Bin5_DESILRG_dsf.dat', cov_gg_gg_dsf) +np.savetxt('./cov_gmgg_LSSTY1Bin5_DESILRG_dsf.dat', cov_gm_gg_dsf) +np.savetxt('./cov_joint_LSSTY1Bin5_DESILRG_dsf.dat', cov_joint_dsf) + +# Get the diagonal errors. +errors_gm_gm = covariance_builder.diagonal_error(cov_gm_gm_dsf) +errors_gg_gg = covariance_builder.diagonal_error(cov_gg_gg_dsf) +errors_gm_gg = covariance_builder.diagonal_error(cov_gm_gg_dsf) +errors_joint = covariance_builder.diagonal_error(cov_joint_dsf) + +corr = covariance_builder.correlation_matrix(cov_gm_gm_dsf) + +# Compare with legacy code: + +# Load the legacy covariances: +cov_gm_gm_leg = np.loadtxt('./cov_gmgm_LSSTY1Bin5_DESILRG_legacy.dat') +cov_gg_gg_leg = np.loadtxt('./cov_gggg_LSSTY1Bin5_DESILRG_legacy.dat') +cov_gm_gg_leg = np.loadtxt('./cov_gmgg_LSSTY1Bin5_DESILRG_legacy.dat') +cov_joint_leg = np.loadtxt('./cov_joint_LSSTY1Bin5_DESILRG_legacy.dat') + +print("covariance shape: dsf gmgm:", cov_gm_gm_dsf.shape, ", legacy gmgm:", cov_gm_gm_leg.shape) +print("covariance shape: dsf gggg:", cov_gg_gg_dsf.shape, ", legacy gggg:", cov_gg_gg_leg.shape) +print("covariance shape: dsf gmgg:", cov_gm_gg_dsf.shape, ", legacy gmgg:", cov_gm_gg_leg.shape) +print("covariance shape: dsf joint:", cov_joint_dsf.shape, ", legacy joint:", cov_joint_leg.shape) + +"""fig, ax = plt.subplots(figsize=(5.4, 4.6)) + +image = ax.imshow( + corr, + vmin=-1.0, + vmax=1.0, + origin="lower", +) + +ax.set_title("gm covariance correlation matrix", fontsize=15) +ax.set_xlabel("data-vector index", fontsize=14) +ax.set_ylabel("data-vector index", fontsize=14) +ax.tick_params(axis="both", which="major", labelsize=12) + +cbar = fig.colorbar(image, ax=ax) +cbar.set_label("correlation", fontsize=13) +cbar.ax.tick_params(labelsize=11) + +fig.subplots_adjust(left=0.16, right=0.92, bottom=0.14, top=0.90) + +plt.savefig('./corr_test.pdf')""" \ No newline at end of file diff --git a/benchmarks/covariance/generate_dNdz_for_legacy.py b/benchmarks/covariance/generate_dNdz_for_legacy.py new file mode 100644 index 0000000..30ac2de --- /dev/null +++ b/benchmarks/covariance/generate_dNdz_for_legacy.py @@ -0,0 +1,36 @@ +import numpy as np +import matplotlib.pyplot as plt +from binny import NZTomography + +''' Script to generate redshift distributions for comparison with legacy covariance implementation. + +Borrows heavily from binny examples in docs. ''' + +# Sources, LSST Year 1 + +tomo_source = NZTomography() +results_source = tomo_source.build_survey_bins("lsst", role="source", year="1",include_tomo_metadata=True) + +bin_dict_source = results_source.bins +z_source = results_source.z + +keys_source = sorted(bin_dict_source.keys()) + +# For now just save one source bin to start with. +# Let's use the highest-z bin. +save_source = np.column_stack((z_source, bin_dict_source[4])) +np.savetxt('./dNdz_source_LSSTY1Bin5.dat', save_source) + +# Lenses, DESI LRGs + +tomo_lens = NZTomography() +results_lens = tomo_lens.build_survey_bins("desi", role="lens", sample='lrg', overrides={"bins": {"edges": [0.4, 1.0]}},include_tomo_metadata=True,) + +bin_dict_lens = results_lens.bins +z_lens = results_lens.z + +keys_lens = sorted(bin_dict_lens.keys()) + +# Save: +save_lens = np.column_stack((z_lens, bin_dict_lens[0])) +np.savetxt('./dNdz_lens_DESILRG_1bin.dat', save_lens) \ No newline at end of file From a97da4f44ab05307e698749934fb38b490244a9b Mon Sep 17 00:00:00 2001 From: c-d-leonard Date: Thu, 25 Jun 2026 15:20:12 +0100 Subject: [PATCH 2/4] debugging --- .../covariance/benchmark_covariance_script.py | 244 +++++++++++++++--- 1 file changed, 205 insertions(+), 39 deletions(-) diff --git a/benchmarks/covariance/benchmark_covariance_script.py b/benchmarks/covariance/benchmark_covariance_script.py index d6afa7f..0ab85fc 100644 --- a/benchmarks/covariance/benchmark_covariance_script.py +++ b/benchmarks/covariance/benchmark_covariance_script.py @@ -6,11 +6,21 @@ from dsf.tomography.tomo_builder import TomographyBuilder import pyccl as ccl +# The fractional difference allowed between the legacy and dsf implementation +# 10**(-4) is taken from pyCCL as standard. -cosmo = make_ccl_cosmology( - transfer_function="boltzmann_camb", - matter_power_spectrum="halofit", -) +diff_tol = 10**(-4) + +def is_symmetric(a, tol = 10**(-14)): + return np.all(np.abs(a - a.T) <= tol) + +def is_pos_semi_def(x): + return np.all(np.linalg.eigvals(x) >= 0) + + +#cosmo = make_ccl_cosmology( +# +#) z = np.linspace(0.0, 5.0, 1000) @@ -34,7 +44,10 @@ tomo_inputs = tomography.prepare_bins() -bin_pairs = tomo_inputs["bin_pairs"][:1] +#print(tomo_inputs["source_population_stats"]) + +#bin_pairs = tomo_inputs["bin_pairs"][:1] +bin_pairs = tomo_inputs["bin_pairs"] # This set up gives the highest-z source bin with the single lens bin # Load the bin edges from the legacy code (Mpc/h) @@ -44,7 +57,9 @@ h=0.69 OmB = 0.022/h**2 params = {'OmB':OmB, 'h':h, 'n_s':0.965, 'A_s':2.115 * 10**(-9),'b':2.333, 'OmM': 0.292} -cosmo = ccl.Cosmology(Omega_c = params['OmM'] - params['OmB'], Omega_b = params['OmB'], h = params['h'], A_s=params['A_s'], n_s = params['n_s']) +cosmo = ccl.Cosmology(Omega_c = params['OmM'] - params['OmB'], Omega_b = params['OmB'], h = params['h'], + A_s=params['A_s'], n_s = params['n_s'], transfer_function="boltzmann_camb", + matter_power_spectrum="halofit") # Load the grid in line-of-sight projection used in the legacy code for the gm x gg case (Mpc/h) #pi_grid = np.loadtxt('./Pi_grid.dat') @@ -61,7 +76,8 @@ area_deg2=5000.0, sigma_e=0.26, galaxy_bias=params['b'], - k=np.geomspace(10**(-4), 3.0, 5000), + k=np.geomspace(10**(-4), 30.0, 5000), + nonlinear=True, #pi = pi_grid, hankel_kwargs={ "r_min": 0.6, @@ -80,8 +96,10 @@ dsf_cov_dict = covariance_builder.covariance_for_pair(lens_bin_index=0, - source_bin_index=0) + source_bin_index=4) + +# Get the dsf covariance cov_gm_gm_dsf = dsf_cov_dict['cov_gm_gm'] cov_gg_gg_dsf = dsf_cov_dict['cov_gg_gg'] cov_gm_gg_dsf = dsf_cov_dict['cov_gm_gg'] @@ -93,45 +111,193 @@ np.savetxt('./cov_gmgg_LSSTY1Bin5_DESILRG_dsf.dat', cov_gm_gg_dsf) np.savetxt('./cov_joint_LSSTY1Bin5_DESILRG_dsf.dat', cov_joint_dsf) +# Load the covariance matrices from dsf +cov_gm_gm_dsf = np.loadtxt('./cov_gmgm_LSSTY1Bin5_DESILRG_dsf.dat') +cov_gg_gg_dsf = np.loadtxt('./cov_gggg_LSSTY1Bin5_DESILRG_dsf.dat') +cov_gm_gg_dsf = np.loadtxt('./cov_gmgg_LSSTY1Bin5_DESILRG_dsf.dat') +cov_joint_dsf = np.loadtxt('./cov_joint_LSSTY1Bin5_DESILRG_dsf.dat') + # Get the diagonal errors. -errors_gm_gm = covariance_builder.diagonal_error(cov_gm_gm_dsf) -errors_gg_gg = covariance_builder.diagonal_error(cov_gg_gg_dsf) -errors_gm_gg = covariance_builder.diagonal_error(cov_gm_gg_dsf) -errors_joint = covariance_builder.diagonal_error(cov_joint_dsf) +errors_gm_gm_dsf = covariance_builder.diagonal_error(cov_gm_gm_dsf) +errors_gg_gg_dsf = covariance_builder.diagonal_error(cov_gg_gg_dsf) +errors_gm_gg_dsf = covariance_builder.diagonal_error(cov_gm_gg_dsf) +errors_joint_dsf = covariance_builder.diagonal_error(cov_joint_dsf) -corr = covariance_builder.correlation_matrix(cov_gm_gm_dsf) +# Save the diagonal errors from dsf +np.savetxt('./errors_gmgm_LSSTY1Bin5_DESILRG_dsf.dat', errors_gm_gm_dsf) +np.savetxt('./errors_gggg_LSSTY1Bin5_DESILRG_dsf.dat', errors_gg_gg_dsf) +np.savetxt('./errors_gmgg_LSSTY1Bin5_DESILRG_dsf.dat', errors_gm_gg_dsf) +np.savetxt('./errors_joint_LSSTY1Bin5_DESILRG_dsf.dat', errors_joint_dsf) -# Compare with legacy code: +# Load the diagonal errors from dsf +errors_gm_gm_dsf = np.loadtxt('./errors_gmgm_LSSTY1Bin5_DESILRG_dsf.dat') +errors_gg_gg_dsf = np.loadtxt('./errors_gggg_LSSTY1Bin5_DESILRG_dsf.dat') +errors_gm_gg_dsf = np.loadtxt('./errors_gmgg_LSSTY1Bin5_DESILRG_dsf.dat') +errors_joint_dsf = np.loadtxt('./errors_joint_LSSTY1Bin5_DESILRG_dsf.dat') -# Load the legacy covariances: -cov_gm_gm_leg = np.loadtxt('./cov_gmgm_LSSTY1Bin5_DESILRG_legacy.dat') -cov_gg_gg_leg = np.loadtxt('./cov_gggg_LSSTY1Bin5_DESILRG_legacy.dat') -cov_gm_gg_leg = np.loadtxt('./cov_gmgg_LSSTY1Bin5_DESILRG_legacy.dat') -cov_joint_leg = np.loadtxt('./cov_joint_LSSTY1Bin5_DESILRG_legacy.dat') +# Start checks +Fail = False # Set this to True if anything is failed. -print("covariance shape: dsf gmgm:", cov_gm_gm_dsf.shape, ", legacy gmgm:", cov_gm_gm_leg.shape) -print("covariance shape: dsf gggg:", cov_gg_gg_dsf.shape, ", legacy gggg:", cov_gg_gg_leg.shape) -print("covariance shape: dsf gmgg:", cov_gm_gg_dsf.shape, ", legacy gmgg:", cov_gm_gg_leg.shape) -print("covariance shape: dsf joint:", cov_joint_dsf.shape, ", legacy joint:", cov_joint_leg.shape) +#### Do basic matrix sanity checks -"""fig, ax = plt.subplots(figsize=(5.4, 4.6)) +# Check matrices do not contains NaNs: +if np.any(np.isnan(cov_gm_gm_dsf)): + Fail = True + print('The gm x gm covariance contains at least one NaN') -image = ax.imshow( - corr, - vmin=-1.0, - vmax=1.0, - origin="lower", -) +if np.any(np.isnan(cov_gg_gg_dsf)): + Fail = True + print('The gg x gg covariance contains at least one NaN') + +if np.any(np.isnan(cov_gm_gg_dsf)): + Fail = True + print('The gm x gg covariance contains at least one NaN') + +if np.any(np.isnan(cov_joint_dsf)): + Fail = True + print('The joint covariance contains at least one NaN') + +# Check matrices do not contains infs: +if np.any(np.isinf(cov_gm_gm_dsf)): + Fail = True + print('The gm x gm covariance contains at least one inf') + +if np.any(np.isinf(cov_gg_gg_dsf)): + Fail = True + print('The gg x gg covariance contains at least one inf') + +if np.any(np.isinf(cov_gm_gg_dsf)): + Fail = True + print('The gm x gg covariance contains at least one inf') + +if np.any(np.isinf(cov_joint_dsf)): + Fail = True + print('The joint covariance contains at least one inf') + + +# Make sure the covariances are symmetric +# Note we don't use diff_tol here because this +# is a basic numerical check. + +if is_symmetric(cov_gm_gm_dsf, tol=10**(-12)) == False: + Fail = True + print('The gm x gm covariance is not symmetric.') + +if is_symmetric(cov_gg_gg_dsf, tol=10**(-12)) == False: + Fail = True + print('The gg x gg covariance is not symmetric.') + +if is_symmetric(cov_gm_gg_dsf, tol=10**(-12)) == False: + Fail = True + print('The gm x gg covariance is not symmetric.') + +if is_symmetric(cov_joint_dsf, tol=10**(-12)) == False: + Fail = True + print('The joint covariance is not symmetric.') + +# Make sure the covariances are positive semi-definite. + +if is_pos_semi_def(cov_gm_gm_dsf) == False: + Fail = True + print('The gm x gm covariance is not positive semi-definite.') + +if is_pos_semi_def(cov_gg_gg_dsf) == False: + Fail = True + print('The gg x gg covariance is not positive semi-definite.') + +if is_pos_semi_def(cov_gm_gg_dsf) == False: + Fail = True + print('The gm x gg covariance is not positive semi-definite.') + + +if is_pos_semi_def(cov_joint_dsf) == False: + Fail = True + print('The joint covariance is not positive semi-definite.') + + +### Now compare some ingredients: + +"""shot_noise_dsf = dsf_cov_dict['ingredients']['shot_noise'] # (h / Mpc)^3 +shape_noise_dsf = dsf_cov_dict['ingredients']['shape_noise'] # (h / Mpc)^2 + +shot_noise_leg = np.loadtxt('./shot_noise_LSSTY1Bin5_DESILRG_legacy.dat') +shape_noise_leg = np.loadtxt('./shape_noise_LSSTY1Bin5_DESILRG_legacy.dat') + +if np.abs((shot_noise_leg - shot_noise_dsf)/shot_noise_leg)>=diff_tol: + Fail = True + print('Projected shot noise does not match legacy implementation.') + +if np.abs((shape_noise_leg - shape_noise_dsf)/shape_noise_leg)>=diff_tol: + Fail = True + print('Projected shape noise does not match legacy implementation.')""" + +### Now directly compare the legacy and dsf covariance matrices + +# We know that there is a slightly different approximatin used +# in calculating the volume associated with the lens sample +# in the legacy code vs DSF, so we need to correct for that. + +#vol_dsf = dsf_cov_dict['ingredients']['volume'] # (Mpc/h)^3 +vol_dsf = np.loadtxt('./vol_dsf_LSSTY1Bin5_DESILRG_dsf.dat') +vol_leg = np.loadtxt('./vol_LSSTY1Bin5_DESILRG_legacy.dat') # (Mpc/h)^3 + +leg_vol_to_dsf = vol_leg / vol_dsf # we will multiply legacy covariance by this + +# Load legacy code covariances and correct for volume factor +cov_gm_gm_leg = leg_vol_to_dsf * np.loadtxt('./cov_gmgm_LSSTY1Bin5_DESILRG_legacy.dat') +cov_gg_gg_leg = leg_vol_to_dsf * np.loadtxt('./cov_gggg_LSSTY1Bin5_DESILRG_legacy.dat') +cov_gm_gg_leg = leg_vol_to_dsf * np.loadtxt('./cov_gmgg_LSSTY1Bin5_DESILRG_legacy.dat') +cov_joint_leg = leg_vol_to_dsf * np.loadtxt('./cov_joint_LSSTY1Bin5_DESILRG_legacy.dat') + +# Get diagonal errors of the legacy code: +errors_gm_gm_leg = np.sqrt(np.diag(cov_gm_gm_leg)) +errors_gg_gg_leg = np.sqrt(np.diag(cov_gg_gg_leg)) +errors_gm_gg_leg = np.sqrt(np.diag(cov_gm_gg_leg)) +errors_joint_leg = np.sqrt(np.diag(cov_joint_leg)) + +# Check shapes match + +if cov_gm_gm_dsf.shape != cov_gm_gm_leg.shape: + Fail = True + print('The gm x gm dsf and legacy covariances are different shapes.') + +if cov_gm_gg_dsf.shape != cov_gm_gg_leg.shape: + Fail = True + print('The gm x gg dsf and legacy covariances are different shapes.') + +if cov_gg_gg_dsf.shape != cov_gg_gg_leg.shape: + Fail = True + print('The gg x gg dsf and legacy covariances are different shapes.') + +if cov_joint_dsf.shape != cov_joint_leg.shape: + Fail = True + print('The joint dsf and legacy covariances are different shapes.') + +# Check diagonal errors +fracdiff_gmgm_error = np.abs((errors_gm_gm_dsf - errors_gm_gm_leg) / errors_gm_gm_leg) +fracdiff_gggg_error = np.abs((errors_gg_gg_dsf - errors_gg_gg_leg) / errors_gg_gg_leg) +fracdiff_gmgg_error = np.abs((errors_gm_gg_dsf - errors_gm_gg_leg) / errors_gm_gg_leg) +fracdiff_joint_error = np.abs((errors_joint_dsf - errors_joint_leg) / errors_joint_leg) +print("Frac diff, dsf vs legacy diagonal errors, gmgm=", fracdiff_gmgm_error) +print("Frac diff, dsf vs legacy diagonal errors, gggg=", fracdiff_gggg_error) +print("Frac diff, dsf vs legacy diagonal errors, gmgg=", fracdiff_gmgg_error) +print("Frac diff, dsf vs legacy diagonal errors, joint=", fracdiff_joint_error) + +if np.any(fracdiff_gmgm_error)>diff_tol: + Fail=True + print('The fractional difference in the diagonal error terms between legacy and dsf for the gm x gm term is greater than the tolerance.') -ax.set_title("gm covariance correlation matrix", fontsize=15) -ax.set_xlabel("data-vector index", fontsize=14) -ax.set_ylabel("data-vector index", fontsize=14) -ax.tick_params(axis="both", which="major", labelsize=12) +if np.any(fracdiff_gggg_error)>diff_tol: + Fail=True + print('The fractional difference in the diagonal error terms between legacy and dsf for the gg x gg term is greater than the tolerance.') -cbar = fig.colorbar(image, ax=ax) -cbar.set_label("correlation", fontsize=13) -cbar.ax.tick_params(labelsize=11) +if np.any(fracdiff_gmgg_error)>diff_tol: + Fail=True + print('The fractional difference in the diagonal error terms between legacy and dsf for the gm x gg term is greater than the tolerance.') -fig.subplots_adjust(left=0.16, right=0.92, bottom=0.14, top=0.90) +if np.any(fracdiff_joint_error)>diff_tol: + Fail=True + print('The fractional difference in the diagonal error terms between legacy and dsf for the joint covariance is greater than the tolerance.') -plt.savefig('./corr_test.pdf')""" \ No newline at end of file +if Fail == False: + print('The covariance benchmark passed!') From ee3d37bc54feb71b903387bb347955a79589088b Mon Sep 17 00:00:00 2001 From: c-d-leonard Date: Fri, 26 Jun 2026 13:31:54 +0100 Subject: [PATCH 3/4] fix square / integration order in Delta Pi covariance terms --- src/dsf/covariance/ingredients/geometry.py | 3 +- src/dsf/covariance/ingredients/sigma_crit.py | 116 +++++++++++++++++++ 2 files changed, 118 insertions(+), 1 deletion(-) diff --git a/src/dsf/covariance/ingredients/geometry.py b/src/dsf/covariance/ingredients/geometry.py index 1620c9c..2dd905f 100644 --- a/src/dsf/covariance/ingredients/geometry.py +++ b/src/dsf/covariance/ingredients/geometry.py @@ -30,6 +30,7 @@ from .sigma_crit import ( effective_sigma_crit_squared, + effective_squared_sigma_crit, sigma_crit_inverse_comoving, ) @@ -388,7 +389,7 @@ def gm_lensing_window( chi_interp = comoving_distance_h(cosmo, z_interp, h=h) sigma_crit_average = np.sqrt( - effective_sigma_crit_squared( + effective_squared_sigma_crit( cosmo, z_lens=z_lens_arr, nz_lens=nz_lens_arr, diff --git a/src/dsf/covariance/ingredients/sigma_crit.py b/src/dsf/covariance/ingredients/sigma_crit.py index 4137efa..7fd00fe 100644 --- a/src/dsf/covariance/ingredients/sigma_crit.py +++ b/src/dsf/covariance/ingredients/sigma_crit.py @@ -23,7 +23,9 @@ "effective_sigma_crit_squared", "sigma_crit_inverse_comoving", "sigma_crit_inverse_source_average", + "sigma_crit_squared_inverse_source_average", "sigma_crit_squared_average", + "effective_squared_sigma_crit", ] @@ -126,6 +128,50 @@ def sigma_crit_inverse_source_average( return float(trapezoid_integral(sigma_inv * nz_source_arr, z_source_arr)) +def sigma_crit_squared_inverse_source_average( + cosmo: ccl.Cosmology, + *, + z_lens: float, + z_source: FloatArray, + nz_source: FloatArray, + h: float | None = None, + sigma_crit_prefactor: float, +) -> float: + """Return the source-averaged squared inverse comoving critical surface density. + + This averages the lensing efficiency squared for a fixed lens redshift over the + source redshift distribution. + + Args: + cosmo: CCL cosmology object. + z_lens: Lens redshift. + z_source: Source redshift grid. + nz_source: Normalized source redshift distribution. + h: Dimensionless Hubble parameter. If not supplied, read from ``cosmo["h"]``. + sigma_crit_prefactor: Unit-conversion prefactor defining the desired + critical-surface-density convention. + + Returns: + Source-averaged inverse comoving critical surface density. + """ + h = resolve_h(cosmo, h) + + z_source_arr, nz_source_arr = validate_redshift_distribution( + z_source, + nz_source, + name="nz_source", + ) + + sigma_inv = sigma_crit_inverse_comoving( + cosmo, + z_lens, + z_source_arr, + h=h, + sigma_crit_prefactor=sigma_crit_prefactor, + ) + + return float(trapezoid_integral(sigma_inv**2 * nz_source_arr, z_source_arr)) + def effective_sigma_crit_squared( cosmo: ccl.Cosmology, @@ -196,6 +242,76 @@ def effective_sigma_crit_squared( return 1.0 / sigma_inv_avg**2 +def effective_squared_sigma_crit( + cosmo: ccl.Cosmology, + *, + z_lens: FloatArray, + nz_lens: FloatArray, + z_source: FloatArray, + nz_source: FloatArray, + h: float | None = None, + sigma_crit_prefactor: float, +) -> float: + r"""Return the critical-surface-density squared and thenaveraged + over the source and lens redshift distributions. + + This quantity converts source shape noise into DeltaSigma covariance units + for a lens-source tomographic bin pair. + + Args: + cosmo: CCL cosmology object. + z_lens: Lens redshift grid. + nz_lens: Normalized lens redshift distribution. + z_source: Source redshift grid. + nz_source: Normalized source redshift distribution. + h: Dimensionless Hubble parameter. If not supplied, read from ``cosmo["h"]``. + sigma_crit_prefactor: Unit-conversion prefactor defining the desired + critical-surface-density convention. + + Returns: + Effective :math:`\Sigma_c^2` factor for the lens-source bin pair. + """ + h = resolve_h(cosmo, h) + + z_lens_arr, nz_lens_arr = validate_redshift_distribution( + z_lens, + nz_lens, + name="nz_lens", + ) + + z_source_arr, nz_source_arr = validate_redshift_distribution( + z_source, + nz_source, + name="nz_source", + ) + + sigma_sq_inv_source_avg = np.asarray( + [ + sigma_crit_squared_inverse_source_average( + cosmo, + z_lens=z_value, + z_source=z_source_arr, + nz_source=nz_source_arr, + h=h, + sigma_crit_prefactor=sigma_crit_prefactor, + ) + for z_value in z_lens_arr + ], + dtype=float, + ) + + sigma_sq_inv_avg = float( + trapezoid_integral( + sigma_sq_inv_source_avg * nz_lens_arr, + z_lens_arr, + ) + ) + + if not np.isfinite(sigma_sq_inv_avg) or sigma_sq_inv_avg <= 0.0: + raise ValueError("Average SigmaCrit inverse must be finite and positive.") + + return 1.0 / sigma_sq_inv_avg + def sigma_crit_squared_average( cosmo: ccl.Cosmology, From 2810e0eae8cbc5a0a3fde56145cb391017d47190 Mon Sep 17 00:00:00 2001 From: c-d-leonard Date: Fri, 26 Jun 2026 15:21:10 +0100 Subject: [PATCH 4/4] add data files, readme --- benchmarks/covariance/README.md | 29 ++++++--- .../covariance/benchmark_covariance_script.py | 60 ++++--------------- .../cov_gggg_LSSTY1Bin5_DESILRG_legacy.dat | 19 ++++++ .../cov_gmgg_LSSTY1Bin5_DESILRG_legacy.dat | 19 ++++++ .../cov_gmgm_LSSTY1Bin5_DESILRG_legacy.dat | 19 ++++++ .../cov_joint_LSSTY1Bin5_DESILRG_legacy.dat | 38 ++++++++++++ benchmarks/covariance/rp_bin_edges.dat | 20 +++++++ .../shape_noise_LSSTY1Bin5_DESILRG_legacy.dat | 1 + .../shot_noise_LSSTY1Bin5_DESILRG_legacy.dat | 1 + .../vol_LSSTY1Bin5_DESILRG_legacy.dat | 1 + src/dsf/covariance/cov_builder.py | 4 +- src/dsf/covariance/ingredients/geometry.py | 1 - 12 files changed, 154 insertions(+), 58 deletions(-) create mode 100644 benchmarks/covariance/cov_gggg_LSSTY1Bin5_DESILRG_legacy.dat create mode 100644 benchmarks/covariance/cov_gmgg_LSSTY1Bin5_DESILRG_legacy.dat create mode 100644 benchmarks/covariance/cov_gmgm_LSSTY1Bin5_DESILRG_legacy.dat create mode 100644 benchmarks/covariance/cov_joint_LSSTY1Bin5_DESILRG_legacy.dat create mode 100644 benchmarks/covariance/rp_bin_edges.dat create mode 100644 benchmarks/covariance/shape_noise_LSSTY1Bin5_DESILRG_legacy.dat create mode 100644 benchmarks/covariance/shot_noise_LSSTY1Bin5_DESILRG_legacy.dat create mode 100644 benchmarks/covariance/vol_LSSTY1Bin5_DESILRG_legacy.dat diff --git a/benchmarks/covariance/README.md b/benchmarks/covariance/README.md index e82786a..627fd34 100644 --- a/benchmarks/covariance/README.md +++ b/benchmarks/covariance/README.md @@ -6,18 +6,33 @@ These scripts compare DSF covariance predictions against legacy or reference imp ## Compare to legacy code -### One lens / source bin pair +### One lens / source bin pair: We compare the covariance output from the legacy code from Dani Leonard et al. with the dsf covariance builder, using a single bin for DESI LRGs and the highest-z bin of sources in an LSST Year 1 set up with 5 equipopulated photometric bins. -``` generate_dNdz_for_legacy.py``` generates the redshift distributions that are fed into the legacy code to produce the covariance. +To run the benchmark, just run `python benchmark_covariance_scripy.py`. This will do a number of checks (see script for details), output the fractional difference in the diagonal elements between the dsf and legacy implementations, and tell you if the benchmark passed or not, and if not, why. -``` dNdz_source_LSSTY1Bin5.dat``` contains (z, dNdz) for the sources +`generate_dNdz_for_legacy.py` generates the redshift distributions that are fed into the legacy code to produce the covariance. -```dNdz_lens_DESI_LRG_1bin.dat``` contains (z, dNdz) for the lenses +`dNdz_source_LSSTY1Bin5.dat` contains (z, dNdz) for the sources -```rp_bin_edges.dat``` contains the edges of the projected radial bins, in Mpc/h. +`dNdz_lens_DESI_LRG_1bin.dat` contains (z, dNdz) for the lenses -```rp_bin_centres.dat``` contains the centres of the projected radial bins, in Mpc/h. +`rp_bin_edges.dat` contains the edges of the projected radial bins, in Mpc/h. -``` cov_gmgm_LSSTY1Bin5_DESILRG.dat``` contains the covariance of Delta Sigma from the legacy code, using projected radial bins defined by rp_bin_edges/centres, in units ```Msun^2 h^2 / pc^4```. +`rp_bin_centres.dat` contains the centres of the projected radial bins, in Mpc/h. + +`cov_gmgm_LSSTY1Bin5_DESILRG_legacy.dat` contains the covariance of Delta Sigma gm from the legacy code, using projected radial bins defined by rp_bin_edges/centres, in units `Msun^2 h^2 / pc^4`. + +`cov_gggg_LSSTY1Bin5_DESILRG_legacy.dat` contains the covariance of Delta Sigma gg from the legacy code, using projected radial bins defined by rp_bin_edges/centres, in units `Msun^2 h^2 / pc^4`. + + +`cov_gmgg_LSSTY1Bin5_DESILRG_legacy.dat` contains the cross-covariance of Delta Sigma gm x Delta Sigma gg from the legacy code, using projected radial bins defined by rp_bin_edges/centres, in units `Msun^2 h^2 / pc^4`. + +`cov_joint_LSSTY1Bin5_DESILRG_legacy.dat` contains the joint covariance of Delta Sigma gm x gm, gm x gg, and gg x gg from the legacy code, using projected radial bins defined by rp_bin_edges/centres, in units `Msun^2 h^2 / pc^4`. + +`vol_LSSTY1Bin5_DESILRG_legacy.dat` contains the volume associated with the lens sample in the legacy implementation, in units `Mpc/h`. Note this volume is different than dsf volume due to a change in approximation choice. + +`shape_noise_LSSTY1Bin5_DESILRG_legacy.dat` contains the projected shape noise term in the legacy implementation, in units `h^2 / Mpc^2`. + +`shot_noise_LSSTY1Bin5_DESILRG_legacy.dat` contains the projected shot noise term in the legacy implementation, in units `h^3 / Mpc^3`. diff --git a/benchmarks/covariance/benchmark_covariance_script.py b/benchmarks/covariance/benchmark_covariance_script.py index 0ab85fc..0c9eb55 100644 --- a/benchmarks/covariance/benchmark_covariance_script.py +++ b/benchmarks/covariance/benchmark_covariance_script.py @@ -6,10 +6,10 @@ from dsf.tomography.tomo_builder import TomographyBuilder import pyccl as ccl -# The fractional difference allowed between the legacy and dsf implementation -# 10**(-4) is taken from pyCCL as standard. +# The fractional difference allowed between the legacy and dsf implementation. +diff_tol = 10**(-2) -diff_tol = 10**(-4) +# Helper function: def is_symmetric(a, tol = 10**(-14)): return np.all(np.abs(a - a.T) <= tol) @@ -18,10 +18,6 @@ def is_pos_semi_def(x): return np.all(np.linalg.eigvals(x) >= 0) -#cosmo = make_ccl_cosmology( -# -#) - z = np.linspace(0.0, 5.0, 1000) tomography = TomographyBuilder( @@ -44,11 +40,8 @@ def is_pos_semi_def(x): tomo_inputs = tomography.prepare_bins() -#print(tomo_inputs["source_population_stats"]) - -#bin_pairs = tomo_inputs["bin_pairs"][:1] -bin_pairs = tomo_inputs["bin_pairs"] # This set up gives the highest-z source bin with the single lens bin +bin_pairs = tomo_inputs["bin_pairs"] # Load the bin edges from the legacy code (Mpc/h) rp_bin_edges = np.loadtxt('./rp_bin_edges.dat') @@ -61,9 +54,6 @@ def is_pos_semi_def(x): A_s=params['A_s'], n_s = params['n_s'], transfer_function="boltzmann_camb", matter_power_spectrum="halofit") -# Load the grid in line-of-sight projection used in the legacy code for the gm x gg case (Mpc/h) -#pi_grid = np.loadtxt('./Pi_grid.dat') - # Specifics here are set to match what was provided for the legacy code. covariance_builder = DeltaSigmaCovarianceBuilder( cosmo=cosmo, @@ -91,10 +81,9 @@ def is_pos_semi_def(x): "verbose": True, "max_iterations": 1000, }, - taper=False, + taper=True, ) - dsf_cov_dict = covariance_builder.covariance_for_pair(lens_bin_index=0, source_bin_index=4) @@ -105,36 +94,12 @@ def is_pos_semi_def(x): cov_gm_gg_dsf = dsf_cov_dict['cov_gm_gg'] cov_joint_dsf = dsf_cov_dict['cov_joint'] -# Save the covariance matrices from dsf -np.savetxt('./cov_gmgm_LSSTY1Bin5_DESILRG_dsf.dat', cov_gm_gm_dsf) -np.savetxt('./cov_gggg_LSSTY1Bin5_DESILRG_dsf.dat', cov_gg_gg_dsf) -np.savetxt('./cov_gmgg_LSSTY1Bin5_DESILRG_dsf.dat', cov_gm_gg_dsf) -np.savetxt('./cov_joint_LSSTY1Bin5_DESILRG_dsf.dat', cov_joint_dsf) - -# Load the covariance matrices from dsf -cov_gm_gm_dsf = np.loadtxt('./cov_gmgm_LSSTY1Bin5_DESILRG_dsf.dat') -cov_gg_gg_dsf = np.loadtxt('./cov_gggg_LSSTY1Bin5_DESILRG_dsf.dat') -cov_gm_gg_dsf = np.loadtxt('./cov_gmgg_LSSTY1Bin5_DESILRG_dsf.dat') -cov_joint_dsf = np.loadtxt('./cov_joint_LSSTY1Bin5_DESILRG_dsf.dat') - # Get the diagonal errors. errors_gm_gm_dsf = covariance_builder.diagonal_error(cov_gm_gm_dsf) errors_gg_gg_dsf = covariance_builder.diagonal_error(cov_gg_gg_dsf) errors_gm_gg_dsf = covariance_builder.diagonal_error(cov_gm_gg_dsf) errors_joint_dsf = covariance_builder.diagonal_error(cov_joint_dsf) -# Save the diagonal errors from dsf -np.savetxt('./errors_gmgm_LSSTY1Bin5_DESILRG_dsf.dat', errors_gm_gm_dsf) -np.savetxt('./errors_gggg_LSSTY1Bin5_DESILRG_dsf.dat', errors_gg_gg_dsf) -np.savetxt('./errors_gmgg_LSSTY1Bin5_DESILRG_dsf.dat', errors_gm_gg_dsf) -np.savetxt('./errors_joint_LSSTY1Bin5_DESILRG_dsf.dat', errors_joint_dsf) - -# Load the diagonal errors from dsf -errors_gm_gm_dsf = np.loadtxt('./errors_gmgm_LSSTY1Bin5_DESILRG_dsf.dat') -errors_gg_gg_dsf = np.loadtxt('./errors_gggg_LSSTY1Bin5_DESILRG_dsf.dat') -errors_gm_gg_dsf = np.loadtxt('./errors_gmgg_LSSTY1Bin5_DESILRG_dsf.dat') -errors_joint_dsf = np.loadtxt('./errors_joint_LSSTY1Bin5_DESILRG_dsf.dat') - # Start checks Fail = False # Set this to True if anything is failed. @@ -217,7 +182,7 @@ def is_pos_semi_def(x): ### Now compare some ingredients: -"""shot_noise_dsf = dsf_cov_dict['ingredients']['shot_noise'] # (h / Mpc)^3 +shot_noise_dsf = dsf_cov_dict['ingredients']['shot_noise'] # (h / Mpc)^3 shape_noise_dsf = dsf_cov_dict['ingredients']['shape_noise'] # (h / Mpc)^2 shot_noise_leg = np.loadtxt('./shot_noise_LSSTY1Bin5_DESILRG_legacy.dat') @@ -229,7 +194,7 @@ def is_pos_semi_def(x): if np.abs((shape_noise_leg - shape_noise_dsf)/shape_noise_leg)>=diff_tol: Fail = True - print('Projected shape noise does not match legacy implementation.')""" + print('Projected shape noise does not match legacy implementation.') ### Now directly compare the legacy and dsf covariance matrices @@ -237,8 +202,7 @@ def is_pos_semi_def(x): # in calculating the volume associated with the lens sample # in the legacy code vs DSF, so we need to correct for that. -#vol_dsf = dsf_cov_dict['ingredients']['volume'] # (Mpc/h)^3 -vol_dsf = np.loadtxt('./vol_dsf_LSSTY1Bin5_DESILRG_dsf.dat') +vol_dsf = dsf_cov_dict['ingredients']['volume'] # (Mpc/h)^3 vol_leg = np.loadtxt('./vol_LSSTY1Bin5_DESILRG_legacy.dat') # (Mpc/h)^3 leg_vol_to_dsf = vol_leg / vol_dsf # we will multiply legacy covariance by this @@ -283,19 +247,19 @@ def is_pos_semi_def(x): print("Frac diff, dsf vs legacy diagonal errors, gmgg=", fracdiff_gmgg_error) print("Frac diff, dsf vs legacy diagonal errors, joint=", fracdiff_joint_error) -if np.any(fracdiff_gmgm_error)>diff_tol: +if np.any(fracdiff_gmgm_error>diff_tol): Fail=True print('The fractional difference in the diagonal error terms between legacy and dsf for the gm x gm term is greater than the tolerance.') -if np.any(fracdiff_gggg_error)>diff_tol: +if np.any(fracdiff_gggg_error>diff_tol): Fail=True print('The fractional difference in the diagonal error terms between legacy and dsf for the gg x gg term is greater than the tolerance.') -if np.any(fracdiff_gmgg_error)>diff_tol: +if np.any(fracdiff_gmgg_error>diff_tol): Fail=True print('The fractional difference in the diagonal error terms between legacy and dsf for the gm x gg term is greater than the tolerance.') -if np.any(fracdiff_joint_error)>diff_tol: +if np.any(fracdiff_joint_error>diff_tol): Fail=True print('The fractional difference in the diagonal error terms between legacy and dsf for the joint covariance is greater than the tolerance.') diff --git a/benchmarks/covariance/cov_gggg_LSSTY1Bin5_DESILRG_legacy.dat b/benchmarks/covariance/cov_gggg_LSSTY1Bin5_DESILRG_legacy.dat new file mode 100644 index 0000000..1e5e1c1 --- /dev/null +++ b/benchmarks/covariance/cov_gggg_LSSTY1Bin5_DESILRG_legacy.dat @@ -0,0 +1,19 @@ +6.368507758518909823e-02 4.475652552450619208e-03 1.886990547968383841e-03 8.452345601740413137e-04 4.124885471792509367e-04 2.131286538384854524e-04 1.202536078886718156e-04 7.405475350219068874e-05 4.858958749029618955e-05 3.323107473427498948e-05 2.345785291065273119e-05 1.677864430903941442e-05 1.191680096482762963e-05 8.273269555088806157e-06 5.507471654836089368e-06 3.453006663195165648e-06 2.000705495767307549e-06 1.052082106621268966e-06 2.801883721279086389e-07 +4.475652552450620943e-03 4.853114767055208278e-02 3.618807966206491478e-03 1.452872860131817134e-03 6.966019997304451639e-04 3.514784096508745403e-04 1.965518504860120426e-04 1.203690310807287557e-04 7.881605517300003800e-05 5.388450270019677819e-05 3.804155510694163861e-05 2.721590032771745870e-05 1.933326681625335936e-05 1.342421059019757025e-05 8.937363771518764641e-06 5.603836677111001538e-06 3.247060647438518570e-06 1.707515346582983699e-06 4.548422214697760383e-07 +1.886990547968384925e-03 3.618807966206491478e-03 2.672290572277041809e-02 2.958347580821472141e-03 1.257748240747141779e-03 6.056388777925074407e-04 3.298892040360539880e-04 2.000266180482162962e-04 1.305320664087824070e-04 8.917993747991105071e-05 6.296998394515724391e-05 4.506623686237605877e-05 3.202444591743527750e-05 2.224233895662580310e-05 1.481087014200659695e-05 9.287762447893484316e-06 5.382074177381431142e-06 2.830333088720199496e-06 7.542263942621085684e-07 +8.452345601740405548e-04 1.452872860131817134e-03 2.958347580821472141e-03 2.026120100013884331e-02 2.518682543628023192e-03 1.062145254834871103e-03 5.507452203230980359e-04 3.276165110395457794e-04 2.124935781676273944e-04 1.449933595737269124e-04 1.024041553635569711e-04 7.332872217157015721e-05 5.213530697846546248e-05 3.622513360352057360e-05 2.412868661322879751e-05 1.513382757690394502e-05 8.770810158419497889e-06 4.612629205156955688e-06 1.229909766360695989e-06 +4.124885471792509367e-04 6.966019997304453808e-04 1.257748240747141779e-03 2.518682543628022324e-03 1.294691812041060333e-02 2.061618697922403768e-03 9.364747358448742565e-04 5.340550426733143945e-04 3.420314452417945700e-04 2.327861687300027517e-04 1.644586214645218556e-04 1.178689109226383353e-04 8.387324387456899176e-05 5.831629344121581340e-05 3.886093911622779350e-05 2.438172909255693679e-05 1.413317635469346592e-05 7.433301876023163888e-06 1.983923596205972805e-06 +2.131286538384852627e-04 3.514784096508743777e-04 6.056388777925073323e-04 1.062145254834871320e-03 2.061618697922404202e-03 8.903630035796191583e-03 1.793924133245684144e-03 8.984762775106402760e-04 5.576244048793571996e-04 3.771951846289146783e-04 2.665393082677470940e-04 1.913080744115444772e-04 1.363229147557401771e-04 9.488866081096710662e-05 6.328063081724832179e-05 3.972355487422395961e-05 2.303369634123461751e-05 1.211599971167383592e-05 3.238880894588123737e-06 +1.202536078886719511e-04 1.965518504860122866e-04 3.298892040360539880e-04 5.507452203230978191e-04 9.364747358448742565e-04 1.793924133245684144e-03 6.479539825441661509e-03 1.644842466175180798e-03 9.121448703559565090e-04 6.062035342455449755e-04 4.281008576878591546e-04 3.079615153584105568e-04 2.199489162224436197e-04 1.533702013629067128e-04 1.024090234340820554e-04 6.433984625800309427e-05 3.732690412472201781e-05 1.963814437618834635e-05 5.263160280161786447e-06 +7.405475350219071584e-05 1.203690310807287557e-04 2.000266180482162962e-04 3.276165110395458336e-04 5.340550426733143945e-04 8.984762775106402760e-04 1.644842466175180798e-03 4.848462604716078858e-03 1.584500446299621362e-03 9.706215782213502112e-04 6.817044871835399198e-04 4.920169351750524819e-04 3.527107293596798594e-04 2.466615517236950663e-04 1.650385644511419151e-04 1.038291637533681903e-04 6.028782503754476663e-05 3.172736816793462539e-05 8.538266511476802701e-06 +4.858958749029621666e-05 7.881605517299999735e-05 1.305320664087823799e-04 2.124935781676273402e-04 3.420314452417946784e-04 5.576244048793573081e-04 9.121448703559567259e-04 1.584500446299621362e-03 3.846624516416157977e-03 1.612010199223595829e-03 1.080235656949372425e-03 7.823376485533152470e-04 5.642721575542698634e-04 3.965342377270438153e-04 2.662241335022739780e-04 1.678648295469399739e-04 9.760648427505285265e-05 5.138902238199245093e-05 1.392288620797764434e-05 +3.323107473427505047e-05 5.388450270019675786e-05 8.917993747991107781e-05 1.449933595737269124e-04 2.327861687300027517e-04 3.771951846289146783e-04 6.062035342455448670e-04 9.706215782213502112e-04 1.612010199223596479e-03 3.258960467719900552e-03 1.741643476318215956e-03 1.238390472275910674e-03 9.020104422714753751e-04 6.392251561037616374e-04 4.316951679018828873e-04 2.732460389540333507e-04 1.592593143926027458e-04 8.390028064521681621e-05 2.298888146952433271e-05 +2.345785291065274474e-05 3.804155510694163183e-05 6.296998394515724391e-05 1.024041553635569575e-04 1.644586214645218556e-04 2.665393082677471482e-04 4.281008576878589920e-04 6.817044871835399198e-04 1.080235656949372425e-03 1.741643476318215956e-03 3.061029592548868312e-03 1.936271782497659810e-03 1.415028711156066576e-03 1.017293786502081838e-03 6.939727532872683397e-04 4.421003055469429027e-04 2.586961994196297805e-04 1.363875062214761353e-04 3.807161588395795697e-05 +1.677864430903945169e-05 2.721590032771744515e-05 4.506623686237608587e-05 7.332872217157015721e-05 1.178689109226383353e-04 1.913080744115444229e-04 3.079615153584105568e-04 4.920169351750524819e-04 7.823376485533153554e-04 1.238390472275910674e-03 1.936271782497659593e-03 3.024588764717093398e-03 2.171993734137579388e-03 1.592175254443112123e-03 1.105981137941243085e-03 7.126124732800847737e-04 4.198339447119756301e-04 2.214815015676863531e-04 6.381381633798216427e-05 +1.191680096482761947e-05 1.933326681625335258e-05 3.202444591743527750e-05 5.213530697846546248e-05 8.387324387456899176e-05 1.363229147557402314e-04 2.199489162224436197e-04 3.527107293596798594e-04 5.642721575542698634e-04 9.020104422714753751e-04 1.415028711156066576e-03 2.171993734137579388e-03 3.145773571486599508e-03 2.423183047542502248e-03 1.737182621436473336e-03 1.143096213494850400e-03 6.816742898046806391e-04 3.595559574081823111e-04 1.093759356889585405e-04 +8.273269555088804463e-06 1.342421059019756686e-05 2.224233895662579971e-05 3.622513360352056682e-05 5.831629344121579307e-05 9.488866081096710662e-05 1.533702013629067399e-04 2.466615517236950663e-04 3.965342377270438153e-04 6.392251561037616374e-04 1.017293786502081404e-03 1.592175254443112123e-03 2.423183047542502248e-03 3.328384964849622277e-03 2.635441964441503308e-03 1.806655948697129862e-03 1.102354636906747879e-03 5.808883480124648734e-04 1.929845335225605703e-04 +5.507471654836091909e-06 8.937363771518764641e-06 1.481087014200659356e-05 2.412868661322879751e-05 3.886093911622780028e-05 6.328063081724830824e-05 1.024090234340820554e-04 1.650385644511419151e-04 2.662241335022740322e-04 4.316951679018828873e-04 6.939727532872683397e-04 1.105981137941243085e-03 1.737182621436473336e-03 2.635441964441503308e-03 3.500119858914366600e-03 2.759208376492259650e-03 1.765574369826401931e-03 9.355548807471448201e-04 3.518714528143026751e-04 +3.453006663195163107e-06 5.603836677110994762e-06 9.287762447893487704e-06 1.513382757690393994e-05 2.438172909255693679e-05 3.972355487422395961e-05 6.433984625800309427e-05 1.038291637533681903e-04 1.678648295469400281e-04 2.732460389540334049e-04 4.421003055469429027e-04 7.126124732800847737e-04 1.143096213494850400e-03 1.806655948697129862e-03 2.759208376492259650e-03 3.592647620375256836e-03 2.727271157040773910e-03 1.510580073446350213e-03 6.538724340959140577e-04 +2.000705495767309243e-06 3.247060647438522805e-06 5.382074177381427753e-06 8.770810158419492807e-06 1.413317635469346083e-05 2.303369634123461751e-05 3.732690412472201104e-05 6.028782503754478018e-05 9.760648427505287975e-05 1.592593143926027458e-04 2.586961994196297805e-04 4.198339447119756301e-04 6.816742898046806391e-04 1.102354636906747879e-03 1.765574369826401931e-03 2.727271157040773910e-03 3.472448857883127758e-03 2.427304868821669043e-03 1.212573438075919717e-03 +1.052082106621266848e-06 1.707515346582983064e-06 2.830333088720200767e-06 4.612629205156957382e-06 7.433301876023163888e-06 1.211599971167383592e-05 1.963814437618834297e-05 3.172736816793462539e-05 5.138902238199245093e-05 8.390028064521681621e-05 1.363875062214761353e-04 2.214815015676863531e-04 3.595559574081823111e-04 5.808883480124648734e-04 9.355548807471446033e-04 1.510580073446350213e-03 2.427304868821669043e-03 3.196635133376424676e-03 2.167074622988353783e-03 +2.801883721279082154e-07 4.548422214697775206e-07 7.542263942621072979e-07 1.229909766360695989e-06 1.983923596205971957e-06 3.238880894588123737e-06 5.263160280161786447e-06 8.538266511476802701e-06 1.392288620797764434e-05 2.298888146952433271e-05 3.807161588395795697e-05 6.381381633798217782e-05 1.093759356889585405e-04 1.929845335225605703e-04 3.518714528143026751e-04 6.538724340959141661e-04 1.212573438075919717e-03 2.167074622988353350e-03 2.968932440846819634e-03 diff --git a/benchmarks/covariance/cov_gmgg_LSSTY1Bin5_DESILRG_legacy.dat b/benchmarks/covariance/cov_gmgg_LSSTY1Bin5_DESILRG_legacy.dat new file mode 100644 index 0000000..854083b --- /dev/null +++ b/benchmarks/covariance/cov_gmgg_LSSTY1Bin5_DESILRG_legacy.dat @@ -0,0 +1,19 @@ +3.873947329821256767e-04 2.482654249756422512e-04 1.182667048545758652e-04 5.658212954252074116e-05 2.922379415207877195e-05 1.587429499443779665e-05 9.427105049907696515e-06 6.098987951773693857e-06 4.207047026915229933e-06 3.024238824839160626e-06 2.235264527856705828e-06 1.663794603047565207e-06 1.221059037045703996e-06 8.695165755806494333e-07 5.898790252545350903e-07 3.749439055621312698e-07 2.193766976457649544e-07 1.159915796912387650e-07 3.143267932479545980e-08 +2.482654249756423054e-04 3.641086611620774835e-04 2.117124424026522404e-04 9.774653511628187471e-05 4.901213703899948306e-05 2.611937072426887818e-05 1.536176037744499615e-05 9.898074428260449217e-06 6.819411745406304791e-06 4.901931840166511337e-06 3.624109294208210226e-06 2.698394337768115702e-06 1.980850794262533601e-06 1.410824959500567162e-06 9.572198285950536182e-07 6.084853744242953922e-07 3.560374380426882117e-07 1.882516712395424079e-07 5.102604072087817218e-08 +1.182667048545758517e-04 2.117124424026522404e-04 3.134713689130410198e-04 1.843744556533642492e-04 8.701785775680000612e-05 4.452715073290201971e-05 2.567310310595264232e-05 1.641001633268533686e-05 1.127934363746276751e-05 8.106798985042123858e-06 5.996457907161010779e-06 4.467181864855874748e-06 3.280747677844879614e-06 2.337412087120434709e-06 1.586236797148158261e-06 1.008482257837801846e-06 5.901349452994702941e-07 3.120377286882500541e-07 8.461212979646503562e-08 +5.658212954252075472e-05 9.774653511628187471e-05 1.843744556533642492e-04 2.868147905591349558e-04 1.626292584223868333e-04 7.667660816089838635e-05 4.251324060612077921e-05 2.677267886696674127e-05 1.832334797408521928e-05 1.316520506451688610e-05 9.745277612760063201e-06 7.266047733462695784e-06 5.339952350249944027e-06 3.806440143758089961e-06 2.584033730041313518e-06 1.643214814225584515e-06 9.616913964847105401e-07 5.085233369147651243e-07 1.379760978149279355e-07 +2.922379415207877195e-05 4.901213703899950339e-05 8.701785775680000612e-05 1.626292584223867790e-04 2.505012795045964756e-04 1.409389765204234544e-04 7.109432504229706764e-05 4.332858187726459519e-05 2.938959011818451485e-05 2.109665562648541651e-05 1.563413089326085999e-05 1.167257932440602759e-05 8.587968965355847597e-06 6.126681546620210980e-06 4.161412550267959380e-06 2.647228194881345651e-06 1.549625299179192924e-06 8.194691049487145913e-07 2.225641665020599333e-07 +1.587429499443779665e-05 2.611937072426887818e-05 4.452715073290203327e-05 7.667660816089838635e-05 1.409389765204234815e-04 2.234776628097140437e-04 1.295978660113390963e-04 7.180944786318207681e-05 4.760455277079806119e-05 3.407185219479274646e-05 2.529298874068885224e-05 1.892653727634662376e-05 1.395097145909165727e-05 9.966147271181514312e-06 6.775428083725877461e-06 4.312647425293509189e-06 2.525430210118837555e-06 1.335645107193929686e-06 3.633500161289179774e-07 +9.427105049907696515e-06 1.536176037744499954e-05 2.567310310595264232e-05 4.251324060612077921e-05 7.109432504229706764e-05 1.295978660113390963e-04 2.056357526207768091e-04 1.255292805236046273e-04 7.686865877038779194e-05 5.444602002138178298e-05 4.050338173495685165e-05 3.041800105897283788e-05 2.248956324075212826e-05 1.610113131884310207e-05 1.096237699939818887e-05 6.984347660313650237e-06 4.092315173098333391e-06 2.164721714695801562e-06 5.904424753441843371e-07 +6.098987951773693857e-06 9.898074428260447523e-06 1.641001633268534025e-05 2.677267886696674127e-05 4.332858187726459519e-05 7.180944786318210391e-05 1.255292805236046273e-04 1.952519125524722452e-04 1.283667564524361014e-04 8.622209517636677644e-05 6.416724222117673436e-05 4.846638803886890658e-05 3.601289251846425256e-05 2.587585923315629676e-05 1.765996787815752531e-05 1.126896383313775848e-05 6.609010387048754627e-06 3.496935571781517383e-06 9.578640968309839602e-07 +4.207047026915229933e-06 6.819411745406304791e-06 1.127934363746276751e-05 1.832334797408522267e-05 2.938959011818451824e-05 4.760455277079806119e-05 7.686865877038777839e-05 1.283667564524361285e-04 1.942029760365831072e-04 1.386814922619547053e-04 1.007068813521406233e-04 7.670477746438395829e-05 5.747523184234581896e-05 4.154683660767695251e-05 2.846970980064257646e-05 1.821337692595606728e-05 1.069839429029871058e-05 5.663007519671717976e-06 1.561966593730328833e-06 +3.024238824839161473e-06 4.901931840166509643e-06 8.106798985042123858e-06 1.316520506451688610e-05 2.109665562648541651e-05 3.407185219479275324e-05 5.444602002138178298e-05 8.622209517636679000e-05 1.386814922619547053e-04 2.028300327877127925e-04 1.581447446144202621e-04 1.203576765681874740e-04 9.148553172116519465e-05 6.683215425115431626e-05 4.611618930338983477e-05 2.963181640343671080e-05 1.745143940100261267e-05 9.243078866782870052e-06 2.579141381628753912e-06 +2.235264527856705405e-06 3.624109294208210226e-06 5.996457907161010779e-06 9.745277612760063201e-06 1.563413089326086338e-05 2.529298874068885224e-05 4.050338173495685165e-05 6.416724222117673436e-05 1.007068813521406640e-04 1.581447446144202350e-04 2.231077598732957999e-04 1.841720417566366120e-04 1.424131612995714169e-04 1.059683567622363024e-04 7.400175088780185941e-05 4.790146139730384851e-05 2.833534552520011182e-05 1.501896930392994290e-05 4.271336385891455841e-06 +1.663794603047565207e-06 2.698394337768116126e-06 4.467181864855874748e-06 7.266047733462695784e-06 1.167257932440602759e-05 1.892653727634662715e-05 3.041800105897283450e-05 4.846638803886890658e-05 7.670477746438395829e-05 1.203576765681874740e-04 1.841720417566366120e-04 2.506533297970291911e-04 2.147104359979484203e-04 1.647219619517009909e-04 1.175633659310637292e-04 7.709612892976440207e-05 4.595117755974523503e-05 2.437443330062290806e-05 7.157955074792365645e-06 +1.221059037045703996e-06 1.980850794262533178e-06 3.280747677844879614e-06 5.339952350249944027e-06 8.587968965355847597e-06 1.395097145909165727e-05 2.248956324075212826e-05 3.601289251846425256e-05 5.747523184234582574e-05 9.148553172116519465e-05 1.424131612995714169e-04 2.147104359979484475e-04 2.849482613661320622e-04 2.468753903182873723e-04 1.835589441963761208e-04 1.233382127593360455e-04 7.451373217222106852e-05 3.953983968559917110e-05 1.225685815025186899e-05 +8.695165755806494333e-07 1.410824959500567162e-06 2.337412087120434285e-06 3.806440143758090384e-06 6.126681546620210980e-06 9.966147271181514312e-06 1.610113131884310207e-05 2.587585923315629676e-05 4.154683660767695251e-05 6.683215425115430271e-05 1.059683567622363024e-04 1.647219619517009909e-04 2.468753903182873723e-04 3.204999638726577639e-04 2.747814848252659093e-04 1.939331183796771561e-04 1.202139169989478403e-04 6.383134633027272092e-05 2.157241057854987045e-05 +5.898790252545350903e-07 9.572198285950536182e-07 1.586236797148158261e-06 2.584033730041313518e-06 4.161412550267960227e-06 6.775428083725877461e-06 1.096237699939818887e-05 1.765996787815752531e-05 2.846970980064257646e-05 4.611618930338983477e-05 7.400175088780185941e-05 1.175633659310637292e-04 1.835589441963761208e-04 2.747814848252659093e-04 3.512672267452909424e-04 2.927014171664937066e-04 1.916404611885034852e-04 1.027046187981337438e-04 3.917226227807205362e-05 +3.749439055621312698e-07 6.084853744242953922e-07 1.008482257837801846e-06 1.643214814225584515e-06 2.647228194881346075e-06 4.312647425293510036e-06 6.984347660313650237e-06 1.126896383313775848e-05 1.821337692595606728e-05 2.963181640343671419e-05 4.790146139730386206e-05 7.709612892976440207e-05 1.233382127593360455e-04 1.939331183796771561e-04 2.927014171664936524e-04 3.706160639726783276e-04 2.928354315503242547e-04 1.653513376921384901e-04 7.245059135474819550e-05 +2.193766976457648750e-07 3.560374380426883176e-07 5.901349452994702941e-07 9.616913964847105401e-07 1.549625299179192924e-06 2.525430210118837555e-06 4.092315173098333391e-06 6.609010387048753780e-06 1.069839429029871058e-05 1.745143940100261606e-05 2.833534552520010165e-05 4.595117755974523503e-05 7.451373217222106852e-05 1.202139169989478403e-04 1.916404611885035394e-04 2.928354315503242547e-04 3.646638934039331237e-04 2.631209905479432992e-04 1.336621454666228192e-04 +1.159915796912387782e-07 1.882516712395424079e-07 3.120377286882500541e-07 5.085233369147651243e-07 8.194691049487145913e-07 1.335645107193929686e-06 2.164721714695801985e-06 3.496935571781517383e-06 5.663007519671715435e-06 9.243078866782870052e-06 1.501896930392994290e-05 2.437443330062290806e-05 3.953983968559917110e-05 6.383134633027272092e-05 1.027046187981337709e-04 1.653513376921384901e-04 2.631209905479432992e-04 3.399882122129586296e-04 2.366176860831864124e-04 +3.143267932479547965e-08 5.102604072087817880e-08 8.461212979646503562e-08 1.379760978149279355e-07 2.225641665020599333e-07 3.633500161289179774e-07 5.904424753441843371e-07 9.578640968309839602e-07 1.561966593730328833e-06 2.579141381628753489e-06 4.271336385891456688e-06 7.157955074792365645e-06 1.225685815025186560e-05 2.157241057854987045e-05 3.917226227807205362e-05 7.245059135474818195e-05 1.336621454666228192e-04 2.366176860831864395e-04 3.190411922935947270e-04 diff --git a/benchmarks/covariance/cov_gmgm_LSSTY1Bin5_DESILRG_legacy.dat b/benchmarks/covariance/cov_gmgm_LSSTY1Bin5_DESILRG_legacy.dat new file mode 100644 index 0000000..e2a247e --- /dev/null +++ b/benchmarks/covariance/cov_gmgm_LSSTY1Bin5_DESILRG_legacy.dat @@ -0,0 +1,19 @@ +2.743008472805401939e-03 1.272103873085489445e-04 5.046880299889614180e-05 2.201026222444395217e-05 1.049598518759116009e-05 5.318920739092512904e-06 2.935371011363764090e-06 1.767994814940036196e-06 1.132271779573333052e-06 7.544470838830614300e-07 5.189436472011894440e-07 3.623714735394745741e-07 2.520317717515065100e-07 1.720188933884573653e-07 1.130143278820617470e-07 7.016366745611185179e-08 4.036463973171338712e-08 2.114040188985219136e-08 5.556578085996515554e-09 +1.272103873085489174e-04 2.070380458365796410e-03 1.004436699656621447e-04 3.747969544611926251e-05 1.775789118191897054e-05 8.771255199440911138e-06 4.805227015084814700e-06 2.876051847196047263e-06 1.837252132317174421e-06 1.223586889927253536e-06 8.416761906968847636e-07 5.878390676548327594e-07 4.089031975528693818e-07 2.791249851422176308e-07 1.833988692345709397e-07 1.138684373370767693e-07 6.551033800476369098e-08 3.431074392368170919e-08 9.020243430520189117e-09 +5.046880299889616890e-05 1.004436699656620634e-04 1.107292511786237910e-03 7.962477801661880356e-05 3.224206120241536260e-05 1.518694976362509889e-05 8.078666567998496625e-06 4.784451941034814474e-06 3.044781961384847458e-06 2.025879892816525214e-06 1.393563431704200426e-06 9.735291833169878503e-07 6.773815104256990853e-07 4.624989012597105216e-07 3.039332930254227178e-07 1.887271781813498899e-07 1.085854858692376794e-07 5.687305304162285109e-08 1.495751160866096531e-08 +2.201026222444395894e-05 3.747969544611926251e-05 7.962477801661880356e-05 8.259229369663418458e-04 6.695111043954202266e-05 2.683158791655102510e-05 1.353439157656543462e-05 7.850289420238915159e-06 4.961829783750756445e-06 3.295855669634708984e-06 2.267135006994752105e-06 1.584419451861071423e-06 1.102909785846190661e-06 7.533064466490400933e-07 4.951623445864688053e-07 3.075250741673986710e-07 1.769562728981197746e-07 9.268787204673683100e-08 2.439108364690012828e-08 +1.049598518759114823e-05 1.775789118191896038e-05 3.224206120241534905e-05 6.695111043954199556e-05 5.091604328724846397e-04 5.343165312169185826e-05 2.317711565999400813e-05 1.283975362611318181e-05 8.000664836607985250e-06 5.296900972698553772e-06 3.643206960740840805e-06 2.547738569255876602e-06 1.774689208225003665e-06 1.212835807759663653e-06 7.975417156850331389e-07 4.954613524745180728e-07 2.851495792376261371e-07 1.493704577361852232e-07 3.934440897765855920e-08 +5.318920739092512904e-06 8.771255199440902668e-06 1.518694976362510398e-05 2.683158791655100816e-05 5.343165312169185826e-05 3.365038047432938537e-04 4.540473674153728504e-05 2.174744284088083794e-05 1.308583970240122887e-05 8.598047444401973289e-06 5.910725620812723224e-06 4.137667427917455163e-06 2.885489664024084466e-06 1.973832261792921607e-06 1.298836383814536433e-06 8.072645218656821037e-07 4.647375699062869125e-07 2.434760919420377129e-07 6.423224971761485505e-08 +2.935371011363773408e-06 4.805227015084815547e-06 8.078666567998496625e-06 1.353439157656543971e-05 2.317711565999400813e-05 4.540473674153726471e-05 2.338960246219647706e-04 4.068879888176844399e-05 2.154119778547821407e-05 1.386051845297944381e-05 9.509863932619986004e-06 6.667370075695479139e-06 4.658209670575853087e-06 3.191332916300285270e-06 2.102287864190370014e-06 1.307627373662403551e-06 7.531548267560728062e-07 3.946571494325105302e-07 1.043768402044313331e-07 +1.767994814940037678e-06 2.876051847196043451e-06 4.784451941034811086e-06 7.850289420238915159e-06 1.283975362611318181e-05 2.174744284088083455e-05 4.068879888176844399e-05 1.648634897264681287e-04 3.815242734859636677e-05 2.232210001414315403e-05 1.518817967053202209e-05 1.066995283392695201e-05 7.476892819534455595e-06 5.135145675530701673e-06 3.388862270404504821e-06 2.110484350109649831e-06 1.216526528231707352e-06 6.376601825252425155e-07 1.693264517838682563e-07 +1.132271779573331358e-06 1.837252132317172515e-06 3.044781961384847458e-06 4.961829783750753057e-06 8.000664836607981862e-06 1.308583970240122887e-05 2.154119778547821407e-05 3.815242734859635999e-05 1.216217800426091931e-04 3.769700247771973878e-05 2.419928323258799743e-05 1.701467475074209659e-05 1.198046356557293369e-05 8.262240772511857299e-06 5.468972753489337091e-06 3.412867125171528871e-06 1.969789867706042148e-06 1.032958090253967490e-06 2.761073863222986265e-07 +7.544470838830618535e-07 1.223586889927253536e-06 2.025879892816525214e-06 3.295855669634708561e-06 5.296900972698553772e-06 8.598047444401973289e-06 1.386051845297944381e-05 2.232210001414315403e-05 3.769700247771974556e-05 9.454370763519129458e-05 3.959323209215916996e-05 2.707700560917836950e-05 1.920421166978224144e-05 1.333831544229858055e-05 8.874818305520297554e-06 5.557471627264594709e-06 3.214620013531864021e-06 1.686815419577557268e-06 4.558849013493577006e-07 +5.189436472011897617e-07 8.416761906968850812e-07 1.393563431704200850e-06 2.267135006994752105e-06 3.643206960740840805e-06 5.910725620812724919e-06 9.509863932619986004e-06 1.518817967053202040e-05 2.419928323258800081e-05 3.959323209215916996e-05 8.201075927398119453e-05 4.288351533293411770e-05 3.027638789275835204e-05 2.128032813923108827e-05 1.428469721385644661e-05 8.997381404160804461e-06 5.223398217891584794e-06 2.742951553480436826e-06 7.549787404352966208e-07 +3.623714735394752623e-07 5.878390676548315947e-07 9.735291833169872150e-07 1.584419451861070787e-06 2.547738569255876179e-06 4.137667427917456010e-06 6.667370075695479139e-06 1.066995283392695201e-05 1.701467475074209659e-05 2.707700560917836950e-05 4.288351533293411770e-05 7.502138935631425139e-05 4.700115639922138624e-05 3.345923577333341910e-05 2.281601104141880304e-05 1.451832301192468312e-05 8.481553014991952930e-06 4.456359397482594698e-06 1.265656298726963787e-06 +2.520317717515057689e-07 4.089031975528691171e-07 6.773815104256988735e-07 1.102909785846191084e-06 1.774689208225003665e-06 2.885489664024084043e-06 4.658209670575853087e-06 7.476892819534455595e-06 1.198046356557293369e-05 1.920421166978224144e-05 3.027638789275835881e-05 4.700115639922138624e-05 7.346819269579772226e-05 5.144144423406867011e-05 3.598658779768969658e-05 2.333362172679022406e-05 1.378432207792490813e-05 7.238570349575073903e-06 2.170912052382961735e-06 +1.720188933884573389e-07 2.791249851422177366e-07 4.624989012597100981e-07 7.533064466490403051e-07 1.212835807759663864e-06 1.973832261792921607e-06 3.191332916300284846e-06 5.135145675530701673e-06 8.262240772511855605e-06 1.333831544229858055e-05 2.128032813923108827e-05 3.345923577333341910e-05 5.144144423406867011e-05 7.433125312172504055e-05 5.509542263366783599e-05 3.701450123999842250e-05 2.232956464827166393e-05 1.170094801498769882e-05 3.837680274790888988e-06 +1.130143278820616676e-07 1.833988692345707809e-07 3.039332930254226649e-07 4.951623445864689112e-07 7.975417156850331389e-07 1.298836383814536221e-06 2.102287864190370014e-06 3.388862270404504821e-06 5.468972753489337938e-06 8.874818305520297554e-06 1.428469721385644661e-05 2.281601104141880304e-05 3.598658779768968980e-05 5.509542263366782922e-05 7.573307890308031930e-05 5.700257528909878944e-05 3.588577452509617824e-05 1.885855902949489391e-05 7.019128852991778495e-06 +7.016366745611183855e-08 1.138684373370766369e-07 1.887271781813498105e-07 3.075250741673986710e-07 4.954613524745180728e-07 8.072645218656821037e-07 1.307627373662403551e-06 2.110484350109649831e-06 3.412867125171528447e-06 5.557471627264594709e-06 8.997381404160802767e-06 1.451832301192468312e-05 2.333362172679022406e-05 3.701450123999842250e-05 5.700257528909878944e-05 7.608120992750438125e-05 5.586515552850327868e-05 3.051466621974923177e-05 1.308982169058322298e-05 +4.036463973171330109e-08 6.551033800476347922e-08 1.085854858692377985e-07 1.769562728981198540e-07 2.851495792376262430e-07 4.647375699062869654e-07 7.531548267560724885e-07 1.216526528231707352e-06 1.969789867706042148e-06 3.214620013531864021e-06 5.223398217891584794e-06 8.481553014991952930e-06 1.378432207792490813e-05 2.232956464827166393e-05 3.588577452509619179e-05 5.586515552850327868e-05 7.250691735403697166e-05 4.938252345372096363e-05 2.436848360227754828e-05 +2.114040188985220460e-08 3.431074392368182830e-08 5.687305304162294374e-08 9.268787204673684424e-08 1.493704577361851967e-07 2.434760919420377129e-07 3.946571494325105302e-07 6.376601825252425155e-07 1.032958090253967278e-06 1.686815419577557057e-06 2.742951553480436826e-06 4.456359397482594698e-06 7.238570349575073903e-06 1.170094801498769882e-05 1.885855902949489391e-05 3.051466621974923177e-05 4.938252345372095008e-05 6.608501781552321474e-05 4.385695500463951179e-05 +5.556578085996524653e-09 9.020243430520210624e-09 1.495751160866092561e-08 2.439108364690020438e-08 3.934440897765855920e-08 6.423224971761490799e-08 1.043768402044313331e-07 1.693264517838682033e-07 2.761073863222986265e-07 4.558849013493576477e-07 7.549787404352967267e-07 1.265656298726963575e-06 2.170912052382961311e-06 3.837680274790888988e-06 7.019128852991778495e-06 1.308982169058322467e-05 2.436848360227755845e-05 4.385695500463951179e-05 6.088202580062540721e-05 diff --git a/benchmarks/covariance/cov_joint_LSSTY1Bin5_DESILRG_legacy.dat b/benchmarks/covariance/cov_joint_LSSTY1Bin5_DESILRG_legacy.dat new file mode 100644 index 0000000..5b8cac4 --- /dev/null +++ b/benchmarks/covariance/cov_joint_LSSTY1Bin5_DESILRG_legacy.dat @@ -0,0 +1,38 @@ +2.743008472805401939e-03 1.272103873085489445e-04 5.046880299889614180e-05 2.201026222444395217e-05 1.049598518759116009e-05 5.318920739092512904e-06 2.935371011363764090e-06 1.767994814940036196e-06 1.132271779573333052e-06 7.544470838830614300e-07 5.189436472011894440e-07 3.623714735394745741e-07 2.520317717515065100e-07 1.720188933884573653e-07 1.130143278820617470e-07 7.016366745611185179e-08 4.036463973171338712e-08 2.114040188985219136e-08 5.556578085996515554e-09 3.873947329821256767e-04 2.482654249756422512e-04 1.182667048545758652e-04 5.658212954252074116e-05 2.922379415207877195e-05 1.587429499443779665e-05 9.427105049907696515e-06 6.098987951773693857e-06 4.207047026915229933e-06 3.024238824839160626e-06 2.235264527856705828e-06 1.663794603047565207e-06 1.221059037045703996e-06 8.695165755806494333e-07 5.898790252545350903e-07 3.749439055621312698e-07 2.193766976457649544e-07 1.159915796912387650e-07 3.143267932479545980e-08 +1.272103873085489174e-04 2.070380458365796410e-03 1.004436699656621447e-04 3.747969544611926251e-05 1.775789118191897054e-05 8.771255199440911138e-06 4.805227015084814700e-06 2.876051847196047263e-06 1.837252132317174421e-06 1.223586889927253536e-06 8.416761906968847636e-07 5.878390676548327594e-07 4.089031975528693818e-07 2.791249851422176308e-07 1.833988692345709397e-07 1.138684373370767693e-07 6.551033800476369098e-08 3.431074392368170919e-08 9.020243430520189117e-09 2.482654249756423054e-04 3.641086611620774835e-04 2.117124424026522404e-04 9.774653511628187471e-05 4.901213703899948306e-05 2.611937072426887818e-05 1.536176037744499615e-05 9.898074428260449217e-06 6.819411745406304791e-06 4.901931840166511337e-06 3.624109294208210226e-06 2.698394337768115702e-06 1.980850794262533601e-06 1.410824959500567162e-06 9.572198285950536182e-07 6.084853744242953922e-07 3.560374380426882117e-07 1.882516712395424079e-07 5.102604072087817218e-08 +5.046880299889616890e-05 1.004436699656620634e-04 1.107292511786237910e-03 7.962477801661880356e-05 3.224206120241536260e-05 1.518694976362509889e-05 8.078666567998496625e-06 4.784451941034814474e-06 3.044781961384847458e-06 2.025879892816525214e-06 1.393563431704200426e-06 9.735291833169878503e-07 6.773815104256990853e-07 4.624989012597105216e-07 3.039332930254227178e-07 1.887271781813498899e-07 1.085854858692376794e-07 5.687305304162285109e-08 1.495751160866096531e-08 1.182667048545758517e-04 2.117124424026522404e-04 3.134713689130410198e-04 1.843744556533642492e-04 8.701785775680000612e-05 4.452715073290201971e-05 2.567310310595264232e-05 1.641001633268533686e-05 1.127934363746276751e-05 8.106798985042123858e-06 5.996457907161010779e-06 4.467181864855874748e-06 3.280747677844879614e-06 2.337412087120434709e-06 1.586236797148158261e-06 1.008482257837801846e-06 5.901349452994702941e-07 3.120377286882500541e-07 8.461212979646503562e-08 +2.201026222444395894e-05 3.747969544611926251e-05 7.962477801661880356e-05 8.259229369663418458e-04 6.695111043954202266e-05 2.683158791655102510e-05 1.353439157656543462e-05 7.850289420238915159e-06 4.961829783750756445e-06 3.295855669634708984e-06 2.267135006994752105e-06 1.584419451861071423e-06 1.102909785846190661e-06 7.533064466490400933e-07 4.951623445864688053e-07 3.075250741673986710e-07 1.769562728981197746e-07 9.268787204673683100e-08 2.439108364690012828e-08 5.658212954252075472e-05 9.774653511628187471e-05 1.843744556533642492e-04 2.868147905591349558e-04 1.626292584223868333e-04 7.667660816089838635e-05 4.251324060612077921e-05 2.677267886696674127e-05 1.832334797408521928e-05 1.316520506451688610e-05 9.745277612760063201e-06 7.266047733462695784e-06 5.339952350249944027e-06 3.806440143758089961e-06 2.584033730041313518e-06 1.643214814225584515e-06 9.616913964847105401e-07 5.085233369147651243e-07 1.379760978149279355e-07 +1.049598518759114823e-05 1.775789118191896038e-05 3.224206120241534905e-05 6.695111043954199556e-05 5.091604328724846397e-04 5.343165312169185826e-05 2.317711565999400813e-05 1.283975362611318181e-05 8.000664836607985250e-06 5.296900972698553772e-06 3.643206960740840805e-06 2.547738569255876602e-06 1.774689208225003665e-06 1.212835807759663653e-06 7.975417156850331389e-07 4.954613524745180728e-07 2.851495792376261371e-07 1.493704577361852232e-07 3.934440897765855920e-08 2.922379415207877195e-05 4.901213703899950339e-05 8.701785775680000612e-05 1.626292584223867790e-04 2.505012795045964756e-04 1.409389765204234544e-04 7.109432504229706764e-05 4.332858187726459519e-05 2.938959011818451485e-05 2.109665562648541651e-05 1.563413089326085999e-05 1.167257932440602759e-05 8.587968965355847597e-06 6.126681546620210980e-06 4.161412550267959380e-06 2.647228194881345651e-06 1.549625299179192924e-06 8.194691049487145913e-07 2.225641665020599333e-07 +5.318920739092512904e-06 8.771255199440902668e-06 1.518694976362510398e-05 2.683158791655100816e-05 5.343165312169185826e-05 3.365038047432938537e-04 4.540473674153728504e-05 2.174744284088083794e-05 1.308583970240122887e-05 8.598047444401973289e-06 5.910725620812723224e-06 4.137667427917455163e-06 2.885489664024084466e-06 1.973832261792921607e-06 1.298836383814536433e-06 8.072645218656821037e-07 4.647375699062869125e-07 2.434760919420377129e-07 6.423224971761485505e-08 1.587429499443779665e-05 2.611937072426887818e-05 4.452715073290203327e-05 7.667660816089838635e-05 1.409389765204234815e-04 2.234776628097140437e-04 1.295978660113390963e-04 7.180944786318207681e-05 4.760455277079806119e-05 3.407185219479274646e-05 2.529298874068885224e-05 1.892653727634662376e-05 1.395097145909165727e-05 9.966147271181514312e-06 6.775428083725877461e-06 4.312647425293509189e-06 2.525430210118837555e-06 1.335645107193929686e-06 3.633500161289179774e-07 +2.935371011363773408e-06 4.805227015084815547e-06 8.078666567998496625e-06 1.353439157656543971e-05 2.317711565999400813e-05 4.540473674153726471e-05 2.338960246219647706e-04 4.068879888176844399e-05 2.154119778547821407e-05 1.386051845297944381e-05 9.509863932619986004e-06 6.667370075695479139e-06 4.658209670575853087e-06 3.191332916300285270e-06 2.102287864190370014e-06 1.307627373662403551e-06 7.531548267560728062e-07 3.946571494325105302e-07 1.043768402044313331e-07 9.427105049907696515e-06 1.536176037744499954e-05 2.567310310595264232e-05 4.251324060612077921e-05 7.109432504229706764e-05 1.295978660113390963e-04 2.056357526207768091e-04 1.255292805236046273e-04 7.686865877038779194e-05 5.444602002138178298e-05 4.050338173495685165e-05 3.041800105897283788e-05 2.248956324075212826e-05 1.610113131884310207e-05 1.096237699939818887e-05 6.984347660313650237e-06 4.092315173098333391e-06 2.164721714695801562e-06 5.904424753441843371e-07 +1.767994814940037678e-06 2.876051847196043451e-06 4.784451941034811086e-06 7.850289420238915159e-06 1.283975362611318181e-05 2.174744284088083455e-05 4.068879888176844399e-05 1.648634897264681287e-04 3.815242734859636677e-05 2.232210001414315403e-05 1.518817967053202209e-05 1.066995283392695201e-05 7.476892819534455595e-06 5.135145675530701673e-06 3.388862270404504821e-06 2.110484350109649831e-06 1.216526528231707352e-06 6.376601825252425155e-07 1.693264517838682563e-07 6.098987951773693857e-06 9.898074428260447523e-06 1.641001633268534025e-05 2.677267886696674127e-05 4.332858187726459519e-05 7.180944786318210391e-05 1.255292805236046273e-04 1.952519125524722452e-04 1.283667564524361014e-04 8.622209517636677644e-05 6.416724222117673436e-05 4.846638803886890658e-05 3.601289251846425256e-05 2.587585923315629676e-05 1.765996787815752531e-05 1.126896383313775848e-05 6.609010387048754627e-06 3.496935571781517383e-06 9.578640968309839602e-07 +1.132271779573331358e-06 1.837252132317172515e-06 3.044781961384847458e-06 4.961829783750753057e-06 8.000664836607981862e-06 1.308583970240122887e-05 2.154119778547821407e-05 3.815242734859635999e-05 1.216217800426091931e-04 3.769700247771973878e-05 2.419928323258799743e-05 1.701467475074209659e-05 1.198046356557293369e-05 8.262240772511857299e-06 5.468972753489337091e-06 3.412867125171528871e-06 1.969789867706042148e-06 1.032958090253967490e-06 2.761073863222986265e-07 4.207047026915229933e-06 6.819411745406304791e-06 1.127934363746276751e-05 1.832334797408522267e-05 2.938959011818451824e-05 4.760455277079806119e-05 7.686865877038777839e-05 1.283667564524361285e-04 1.942029760365831072e-04 1.386814922619547053e-04 1.007068813521406233e-04 7.670477746438395829e-05 5.747523184234581896e-05 4.154683660767695251e-05 2.846970980064257646e-05 1.821337692595606728e-05 1.069839429029871058e-05 5.663007519671717976e-06 1.561966593730328833e-06 +7.544470838830618535e-07 1.223586889927253536e-06 2.025879892816525214e-06 3.295855669634708561e-06 5.296900972698553772e-06 8.598047444401973289e-06 1.386051845297944381e-05 2.232210001414315403e-05 3.769700247771974556e-05 9.454370763519129458e-05 3.959323209215916996e-05 2.707700560917836950e-05 1.920421166978224144e-05 1.333831544229858055e-05 8.874818305520297554e-06 5.557471627264594709e-06 3.214620013531864021e-06 1.686815419577557268e-06 4.558849013493577006e-07 3.024238824839161473e-06 4.901931840166509643e-06 8.106798985042123858e-06 1.316520506451688610e-05 2.109665562648541651e-05 3.407185219479275324e-05 5.444602002138178298e-05 8.622209517636679000e-05 1.386814922619547053e-04 2.028300327877127925e-04 1.581447446144202621e-04 1.203576765681874740e-04 9.148553172116519465e-05 6.683215425115431626e-05 4.611618930338983477e-05 2.963181640343671080e-05 1.745143940100261267e-05 9.243078866782870052e-06 2.579141381628753912e-06 +5.189436472011897617e-07 8.416761906968850812e-07 1.393563431704200850e-06 2.267135006994752105e-06 3.643206960740840805e-06 5.910725620812724919e-06 9.509863932619986004e-06 1.518817967053202040e-05 2.419928323258800081e-05 3.959323209215916996e-05 8.201075927398119453e-05 4.288351533293411770e-05 3.027638789275835204e-05 2.128032813923108827e-05 1.428469721385644661e-05 8.997381404160804461e-06 5.223398217891584794e-06 2.742951553480436826e-06 7.549787404352966208e-07 2.235264527856705405e-06 3.624109294208210226e-06 5.996457907161010779e-06 9.745277612760063201e-06 1.563413089326086338e-05 2.529298874068885224e-05 4.050338173495685165e-05 6.416724222117673436e-05 1.007068813521406640e-04 1.581447446144202350e-04 2.231077598732957999e-04 1.841720417566366120e-04 1.424131612995714169e-04 1.059683567622363024e-04 7.400175088780185941e-05 4.790146139730384851e-05 2.833534552520011182e-05 1.501896930392994290e-05 4.271336385891455841e-06 +3.623714735394752623e-07 5.878390676548315947e-07 9.735291833169872150e-07 1.584419451861070787e-06 2.547738569255876179e-06 4.137667427917456010e-06 6.667370075695479139e-06 1.066995283392695201e-05 1.701467475074209659e-05 2.707700560917836950e-05 4.288351533293411770e-05 7.502138935631425139e-05 4.700115639922138624e-05 3.345923577333341910e-05 2.281601104141880304e-05 1.451832301192468312e-05 8.481553014991952930e-06 4.456359397482594698e-06 1.265656298726963787e-06 1.663794603047565207e-06 2.698394337768116126e-06 4.467181864855874748e-06 7.266047733462695784e-06 1.167257932440602759e-05 1.892653727634662715e-05 3.041800105897283450e-05 4.846638803886890658e-05 7.670477746438395829e-05 1.203576765681874740e-04 1.841720417566366120e-04 2.506533297970291911e-04 2.147104359979484203e-04 1.647219619517009909e-04 1.175633659310637292e-04 7.709612892976440207e-05 4.595117755974523503e-05 2.437443330062290806e-05 7.157955074792365645e-06 +2.520317717515057689e-07 4.089031975528691171e-07 6.773815104256988735e-07 1.102909785846191084e-06 1.774689208225003665e-06 2.885489664024084043e-06 4.658209670575853087e-06 7.476892819534455595e-06 1.198046356557293369e-05 1.920421166978224144e-05 3.027638789275835881e-05 4.700115639922138624e-05 7.346819269579772226e-05 5.144144423406867011e-05 3.598658779768969658e-05 2.333362172679022406e-05 1.378432207792490813e-05 7.238570349575073903e-06 2.170912052382961735e-06 1.221059037045703996e-06 1.980850794262533178e-06 3.280747677844879614e-06 5.339952350249944027e-06 8.587968965355847597e-06 1.395097145909165727e-05 2.248956324075212826e-05 3.601289251846425256e-05 5.747523184234582574e-05 9.148553172116519465e-05 1.424131612995714169e-04 2.147104359979484475e-04 2.849482613661320622e-04 2.468753903182873723e-04 1.835589441963761208e-04 1.233382127593360455e-04 7.451373217222106852e-05 3.953983968559917110e-05 1.225685815025186899e-05 +1.720188933884573389e-07 2.791249851422177366e-07 4.624989012597100981e-07 7.533064466490403051e-07 1.212835807759663864e-06 1.973832261792921607e-06 3.191332916300284846e-06 5.135145675530701673e-06 8.262240772511855605e-06 1.333831544229858055e-05 2.128032813923108827e-05 3.345923577333341910e-05 5.144144423406867011e-05 7.433125312172504055e-05 5.509542263366783599e-05 3.701450123999842250e-05 2.232956464827166393e-05 1.170094801498769882e-05 3.837680274790888988e-06 8.695165755806494333e-07 1.410824959500567162e-06 2.337412087120434285e-06 3.806440143758090384e-06 6.126681546620210980e-06 9.966147271181514312e-06 1.610113131884310207e-05 2.587585923315629676e-05 4.154683660767695251e-05 6.683215425115430271e-05 1.059683567622363024e-04 1.647219619517009909e-04 2.468753903182873723e-04 3.204999638726577639e-04 2.747814848252659093e-04 1.939331183796771561e-04 1.202139169989478403e-04 6.383134633027272092e-05 2.157241057854987045e-05 +1.130143278820616676e-07 1.833988692345707809e-07 3.039332930254226649e-07 4.951623445864689112e-07 7.975417156850331389e-07 1.298836383814536221e-06 2.102287864190370014e-06 3.388862270404504821e-06 5.468972753489337938e-06 8.874818305520297554e-06 1.428469721385644661e-05 2.281601104141880304e-05 3.598658779768968980e-05 5.509542263366782922e-05 7.573307890308031930e-05 5.700257528909878944e-05 3.588577452509617824e-05 1.885855902949489391e-05 7.019128852991778495e-06 5.898790252545350903e-07 9.572198285950536182e-07 1.586236797148158261e-06 2.584033730041313518e-06 4.161412550267960227e-06 6.775428083725877461e-06 1.096237699939818887e-05 1.765996787815752531e-05 2.846970980064257646e-05 4.611618930338983477e-05 7.400175088780185941e-05 1.175633659310637292e-04 1.835589441963761208e-04 2.747814848252659093e-04 3.512672267452909424e-04 2.927014171664937066e-04 1.916404611885034852e-04 1.027046187981337438e-04 3.917226227807205362e-05 +7.016366745611183855e-08 1.138684373370766369e-07 1.887271781813498105e-07 3.075250741673986710e-07 4.954613524745180728e-07 8.072645218656821037e-07 1.307627373662403551e-06 2.110484350109649831e-06 3.412867125171528447e-06 5.557471627264594709e-06 8.997381404160802767e-06 1.451832301192468312e-05 2.333362172679022406e-05 3.701450123999842250e-05 5.700257528909878944e-05 7.608120992750438125e-05 5.586515552850327868e-05 3.051466621974923177e-05 1.308982169058322298e-05 3.749439055621312698e-07 6.084853744242953922e-07 1.008482257837801846e-06 1.643214814225584515e-06 2.647228194881346075e-06 4.312647425293510036e-06 6.984347660313650237e-06 1.126896383313775848e-05 1.821337692595606728e-05 2.963181640343671419e-05 4.790146139730386206e-05 7.709612892976440207e-05 1.233382127593360455e-04 1.939331183796771561e-04 2.927014171664936524e-04 3.706160639726783276e-04 2.928354315503242547e-04 1.653513376921384901e-04 7.245059135474819550e-05 +4.036463973171330109e-08 6.551033800476347922e-08 1.085854858692377985e-07 1.769562728981198540e-07 2.851495792376262430e-07 4.647375699062869654e-07 7.531548267560724885e-07 1.216526528231707352e-06 1.969789867706042148e-06 3.214620013531864021e-06 5.223398217891584794e-06 8.481553014991952930e-06 1.378432207792490813e-05 2.232956464827166393e-05 3.588577452509619179e-05 5.586515552850327868e-05 7.250691735403697166e-05 4.938252345372096363e-05 2.436848360227754828e-05 2.193766976457648750e-07 3.560374380426883176e-07 5.901349452994702941e-07 9.616913964847105401e-07 1.549625299179192924e-06 2.525430210118837555e-06 4.092315173098333391e-06 6.609010387048753780e-06 1.069839429029871058e-05 1.745143940100261606e-05 2.833534552520010165e-05 4.595117755974523503e-05 7.451373217222106852e-05 1.202139169989478403e-04 1.916404611885035394e-04 2.928354315503242547e-04 3.646638934039331237e-04 2.631209905479432992e-04 1.336621454666228192e-04 +2.114040188985220460e-08 3.431074392368182830e-08 5.687305304162294374e-08 9.268787204673684424e-08 1.493704577361851967e-07 2.434760919420377129e-07 3.946571494325105302e-07 6.376601825252425155e-07 1.032958090253967278e-06 1.686815419577557057e-06 2.742951553480436826e-06 4.456359397482594698e-06 7.238570349575073903e-06 1.170094801498769882e-05 1.885855902949489391e-05 3.051466621974923177e-05 4.938252345372095008e-05 6.608501781552321474e-05 4.385695500463951179e-05 1.159915796912387782e-07 1.882516712395424079e-07 3.120377286882500541e-07 5.085233369147651243e-07 8.194691049487145913e-07 1.335645107193929686e-06 2.164721714695801985e-06 3.496935571781517383e-06 5.663007519671715435e-06 9.243078866782870052e-06 1.501896930392994290e-05 2.437443330062290806e-05 3.953983968559917110e-05 6.383134633027272092e-05 1.027046187981337709e-04 1.653513376921384901e-04 2.631209905479432992e-04 3.399882122129586296e-04 2.366176860831864124e-04 +5.556578085996524653e-09 9.020243430520210624e-09 1.495751160866092561e-08 2.439108364690020438e-08 3.934440897765855920e-08 6.423224971761490799e-08 1.043768402044313331e-07 1.693264517838682033e-07 2.761073863222986265e-07 4.558849013493576477e-07 7.549787404352967267e-07 1.265656298726963575e-06 2.170912052382961311e-06 3.837680274790888988e-06 7.019128852991778495e-06 1.308982169058322467e-05 2.436848360227755845e-05 4.385695500463951179e-05 6.088202580062540721e-05 3.143267932479547965e-08 5.102604072087817880e-08 8.461212979646503562e-08 1.379760978149279355e-07 2.225641665020599333e-07 3.633500161289179774e-07 5.904424753441843371e-07 9.578640968309839602e-07 1.561966593730328833e-06 2.579141381628753489e-06 4.271336385891456688e-06 7.157955074792365645e-06 1.225685815025186560e-05 2.157241057854987045e-05 3.917226227807205362e-05 7.245059135474818195e-05 1.336621454666228192e-04 2.366176860831864395e-04 3.190411922935947270e-04 +3.873947329821256767e-04 2.482654249756422512e-04 1.182667048545758652e-04 5.658212954252074116e-05 2.922379415207877195e-05 1.587429499443779665e-05 9.427105049907696515e-06 6.098987951773693857e-06 4.207047026915229933e-06 3.024238824839160626e-06 2.235264527856705828e-06 1.663794603047565207e-06 1.221059037045703996e-06 8.695165755806494333e-07 5.898790252545350903e-07 3.749439055621312698e-07 2.193766976457649544e-07 1.159915796912387650e-07 3.143267932479545980e-08 6.368507758518909823e-02 4.475652552450619208e-03 1.886990547968383841e-03 8.452345601740413137e-04 4.124885471792509367e-04 2.131286538384854524e-04 1.202536078886718156e-04 7.405475350219068874e-05 4.858958749029618955e-05 3.323107473427498948e-05 2.345785291065273119e-05 1.677864430903941442e-05 1.191680096482762963e-05 8.273269555088806157e-06 5.507471654836089368e-06 3.453006663195165648e-06 2.000705495767307549e-06 1.052082106621268966e-06 2.801883721279086389e-07 +2.482654249756423054e-04 3.641086611620774835e-04 2.117124424026522404e-04 9.774653511628187471e-05 4.901213703899948306e-05 2.611937072426887818e-05 1.536176037744499615e-05 9.898074428260449217e-06 6.819411745406304791e-06 4.901931840166511337e-06 3.624109294208210226e-06 2.698394337768115702e-06 1.980850794262533601e-06 1.410824959500567162e-06 9.572198285950536182e-07 6.084853744242953922e-07 3.560374380426882117e-07 1.882516712395424079e-07 5.102604072087817218e-08 4.475652552450620943e-03 4.853114767055208278e-02 3.618807966206491478e-03 1.452872860131817134e-03 6.966019997304451639e-04 3.514784096508745403e-04 1.965518504860120426e-04 1.203690310807287557e-04 7.881605517300003800e-05 5.388450270019677819e-05 3.804155510694163861e-05 2.721590032771745870e-05 1.933326681625335936e-05 1.342421059019757025e-05 8.937363771518764641e-06 5.603836677111001538e-06 3.247060647438518570e-06 1.707515346582983699e-06 4.548422214697760383e-07 +1.182667048545758517e-04 2.117124424026522404e-04 3.134713689130410198e-04 1.843744556533642492e-04 8.701785775680000612e-05 4.452715073290201971e-05 2.567310310595264232e-05 1.641001633268533686e-05 1.127934363746276751e-05 8.106798985042123858e-06 5.996457907161010779e-06 4.467181864855874748e-06 3.280747677844879614e-06 2.337412087120434709e-06 1.586236797148158261e-06 1.008482257837801846e-06 5.901349452994702941e-07 3.120377286882500541e-07 8.461212979646503562e-08 1.886990547968384925e-03 3.618807966206491478e-03 2.672290572277041809e-02 2.958347580821472141e-03 1.257748240747141779e-03 6.056388777925074407e-04 3.298892040360539880e-04 2.000266180482162962e-04 1.305320664087824070e-04 8.917993747991105071e-05 6.296998394515724391e-05 4.506623686237605877e-05 3.202444591743527750e-05 2.224233895662580310e-05 1.481087014200659695e-05 9.287762447893484316e-06 5.382074177381431142e-06 2.830333088720199496e-06 7.542263942621085684e-07 +5.658212954252075472e-05 9.774653511628187471e-05 1.843744556533642492e-04 2.868147905591349558e-04 1.626292584223868333e-04 7.667660816089838635e-05 4.251324060612077921e-05 2.677267886696674127e-05 1.832334797408521928e-05 1.316520506451688610e-05 9.745277612760063201e-06 7.266047733462695784e-06 5.339952350249944027e-06 3.806440143758089961e-06 2.584033730041313518e-06 1.643214814225584515e-06 9.616913964847105401e-07 5.085233369147651243e-07 1.379760978149279355e-07 8.452345601740405548e-04 1.452872860131817134e-03 2.958347580821472141e-03 2.026120100013884331e-02 2.518682543628023192e-03 1.062145254834871103e-03 5.507452203230980359e-04 3.276165110395457794e-04 2.124935781676273944e-04 1.449933595737269124e-04 1.024041553635569711e-04 7.332872217157015721e-05 5.213530697846546248e-05 3.622513360352057360e-05 2.412868661322879751e-05 1.513382757690394502e-05 8.770810158419497889e-06 4.612629205156955688e-06 1.229909766360695989e-06 +2.922379415207877195e-05 4.901213703899950339e-05 8.701785775680000612e-05 1.626292584223867790e-04 2.505012795045964756e-04 1.409389765204234544e-04 7.109432504229706764e-05 4.332858187726459519e-05 2.938959011818451485e-05 2.109665562648541651e-05 1.563413089326085999e-05 1.167257932440602759e-05 8.587968965355847597e-06 6.126681546620210980e-06 4.161412550267959380e-06 2.647228194881345651e-06 1.549625299179192924e-06 8.194691049487145913e-07 2.225641665020599333e-07 4.124885471792509367e-04 6.966019997304453808e-04 1.257748240747141779e-03 2.518682543628022324e-03 1.294691812041060333e-02 2.061618697922403768e-03 9.364747358448742565e-04 5.340550426733143945e-04 3.420314452417945700e-04 2.327861687300027517e-04 1.644586214645218556e-04 1.178689109226383353e-04 8.387324387456899176e-05 5.831629344121581340e-05 3.886093911622779350e-05 2.438172909255693679e-05 1.413317635469346592e-05 7.433301876023163888e-06 1.983923596205972805e-06 +1.587429499443779665e-05 2.611937072426887818e-05 4.452715073290203327e-05 7.667660816089838635e-05 1.409389765204234815e-04 2.234776628097140437e-04 1.295978660113390963e-04 7.180944786318207681e-05 4.760455277079806119e-05 3.407185219479274646e-05 2.529298874068885224e-05 1.892653727634662376e-05 1.395097145909165727e-05 9.966147271181514312e-06 6.775428083725877461e-06 4.312647425293509189e-06 2.525430210118837555e-06 1.335645107193929686e-06 3.633500161289179774e-07 2.131286538384852627e-04 3.514784096508743777e-04 6.056388777925073323e-04 1.062145254834871320e-03 2.061618697922404202e-03 8.903630035796191583e-03 1.793924133245684144e-03 8.984762775106402760e-04 5.576244048793571996e-04 3.771951846289146783e-04 2.665393082677470940e-04 1.913080744115444772e-04 1.363229147557401771e-04 9.488866081096710662e-05 6.328063081724832179e-05 3.972355487422395961e-05 2.303369634123461751e-05 1.211599971167383592e-05 3.238880894588123737e-06 +9.427105049907696515e-06 1.536176037744499954e-05 2.567310310595264232e-05 4.251324060612077921e-05 7.109432504229706764e-05 1.295978660113390963e-04 2.056357526207768091e-04 1.255292805236046273e-04 7.686865877038779194e-05 5.444602002138178298e-05 4.050338173495685165e-05 3.041800105897283788e-05 2.248956324075212826e-05 1.610113131884310207e-05 1.096237699939818887e-05 6.984347660313650237e-06 4.092315173098333391e-06 2.164721714695801562e-06 5.904424753441843371e-07 1.202536078886719511e-04 1.965518504860122866e-04 3.298892040360539880e-04 5.507452203230978191e-04 9.364747358448742565e-04 1.793924133245684144e-03 6.479539825441661509e-03 1.644842466175180798e-03 9.121448703559565090e-04 6.062035342455449755e-04 4.281008576878591546e-04 3.079615153584105568e-04 2.199489162224436197e-04 1.533702013629067128e-04 1.024090234340820554e-04 6.433984625800309427e-05 3.732690412472201781e-05 1.963814437618834635e-05 5.263160280161786447e-06 +6.098987951773693857e-06 9.898074428260447523e-06 1.641001633268534025e-05 2.677267886696674127e-05 4.332858187726459519e-05 7.180944786318210391e-05 1.255292805236046273e-04 1.952519125524722452e-04 1.283667564524361014e-04 8.622209517636677644e-05 6.416724222117673436e-05 4.846638803886890658e-05 3.601289251846425256e-05 2.587585923315629676e-05 1.765996787815752531e-05 1.126896383313775848e-05 6.609010387048754627e-06 3.496935571781517383e-06 9.578640968309839602e-07 7.405475350219071584e-05 1.203690310807287557e-04 2.000266180482162962e-04 3.276165110395458336e-04 5.340550426733143945e-04 8.984762775106402760e-04 1.644842466175180798e-03 4.848462604716078858e-03 1.584500446299621362e-03 9.706215782213502112e-04 6.817044871835399198e-04 4.920169351750524819e-04 3.527107293596798594e-04 2.466615517236950663e-04 1.650385644511419151e-04 1.038291637533681903e-04 6.028782503754476663e-05 3.172736816793462539e-05 8.538266511476802701e-06 +4.207047026915229933e-06 6.819411745406304791e-06 1.127934363746276751e-05 1.832334797408522267e-05 2.938959011818451824e-05 4.760455277079806119e-05 7.686865877038777839e-05 1.283667564524361285e-04 1.942029760365831072e-04 1.386814922619547053e-04 1.007068813521406233e-04 7.670477746438395829e-05 5.747523184234581896e-05 4.154683660767695251e-05 2.846970980064257646e-05 1.821337692595606728e-05 1.069839429029871058e-05 5.663007519671717976e-06 1.561966593730328833e-06 4.858958749029621666e-05 7.881605517299999735e-05 1.305320664087823799e-04 2.124935781676273402e-04 3.420314452417946784e-04 5.576244048793573081e-04 9.121448703559567259e-04 1.584500446299621362e-03 3.846624516416157977e-03 1.612010199223595829e-03 1.080235656949372425e-03 7.823376485533152470e-04 5.642721575542698634e-04 3.965342377270438153e-04 2.662241335022739780e-04 1.678648295469399739e-04 9.760648427505285265e-05 5.138902238199245093e-05 1.392288620797764434e-05 +3.024238824839161473e-06 4.901931840166509643e-06 8.106798985042123858e-06 1.316520506451688610e-05 2.109665562648541651e-05 3.407185219479275324e-05 5.444602002138178298e-05 8.622209517636679000e-05 1.386814922619547053e-04 2.028300327877127925e-04 1.581447446144202621e-04 1.203576765681874740e-04 9.148553172116519465e-05 6.683215425115431626e-05 4.611618930338983477e-05 2.963181640343671080e-05 1.745143940100261267e-05 9.243078866782870052e-06 2.579141381628753912e-06 3.323107473427505047e-05 5.388450270019675786e-05 8.917993747991107781e-05 1.449933595737269124e-04 2.327861687300027517e-04 3.771951846289146783e-04 6.062035342455448670e-04 9.706215782213502112e-04 1.612010199223596479e-03 3.258960467719900552e-03 1.741643476318215956e-03 1.238390472275910674e-03 9.020104422714753751e-04 6.392251561037616374e-04 4.316951679018828873e-04 2.732460389540333507e-04 1.592593143926027458e-04 8.390028064521681621e-05 2.298888146952433271e-05 +2.235264527856705405e-06 3.624109294208210226e-06 5.996457907161010779e-06 9.745277612760063201e-06 1.563413089326086338e-05 2.529298874068885224e-05 4.050338173495685165e-05 6.416724222117673436e-05 1.007068813521406640e-04 1.581447446144202350e-04 2.231077598732957999e-04 1.841720417566366120e-04 1.424131612995714169e-04 1.059683567622363024e-04 7.400175088780185941e-05 4.790146139730384851e-05 2.833534552520011182e-05 1.501896930392994290e-05 4.271336385891455841e-06 2.345785291065274474e-05 3.804155510694163183e-05 6.296998394515724391e-05 1.024041553635569575e-04 1.644586214645218556e-04 2.665393082677471482e-04 4.281008576878589920e-04 6.817044871835399198e-04 1.080235656949372425e-03 1.741643476318215956e-03 3.061029592548868312e-03 1.936271782497659810e-03 1.415028711156066576e-03 1.017293786502081838e-03 6.939727532872683397e-04 4.421003055469429027e-04 2.586961994196297805e-04 1.363875062214761353e-04 3.807161588395795697e-05 +1.663794603047565207e-06 2.698394337768116126e-06 4.467181864855874748e-06 7.266047733462695784e-06 1.167257932440602759e-05 1.892653727634662715e-05 3.041800105897283450e-05 4.846638803886890658e-05 7.670477746438395829e-05 1.203576765681874740e-04 1.841720417566366120e-04 2.506533297970291911e-04 2.147104359979484203e-04 1.647219619517009909e-04 1.175633659310637292e-04 7.709612892976440207e-05 4.595117755974523503e-05 2.437443330062290806e-05 7.157955074792365645e-06 1.677864430903945169e-05 2.721590032771744515e-05 4.506623686237608587e-05 7.332872217157015721e-05 1.178689109226383353e-04 1.913080744115444229e-04 3.079615153584105568e-04 4.920169351750524819e-04 7.823376485533153554e-04 1.238390472275910674e-03 1.936271782497659593e-03 3.024588764717093398e-03 2.171993734137579388e-03 1.592175254443112123e-03 1.105981137941243085e-03 7.126124732800847737e-04 4.198339447119756301e-04 2.214815015676863531e-04 6.381381633798216427e-05 +1.221059037045703996e-06 1.980850794262533178e-06 3.280747677844879614e-06 5.339952350249944027e-06 8.587968965355847597e-06 1.395097145909165727e-05 2.248956324075212826e-05 3.601289251846425256e-05 5.747523184234582574e-05 9.148553172116519465e-05 1.424131612995714169e-04 2.147104359979484475e-04 2.849482613661320622e-04 2.468753903182873723e-04 1.835589441963761208e-04 1.233382127593360455e-04 7.451373217222106852e-05 3.953983968559917110e-05 1.225685815025186899e-05 1.191680096482761947e-05 1.933326681625335258e-05 3.202444591743527750e-05 5.213530697846546248e-05 8.387324387456899176e-05 1.363229147557402314e-04 2.199489162224436197e-04 3.527107293596798594e-04 5.642721575542698634e-04 9.020104422714753751e-04 1.415028711156066576e-03 2.171993734137579388e-03 3.145773571486599508e-03 2.423183047542502248e-03 1.737182621436473336e-03 1.143096213494850400e-03 6.816742898046806391e-04 3.595559574081823111e-04 1.093759356889585405e-04 +8.695165755806494333e-07 1.410824959500567162e-06 2.337412087120434285e-06 3.806440143758090384e-06 6.126681546620210980e-06 9.966147271181514312e-06 1.610113131884310207e-05 2.587585923315629676e-05 4.154683660767695251e-05 6.683215425115430271e-05 1.059683567622363024e-04 1.647219619517009909e-04 2.468753903182873723e-04 3.204999638726577639e-04 2.747814848252659093e-04 1.939331183796771561e-04 1.202139169989478403e-04 6.383134633027272092e-05 2.157241057854987045e-05 8.273269555088804463e-06 1.342421059019756686e-05 2.224233895662579971e-05 3.622513360352056682e-05 5.831629344121579307e-05 9.488866081096710662e-05 1.533702013629067399e-04 2.466615517236950663e-04 3.965342377270438153e-04 6.392251561037616374e-04 1.017293786502081404e-03 1.592175254443112123e-03 2.423183047542502248e-03 3.328384964849622277e-03 2.635441964441503308e-03 1.806655948697129862e-03 1.102354636906747879e-03 5.808883480124648734e-04 1.929845335225605703e-04 +5.898790252545350903e-07 9.572198285950536182e-07 1.586236797148158261e-06 2.584033730041313518e-06 4.161412550267960227e-06 6.775428083725877461e-06 1.096237699939818887e-05 1.765996787815752531e-05 2.846970980064257646e-05 4.611618930338983477e-05 7.400175088780185941e-05 1.175633659310637292e-04 1.835589441963761208e-04 2.747814848252659093e-04 3.512672267452909424e-04 2.927014171664937066e-04 1.916404611885034852e-04 1.027046187981337438e-04 3.917226227807205362e-05 5.507471654836091909e-06 8.937363771518764641e-06 1.481087014200659356e-05 2.412868661322879751e-05 3.886093911622780028e-05 6.328063081724830824e-05 1.024090234340820554e-04 1.650385644511419151e-04 2.662241335022740322e-04 4.316951679018828873e-04 6.939727532872683397e-04 1.105981137941243085e-03 1.737182621436473336e-03 2.635441964441503308e-03 3.500119858914366600e-03 2.759208376492259650e-03 1.765574369826401931e-03 9.355548807471448201e-04 3.518714528143026751e-04 +3.749439055621312698e-07 6.084853744242953922e-07 1.008482257837801846e-06 1.643214814225584515e-06 2.647228194881346075e-06 4.312647425293510036e-06 6.984347660313650237e-06 1.126896383313775848e-05 1.821337692595606728e-05 2.963181640343671419e-05 4.790146139730386206e-05 7.709612892976440207e-05 1.233382127593360455e-04 1.939331183796771561e-04 2.927014171664936524e-04 3.706160639726783276e-04 2.928354315503242547e-04 1.653513376921384901e-04 7.245059135474819550e-05 3.453006663195163107e-06 5.603836677110994762e-06 9.287762447893487704e-06 1.513382757690393994e-05 2.438172909255693679e-05 3.972355487422395961e-05 6.433984625800309427e-05 1.038291637533681903e-04 1.678648295469400281e-04 2.732460389540334049e-04 4.421003055469429027e-04 7.126124732800847737e-04 1.143096213494850400e-03 1.806655948697129862e-03 2.759208376492259650e-03 3.592647620375256836e-03 2.727271157040773910e-03 1.510580073446350213e-03 6.538724340959140577e-04 +2.193766976457648750e-07 3.560374380426883176e-07 5.901349452994702941e-07 9.616913964847105401e-07 1.549625299179192924e-06 2.525430210118837555e-06 4.092315173098333391e-06 6.609010387048753780e-06 1.069839429029871058e-05 1.745143940100261606e-05 2.833534552520010165e-05 4.595117755974523503e-05 7.451373217222106852e-05 1.202139169989478403e-04 1.916404611885035394e-04 2.928354315503242547e-04 3.646638934039331237e-04 2.631209905479432992e-04 1.336621454666228192e-04 2.000705495767309243e-06 3.247060647438522805e-06 5.382074177381427753e-06 8.770810158419492807e-06 1.413317635469346083e-05 2.303369634123461751e-05 3.732690412472201104e-05 6.028782503754478018e-05 9.760648427505287975e-05 1.592593143926027458e-04 2.586961994196297805e-04 4.198339447119756301e-04 6.816742898046806391e-04 1.102354636906747879e-03 1.765574369826401931e-03 2.727271157040773910e-03 3.472448857883127758e-03 2.427304868821669043e-03 1.212573438075919717e-03 +1.159915796912387782e-07 1.882516712395424079e-07 3.120377286882500541e-07 5.085233369147651243e-07 8.194691049487145913e-07 1.335645107193929686e-06 2.164721714695801985e-06 3.496935571781517383e-06 5.663007519671715435e-06 9.243078866782870052e-06 1.501896930392994290e-05 2.437443330062290806e-05 3.953983968559917110e-05 6.383134633027272092e-05 1.027046187981337709e-04 1.653513376921384901e-04 2.631209905479432992e-04 3.399882122129586296e-04 2.366176860831864124e-04 1.052082106621266848e-06 1.707515346582983064e-06 2.830333088720200767e-06 4.612629205156957382e-06 7.433301876023163888e-06 1.211599971167383592e-05 1.963814437618834297e-05 3.172736816793462539e-05 5.138902238199245093e-05 8.390028064521681621e-05 1.363875062214761353e-04 2.214815015676863531e-04 3.595559574081823111e-04 5.808883480124648734e-04 9.355548807471446033e-04 1.510580073446350213e-03 2.427304868821669043e-03 3.196635133376424676e-03 2.167074622988353783e-03 +3.143267932479547965e-08 5.102604072087817880e-08 8.461212979646503562e-08 1.379760978149279355e-07 2.225641665020599333e-07 3.633500161289179774e-07 5.904424753441843371e-07 9.578640968309839602e-07 1.561966593730328833e-06 2.579141381628753489e-06 4.271336385891456688e-06 7.157955074792365645e-06 1.225685815025186560e-05 2.157241057854987045e-05 3.917226227807205362e-05 7.245059135474818195e-05 1.336621454666228192e-04 2.366176860831864395e-04 3.190411922935947270e-04 2.801883721279082154e-07 4.548422214697775206e-07 7.542263942621072979e-07 1.229909766360695989e-06 1.983923596205971957e-06 3.238880894588123737e-06 5.263160280161786447e-06 8.538266511476802701e-06 1.392288620797764434e-05 2.298888146952433271e-05 3.807161588395795697e-05 6.381381633798217782e-05 1.093759356889585405e-04 1.929845335225605703e-04 3.518714528143026751e-04 6.538724340959141661e-04 1.212573438075919717e-03 2.167074622988353350e-03 2.968932440846819634e-03 diff --git a/benchmarks/covariance/rp_bin_edges.dat b/benchmarks/covariance/rp_bin_edges.dat new file mode 100644 index 0000000..ef62d8e --- /dev/null +++ b/benchmarks/covariance/rp_bin_edges.dat @@ -0,0 +1,20 @@ +1.000000000000000000e+00 +1.274274985703133689e+00 +1.623776739188721674e+00 +2.069138081114789696e+00 +2.636650898730358072e+00 +3.359818286283781763e+00 +4.281332398719393417e+00 +5.455594781168518814e+00 +6.951927961775605347e+00 +8.858667904100824941e+00 +1.128837891684688977e+01 +1.438449888287662937e+01 +1.832980710832435634e+01 +2.335721469090121261e+01 +2.976351441631317840e+01 +3.792690190732249533e+01 +4.832930238571751858e+01 +6.158482110660260389e+01 +7.847599703514610781e+01 +1.000000000000000000e+02 diff --git a/benchmarks/covariance/shape_noise_LSSTY1Bin5_DESILRG_legacy.dat b/benchmarks/covariance/shape_noise_LSSTY1Bin5_DESILRG_legacy.dat new file mode 100644 index 0000000..036240a --- /dev/null +++ b/benchmarks/covariance/shape_noise_LSSTY1Bin5_DESILRG_legacy.dat @@ -0,0 +1 @@ +9.030588220106038413e-03 diff --git a/benchmarks/covariance/shot_noise_LSSTY1Bin5_DESILRG_legacy.dat b/benchmarks/covariance/shot_noise_LSSTY1Bin5_DESILRG_legacy.dat new file mode 100644 index 0000000..1f7fc87 --- /dev/null +++ b/benchmarks/covariance/shot_noise_LSSTY1Bin5_DESILRG_legacy.dat @@ -0,0 +1 @@ +2.000000000000000000e+03 diff --git a/benchmarks/covariance/vol_LSSTY1Bin5_DESILRG_legacy.dat b/benchmarks/covariance/vol_LSSTY1Bin5_DESILRG_legacy.dat new file mode 100644 index 0000000..3f6210e --- /dev/null +++ b/benchmarks/covariance/vol_LSSTY1Bin5_DESILRG_legacy.dat @@ -0,0 +1 @@ +6.101765357247895241e+09 diff --git a/src/dsf/covariance/cov_builder.py b/src/dsf/covariance/cov_builder.py index e888097..03524e5 100644 --- a/src/dsf/covariance/cov_builder.py +++ b/src/dsf/covariance/cov_builder.py @@ -38,7 +38,7 @@ ) from dsf.covariance.ingredients.noise import projected_shape_noise, shot_noise from dsf.covariance.ingredients.power_spectrum import lens_averaged_matter_power -from dsf.covariance.ingredients.sigma_crit import effective_sigma_crit_squared +from dsf.covariance.ingredients.sigma_crit import effective_squared_sigma_crit from dsf.covariance.projection.hankel_transform import HankelTransform from dsf.utils.converters import ( resolve_h, @@ -744,7 +744,7 @@ def pair_ingredients( gm_window=self.gm_window, ) - sigma_crit_squared_average = effective_sigma_crit_squared( + sigma_crit_squared_average = effective_squared_sigma_crit( self.cosmo, z_lens=self.z_lens, nz_lens=lens["nz_lens"], diff --git a/src/dsf/covariance/ingredients/geometry.py b/src/dsf/covariance/ingredients/geometry.py index 2dd905f..b0514f0 100644 --- a/src/dsf/covariance/ingredients/geometry.py +++ b/src/dsf/covariance/ingredients/geometry.py @@ -29,7 +29,6 @@ ) from .sigma_crit import ( - effective_sigma_crit_squared, effective_squared_sigma_crit, sigma_crit_inverse_comoving, )