From 9daac0fa9a4743dfd7cf6b5c6d2d1d0e554957bf Mon Sep 17 00:00:00 2001 From: Joe Zuntz Date: Tue, 13 Aug 2024 15:48:36 +0200 Subject: [PATCH] add lum dist to class --- boltzmann/class/class_interface.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/boltzmann/class/class_interface.py b/boltzmann/class/class_interface.py index 4dd31a73..a59cb504 100644 --- a/boltzmann/class/class_interface.py +++ b/boltzmann/class/class_interface.py @@ -202,7 +202,8 @@ def get_class_outputs(block, c, config): block[distances, 'nz'] = nz # Save distance samples - block[distances, 'd_l'] = np.array([c.luminosity_distance(zi) for zi in z]) + d_l = np.array([c.luminosity_distance(zi) for zi in z]) + block[distances, 'd_l'] = d_l d_a = np.array([c.angular_distance(zi) for zi in z]) block[distances, 'd_a'] = d_a block[distances, 'd_m'] = d_a * (1 + z) @@ -215,6 +216,12 @@ def get_class_outputs(block, c, config): h_z = np.array([c.Hubble(zi) for zi in z]) block[distances, 'H'] = h_z + mu = np.zeros(z.size) + mu[0] = -np.inf + mu[1:] = 5.0 * np.log10(d_l[1:]) + 25.0 + block[distances, 'mu'] = mu + + ## # Now the CMB C_ell ##