Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
ccl_test_distances.py
Go to the documentation of this file.
1 import numpy as np
2 from numpy.testing import assert_allclose, run_module_suite
3 import numpy.testing
4 import pyccl as ccl
5 from os.path import dirname, join, abspath
6 
7 # Set tolerances
8 DISTANCES_TOLERANCE = 1e-4
9 # The distance tolerance is 1e-3 for distances with massive neutrinos
10 # This is because we compare to astropy which uses a fitting function
11 # instead of the full phasespace integral.
12 # The fitting function itself is not accurate to 1e-4.
13 DISTANCES_TOLERANCE_MNU = 1e-3
14 
15 # Tolerance for comparison with CLASS. Currently works up to 1e-6.
16 DISTANCES_TOLERANCE_CLASS = 1e-5
17 
18 # Set up the cosmological parameters to be used in each of the models
19 # Values that are the same for all 5 models
20 Omega_c = 0.25
21 Omega_b = 0.05
22 h = 0.7
23 A_s = 2.1e-9
24 n_s = 0.96
25 Neff = 0.
26 
27 # Values that are different for the different models
28 Omega_v_vals = np.array([0.7, 0.7, 0.7, 0.65, 0.75])
29 w0_vals = np.array([-1.0, -0.9, -0.9, -0.9, -0.9])
30 wa_vals = np.array([0.0, 0.0, 0.1, 0.1, 0.1])
31 
32 mnu = [
33  [0.04, 0., 0.], [0.05, 0.01, 0.], [0.03, 0.02, 0.04], [0.05, 0., 0.],
34  [0.03, 0.02, 0.]]
35 # For tests with massive neutrinos, we require N_nu_rel + N_nu_mass = 3
36 # Because we compare with astropy for benchmarks
37 # Which assumes N total is split equally among all neutrinos.
38 Neff_mnu = 3.0
39 
40 
41 def Neff_from_N_ur_N_ncdm(N_ur, N_ncdm):
42  """Calculate N_eff from the number of relativistic and massive neutrinos."""
43  Neff = N_ur + N_ncdm * ccl.ccllib.TNCDM**4 / (4./11.)**(4./3.)
44  return Neff
45 
46 class_models = {
47  "flat_nonu" : {"Omega_k" : 0.0,
48  "Neff" : 3.0},
49  "pos_curv_nonu" : {"Omega_k" : 0.01,
50  "Neff" : 3.0},
51  "neg_curv_nonu" : {"Omega_k" : -0.01,
52  "Neff" : 3.0},
53  "flat_massnu1" : {"Omega_k" : 0.0,
54  "Neff" : Neff_from_N_ur_N_ncdm(N_ur=2.0, N_ncdm=1.0), # 1 massive neutrino
55  "m_nu" : [0.0, 0.0, 0.1]}, # Mass
56  "flat_massnu2" : {"Omega_k" : 0.0,
57  "Neff" : Neff_from_N_ur_N_ncdm(N_ur=0.0, N_ncdm=3.0), # 3 massive neutrino
58  "m_nu" : [0.03, 0.03, 0.1]}, # Masses
59  "flat_massnu3" : {"Omega_k" : 0.0,
60  "Neff" : Neff_from_N_ur_N_ncdm(N_ur=0.0, N_ncdm=3.0), # 3 massive neutrino
61  "m_nu" : [0.03, 0.05, 0.1]}, # Masses
62  "flat_manynu1" : {"Omega_k" : 0.0,
63  "Neff" : 6.0}, # 6 massless neutrinos
64  "neg_curv_massnu1" : {"Omega_k" : -0.01,
65  "Neff" : Neff_from_N_ur_N_ncdm(N_ur=4.0, N_ncdm=2.0), # 4 massless, 2 massive neutrino
66  "m_nu" : [0.0, 0.03, 0.1]}, # Masses
67  "pos_curv_manynu1" : {"Omega_k" : 0.01,
68  "Neff" : Neff_from_N_ur_N_ncdm(N_ur=3.0, N_ncdm=3.0), # 3 massless, 3 massive neutrino
69  "m_nu" : [0.03, 0.05, 0.1]}, # Masses
70  "CCL1" : {"Omega_k" : 0.0,
71  "Neff" : 3.046,},
72  "CCL2" : {"Omega_k" : 0.0,
73  "w0" : -0.9,
74  "wa" : 0.0,
75  "Neff" : 3.046},
76  "CCL3" : {"Omega_k" : 0.0,
77  "w0" : -0.9,
78  "wa" : 0.1,
79  "Neff" : 3.046},
80  "CCL4" : {"Omega_k" : 0.05,
81  "w0" : -0.9,
82  "wa" : 0.1,
83  "Neff" : 3.046},
84  "CCL5" : {"Omega_k" : -0.05,
85  "w0" : -0.9,
86  "wa" : 0.1,
87  "Neff" : 3.046},
88  "CCL7" : {"Omega_k" : 0.0,
89  "Neff" : Neff_from_N_ur_N_ncdm(N_ur=2.0, N_ncdm=1.0),
90  "m_nu" : [0.04, 0.0, 0.0]},
91  "CCL8" : {"Omega_k" : 0.0,
92  "w0" : -0.9,
93  "wa" : 0.0,
94  "Neff" : Neff_from_N_ur_N_ncdm(N_ur=1.0, N_ncdm=2.0),
95  "m_nu" : [0.05, 0.01, 0.0]},
96  "CCL9" : {"Omega_k" : 0.0,
97  "w0" : -0.9,
98  "wa" : 0.1,
99  "Neff" : Neff_from_N_ur_N_ncdm(N_ur=0.0, N_ncdm=3.0),
100  "m_nu" : [0.03, 0.02, 0.04]},
101  "CCL10" : {"Omega_k" : 0.05,
102  "w0" : -0.9,
103  "wa" : 0.1,
104  "Neff" : Neff_from_N_ur_N_ncdm(N_ur=2.0, N_ncdm=1.0),
105  "m_nu" : [0.05, 0.0, 0.0]},
106  "CCL11" : {"Omega_k" : -0.05,
107  "w0" : -0.9,
108  "wa" : 0.1,
109  "Neff" : Neff_from_N_ur_N_ncdm(N_ur=1.0, N_ncdm=2.0),
110  "m_nu" : [0.03, 0.02, 0.0]},
111 
112  }
113 
114 path = dirname(abspath(__file__))
116  """
117  Read the file containing all the radial comoving distance benchmarks
118  (distances are in Mpc/h)
119  """
120  # Load data from file
121  dat = np.genfromtxt(join(path,"benchmark/chi_model1-5.txt")).T
122  assert(dat.shape == (6,6))
123 
124  # Split into redshift column and chi(z) columns
125  z = dat[0]
126  chi = dat[1:]
127  return z, chi
128 
130  """
131  Read the file containing all the radial comoving distance benchmarks
132  (distances are in Mpc/h)
133  """
134  # Load data from file
135  dat = np.genfromtxt(join(path,"benchmark/chi_hiz_model1-3.txt")).T
136  assert(dat.shape == (4,7))
137 
138  # Split into redshift column and chi(z) columns
139  z = dat[0]
140  chi = dat[1:]
141  return z, chi
142 
144  """
145  Read the file containing all the radial comoving distance benchmarks
146  with non-zero massive neutrinos
147  (distances are in Mpc)
148  """
149  # Load data from file
150  dat = np.genfromtxt(join(path,"benchmark/chi_mnu_model1-5.txt")).T
151  assert(dat.shape == (6,5))
152 
153  # Split into redshift column and chi(z) columns
154  z = dat[0]
155  chi = dat[1:]
156  return z, chi
157 
159  """
160  Read the file containing all the radial comoving distance benchmarks
161  (distances are in Mpc/h)
162  """
163  # Load data from file
164  dat = np.genfromtxt(join(path,"benchmark/chi_hiz_model1-3.txt")).T
165  assert(dat.shape == (4,7))
166 
167  # Split into redshift column and chi(z) columns
168  z = dat[0]
169  chi = dat[1:]
170  return z, chi
171 
173  """
174  Read the file containing all the radial comoving distance benchmarks
175  with non-zero massive neutrinos
176  (distances are in Mpc)
177  """
178  # Load data from file
179  dat = np.genfromtxt(join(path,"benchmark/chi_hiz_mnu_model1-5.txt")).T
180  assert(dat.shape == (6,7))
181 
182  # Split into redshift column and chi(z) columns
183  z = dat[0]
184  chi = dat[1:]
185  return z, chi
186 
188  """
189  Read the file containing the radial comoving distance benchmarks from
190  CLASS for the CCL paper models. (distances are in Mpc)
191  """
192  # Load data from file
193  dat = np.genfromtxt(join(path, "benchmark/chi_class_allz.txt")).T
194  assert(dat.shape == (11, 10))
195 
196  # Split into redshift column and chi(z) columns
197  z = dat[0]
198  chi = dat[1:]
199  return z, chi
200 
202  """
203  Read the file containing the radial comoving distance benchmarks from
204  CLASS additional massive neutrino models. (distances are in Mpc)
205  """
206  # Load data from file
207  dat = np.genfromtxt(join(path, "benchmark/chi_class_extra_mnu.txt")).T
208  assert(dat.shape == (10, 10))
209 
210  # Split into redshift column and chi(z) columns
211  z = dat[0]
212  chi = dat[1:]
213  return z, chi
214 
216  """
217  Read the file containing all the distance modulus benchmarks
218  """
219  # Load data from file
220  dat = np.genfromtxt(join(path,"benchmark/dm_model1-5.txt")).T
221  assert(dat.shape == (6,6))
222 
223  # Split into redshift column and chi(z) columns
224  z = dat[0]
225  dm = dat[1:]
226  return z, dm
227 
229  """
230  Read the file containing all the distance modulus benchmarks
231  for non-zero massive neutrinos.
232  """
233  # Load data from file
234  dat = np.genfromtxt(join(path,"benchmark/dm_mnu_model1-5.txt")).T
235  assert(dat.shape == (6,5))
236 
237  # Split into redshift column and chi(z) columns
238  z = dat[0]
239  dm = dat[1:]
240  return z, dm
241 
243  """
244  Read the file containing all the distance modulus benchmarks
245  for non-zero massive neutrinos at high z.
246  """
247  # Load data from file
248  dat = np.genfromtxt(join(path,"benchmark/dm_hiz_mnu_model1-5.txt")).T
249  assert(dat.shape == (6,7))
250 
251  # Split into redshift column and chi(z) columns
252  z = dat[0]
253  dm = dat[1:]
254  return z, dm
255 
257  """
258  Read the file containing the distance modulus benchmarks from
259  CLASS for the CCL paper models.
260  """
261  # Load data from file
262  dat = np.genfromtxt(join(path, "benchmark/dm_class_allz.txt")).T
263  assert(dat.shape == (11, 10))
264 
265  # Split into redshift column and dm(z) columns
266  z = dat[0]
267  dm = dat[1:]
268  return z, dm
269 
271  """
272  Read the file containing the distance modulus benchmarks from
273  CLASS for additional massive neutrino models.
274  """
275  # Load data from file
276  dat = np.genfromtxt(join(path, "benchmark/dm_class_extra_mnu.txt")).T
277  assert(dat.shape == (10, 10))
278 
279  # Split into redshift column and dm(z) columns
280  z = dat[0]
281  dm = dat[1:]
282  return z, dm
283 
284 # Set-up test data
285 z, chi = read_chi_benchmark_file()
286 zhi, chi_hiz = read_chi_hiz_benchmark_file()
287 _, dm = read_dm_benchmark_file()
288 znu, chi_nu = read_chi_mnu_benchmark_file()
289 znuhi, chi_nu_hiz = read_chi_mnu_hiz_benchmark_file()
290 z_class_mnu, chi_class_mnu = read_class_mnu_chi_benchmark_file()
291 z_dm_class_mnu, dm_class_mnu = read_class_mnu_dm_benchmark_file()
292 z_class_allz, chi_class_allz = read_class_allz_chi_benchmark_file()
293 z_dm_class_allz, dm_class_allz = read_class_allz_dm_benchmark_file()
294 _znu, dm_nu = read_dm_mnu_benchmark_file()
295 _znuhi, dm_nu_hiz = read_dm_mnu_hiz_benchmark_file()
296 
297 def compare_distances(z, chi_bench,dm_bench, Omega_v, w0, wa):
298  """
299  Compare distances calculated by pyccl with the distances in the benchmark
300  file.
301  This test is only valid when radiation is explicitly set to 0.
302  """
303  # Set Omega_K in a consistent way
304  Omega_k = 1.0 - Omega_c - Omega_b - Omega_v
305 
306  cosmo = ccl.Cosmology(Omega_c=Omega_c, Omega_b=Omega_b, Neff = Neff,
307  h=h, A_s=A_s, n_s=n_s, Omega_k=Omega_k,
308  w0=w0, wa=wa, Omega_g=0)
309 
310  # Calculate distance using pyccl
311  a = 1. / (1. + z)
312  chi = ccl.comoving_radial_distance(cosmo, a) * h
313  # Compare to benchmark data
314  assert_allclose(chi, chi_bench, atol=1e-12, rtol=DISTANCES_TOLERANCE)
315 
316  #compare distance moudli where a!=1
317  a_not_one = (a!=1).nonzero()
318  dm = ccl.distance_modulus(cosmo,a[a_not_one])
319 
320  assert_allclose(dm, dm_bench[a_not_one], atol=1e-3, rtol = DISTANCES_TOLERANCE*10)
321 
322 def compare_distances_hiz(z, chi_bench, Omega_v, w0, wa):
323  """
324  Compare distances calculated by pyccl with the distances in the benchmark
325  file.
326  This test is only valid when radiation is explicitly set to 0.
327  """
328  # Set Omega_K in a consistent way
329  Omega_k = 1.0 - Omega_c - Omega_b - Omega_v
330 
331  cosmo = ccl.Cosmology(Omega_c=Omega_c, Omega_b=Omega_b, Neff=Neff,
332  h=h, A_s=A_s, n_s=n_s, Omega_k=Omega_k,
333  w0=w0, wa=wa, Omega_g=0)
334 
335  # Calculate distance using pyccl
336  a = 1. / (1. + z)
337  chi = ccl.comoving_radial_distance(cosmo, a) * h
338  # Compare to benchmark data
339  assert_allclose(chi, chi_bench, atol=1e-12, rtol=DISTANCES_TOLERANCE)
340 
341 @numpy.testing.dec.slow
342 def compare_distances_mnu(z, chi_bench,dm_bench, Omega_v, w0, wa, Neff, mnu):
343  """
344  Compare distances calculated by pyccl with the distances in the benchmark
345  file.
346  """
347  # Set Omega_K in a consistent way
348  Omega_k = 1.0 - Omega_c - Omega_b - Omega_v
349 
350  cosmo = ccl.Cosmology(Omega_c=Omega_c, Omega_b=Omega_b, Neff=Neff_mnu,
351  h=h, A_s=A_s, n_s=n_s, Omega_k=Omega_k,
352  w0=w0, wa=wa, m_nu=mnu)
353 
354  # Calculate distance using pyccl
355  a = 1. / (1. + z)
356  chi = ccl.comoving_radial_distance(cosmo, a)
357  # Compare to benchmark data
358  assert_allclose(chi, chi_bench, atol=1e-12, rtol=DISTANCES_TOLERANCE_MNU)
359 
360  #compare distance moudli where a!=1
361  a_not_one = (a!=1).nonzero()
362  dm = ccl.distance_modulus(cosmo,a[a_not_one])
363 
364  assert_allclose(dm, dm_bench[a_not_one], atol=1e-3, rtol = DISTANCES_TOLERANCE_MNU)
365 
366 @numpy.testing.dec.slow
367 def compare_distances_mnu_hiz(z, chi_bench,dm_bench, Omega_v, w0, wa, Neff_mnu, mnu):
368  """
369  Compare distances calculated by pyccl with the distances in the benchmark
370  file.
371  """
372  # Set Omega_K in a consistent way
373  Omega_k = 1.0 - Omega_c - Omega_b - Omega_v
374 
375  cosmo = ccl.Cosmology(Omega_c=Omega_c, Omega_b=Omega_b, Neff=Neff,
376  h=h, A_s=A_s, n_s=n_s, Omega_k=Omega_k,
377  w0=w0, wa=wa, m_nu=mnu)
378 
379  # Calculate distance using pyccl
380  a = 1. / (1. + z)
381  chi = ccl.comoving_radial_distance(cosmo, a)
382  # Compare to benchmark data
383  assert_allclose(chi, chi_bench, atol=1e-12, rtol=DISTANCES_TOLERANCE_MNU)
384 
385  #compare distance moudli where a!=1
386  a_not_one = (a!=1).nonzero()
387  dm = ccl.distance_modulus(cosmo,a[a_not_one])
388 
389  assert_allclose(dm, dm_bench[a_not_one], atol=1e-3, rtol = DISTANCES_TOLERANCE_MNU)
390 
391 def compare_class_distances(z, chi_bench, dm_bench, Neff=3.0, m_nu=0.0,
392  Omega_k=0.0, w0=-1.0, wa=0.0):
393  """
394  Compare distances calculated by pyccl with the distances in the CLASS
395  benchmark file.
396  """
397  cosmo = ccl.Cosmology(Omega_c=Omega_c, Omega_b=Omega_b, Neff=Neff,
398  h=h, A_s=A_s, n_s=n_s, Omega_k=Omega_k, m_nu=m_nu,
399  w0=w0, wa=wa)
400 
401  # Calculate distance using pyccl
402  a = 1. / (1. + z)
403  chi = ccl.comoving_radial_distance(cosmo, a)
404  # Compare to benchmark data
405  assert_allclose(chi, chi_bench, rtol=DISTANCES_TOLERANCE_CLASS)
406 
407  # Compare distance moudli where a!=1
408  a_not_one = a != 1
409  dm = ccl.distance_modulus(cosmo, a[a_not_one])
410  assert_allclose(dm, dm_bench[a_not_one], rtol=DISTANCES_TOLERANCE_CLASS)
411 
412 
414  i = 0
415  compare_distances(z, chi[i],dm[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
416 
418  i = 1
419  compare_distances(z, chi[i],dm[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
420 
422  i = 2
423  compare_distances(z, chi[i],dm[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
424 
426  i = 3
427  compare_distances(z, chi[i],dm[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
428 
430  i = 4
431  compare_distances(z, chi[i],dm[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
432 
434  i = 0
435  compare_distances_hiz(zhi, chi_hiz[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
436 
438  i = 1
439  compare_distances_hiz(zhi, chi_hiz[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
440 
442  i = 2
443  compare_distances_hiz(zhi, chi_hiz[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
444 
446  i=0
447  compare_distances_mnu(znu, chi_nu[i],dm_nu[i], Omega_v_vals[i], w0_vals[i], wa_vals[i], Neff, mnu[i])
448 
450  i=1
451  compare_distances_mnu(znu, chi_nu[i],dm_nu[i], Omega_v_vals[i], w0_vals[i], wa_vals[i], Neff, mnu[i])
452 
454  i=2
455  compare_distances_mnu(znu, chi_nu[i],dm_nu[i], Omega_v_vals[i], w0_vals[i], wa_vals[i], Neff, mnu[i])
456 
458  i=3
459  compare_distances_mnu(znu, chi_nu[i],dm_nu[i], Omega_v_vals[i], w0_vals[i], wa_vals[i], Neff, mnu[i])
460 
462  i=4
463  compare_distances_mnu(znu, chi_nu[i],dm_nu[i], Omega_v_vals[i], w0_vals[i], wa_vals[i], Neff, mnu[i])
464 
466  i=0
467  compare_distances_mnu(znuhi, chi_nu_hiz[i],dm_nu_hiz[i], Omega_v_vals[i], w0_vals[i], wa_vals[i], Neff, mnu[i])
468 
470  i=1
471  compare_distances_mnu(znuhi, chi_nu_hiz[i],dm_nu_hiz[i], Omega_v_vals[i], w0_vals[i], wa_vals[i], Neff, mnu[i])
472 
474  i=2
475  compare_distances_mnu(znuhi, chi_nu_hiz[i],dm_nu_hiz[i], Omega_v_vals[i], w0_vals[i], wa_vals[i], Neff, mnu[i])
476 
478  i=3
479  compare_distances_mnu(znuhi, chi_nu_hiz[i],dm_nu_hiz[i], Omega_v_vals[i], w0_vals[i], wa_vals[i], Neff, mnu[i])
480 
482  i=4
483  compare_distances_mnu(znuhi, chi_nu_hiz[i],dm_nu_hiz[i], Omega_v_vals[i], w0_vals[i], wa_vals[i], Neff, mnu[i])
484 
486  i = 0
487  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["flat_nonu"])
488 
490  i = 1
491  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["pos_curv_nonu"])
492 
494  i = 2
495  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["neg_curv_nonu"])
496 
498  i = 3
499  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["flat_massnu1"])
500 
502  i = 4
503  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["flat_massnu2"])
504 
506  i = 5
507  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["flat_massnu3"])
508 
510  i = 6
511  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["flat_manynu1"])
512 
514  i = 7
515  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["neg_curv_massnu1"])
516 
518  i = 8
519  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["pos_curv_manynu1"])
520 
522  i = 0
523  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL1"])
524 
526  i = 1
527  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL2"])
528 
530  i = 2
531  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL3"])
532 
534  i = 3
535  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL4"])
536 
538  i = 4
539  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL5"])
540 
542  i = 5
543  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL7"])
544 
546  i = 6
547  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL8"])
548 
550  i = 7
551  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL9"])
552 
554  i = 8
555  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL10"])
556 
558  i = 9
559  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL11"])
560 
561 if __name__ == "__main__":
562  run_module_suite()
def test_class_allz_distance_model_ccl9()
def test_class_distance_model_flat_massnu2()
def test_class_distance_model_flat_massnu1()
def compare_distances(z, chi_bench, dm_bench, Omega_v, w0, wa)
def compare_distances_mnu_hiz(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff_mnu, mnu)
def test_class_allz_distance_model_ccl7()
def compare_distances_hiz(z, chi_bench, Omega_v, w0, wa)
def test_class_allz_distance_model_ccl5()
def test_class_allz_distance_model_ccl10()
def compare_distances_mnu(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
def test_class_distance_model_neg_curv_nonu()
def test_class_distance_model_neg_curv_massnu1()
def test_class_distance_model_flat_nonu()
def test_class_distance_model_flat_manynu1()
def test_class_allz_distance_model_ccl1()
def test_class_distance_model_pos_curv_massnu1()
def Neff_from_N_ur_N_ncdm(N_ur, N_ncdm)
def test_class_allz_distance_model_ccl8()
def compare_class_distances(z, chi_bench, dm_bench, Neff=3.0, m_nu=0.0, Omega_k=0.0, w0=-1.0, wa=0.0)
def test_class_allz_distance_model_ccl11()
def test_class_allz_distance_model_ccl3()
def test_class_distance_model_pos_curv_nonu()
def test_class_allz_distance_model_ccl2()
def test_class_allz_distance_model_ccl4()
def read_class_allz_chi_benchmark_file()
def test_class_distance_model_flat_massnu3()