Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
ccl_test_distances Namespace Reference

Functions

def Neff_from_N_ur_N_ncdm (N_ur, N_ncdm)
 
def read_chi_benchmark_file ()
 
def read_chi_hiz_benchmark_file ()
 
def read_chi_mnu_benchmark_file ()
 
def read_chi_mnu_hiz_benchmark_file ()
 
def read_class_allz_chi_benchmark_file ()
 
def read_class_mnu_chi_benchmark_file ()
 
def read_dm_benchmark_file ()
 
def read_dm_mnu_benchmark_file ()
 
def read_dm_mnu_hiz_benchmark_file ()
 
def read_class_allz_dm_benchmark_file ()
 
def read_class_mnu_dm_benchmark_file ()
 
def compare_distances (z, chi_bench, dm_bench, Omega_v, w0, wa)
 
def compare_distances_hiz (z, chi_bench, Omega_v, w0, wa)
 
def compare_distances_mnu (z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
 
def compare_distances_mnu_hiz (z, chi_bench, dm_bench, Omega_v, w0, wa, Neff_mnu, mnu)
 
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_distance_model_0 ()
 
def test_distance_model_1 ()
 
def test_distance_model_2 ()
 
def test_distance_model_3 ()
 
def test_distance_model_4 ()
 
def test_distance_hiz_model_0 ()
 
def test_distance_hiz_model_1 ()
 
def test_distance_hiz_model_2 ()
 
def test_distance_mnu_model_0 ()
 
def test_distance_mnu_model_1 ()
 
def test_distance_mnu_model_2 ()
 
def test_distance_mnu_model_3 ()
 
def test_distance_mnu_model_4 ()
 
def test_distance_mnu_hiz_model_0 ()
 
def test_distance_mnu_hiz_model_1 ()
 
def test_distance_mnu_hiz_model_2 ()
 
def test_distance_mnu_hiz_model_3 ()
 
def test_distance_mnu_hiz_model_4 ()
 
def test_class_distance_model_flat_nonu ()
 
def test_class_distance_model_pos_curv_nonu ()
 
def test_class_distance_model_neg_curv_nonu ()
 
def test_class_distance_model_flat_massnu1 ()
 
def test_class_distance_model_flat_massnu2 ()
 
def test_class_distance_model_flat_massnu3 ()
 
def test_class_distance_model_flat_manynu1 ()
 
def test_class_distance_model_neg_curv_massnu1 ()
 
def test_class_distance_model_pos_curv_massnu1 ()
 
def test_class_allz_distance_model_ccl1 ()
 
def test_class_allz_distance_model_ccl2 ()
 
def test_class_allz_distance_model_ccl3 ()
 
def test_class_allz_distance_model_ccl4 ()
 
def test_class_allz_distance_model_ccl5 ()
 
def test_class_allz_distance_model_ccl7 ()
 
def test_class_allz_distance_model_ccl8 ()
 
def test_class_allz_distance_model_ccl9 ()
 
def test_class_allz_distance_model_ccl10 ()
 
def test_class_allz_distance_model_ccl11 ()
 

Variables

int DISTANCES_TOLERANCE = 1
 
int DISTANCES_TOLERANCE_MNU = 1
 
int DISTANCES_TOLERANCE_CLASS = 1
 
float Omega_c = 0.25
 
float Omega_b = 0.05
 
float h = 0.7
 
float A_s = 2.1e-9
 
float n_s = 0.96
 
int Neff = 0
 
 Omega_v_vals = np.array([0.7, 0.7, 0.7, 0.65, 0.75])
 
 w0_vals = np.array([-1.0, -0.9, -0.9, -0.9, -0.9])
 
 wa_vals = np.array([0.0, 0.0, 0.1, 0.1, 0.1])
 
list mnu
 
float Neff_mnu = 3.0
 
dictionary class_models
 
 path = dirname(abspath(__file__))
 

Function Documentation

def ccl_test_distances.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 
)
Compare distances calculated by pyccl with the distances in the CLASS
benchmark file.

Definition at line 392 of file ccl_test_distances.py.

Referenced by compare_distances_mnu_hiz(), test_class_allz_distance_model_ccl1(), test_class_allz_distance_model_ccl10(), test_class_allz_distance_model_ccl11(), test_class_allz_distance_model_ccl2(), test_class_allz_distance_model_ccl3(), test_class_allz_distance_model_ccl4(), test_class_allz_distance_model_ccl5(), test_class_allz_distance_model_ccl7(), test_class_allz_distance_model_ccl8(), test_class_allz_distance_model_ccl9(), test_class_distance_model_flat_manynu1(), test_class_distance_model_flat_massnu1(), test_class_distance_model_flat_massnu2(), test_class_distance_model_flat_massnu3(), test_class_distance_model_flat_nonu(), test_class_distance_model_neg_curv_massnu1(), test_class_distance_model_neg_curv_nonu(), test_class_distance_model_pos_curv_massnu1(), and test_class_distance_model_pos_curv_nonu().

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 
def ccl_test_distances.compare_distances (   z,
  chi_bench,
  dm_bench,
  Omega_v,
  w0,
  wa 
)
Compare distances calculated by pyccl with the distances in the benchmark
file.
This test is only valid when radiation is explicitly set to 0.

Definition at line 297 of file ccl_test_distances.py.

Referenced by test_distance_model_0(), test_distance_model_1(), test_distance_model_2(), test_distance_model_3(), and test_distance_model_4().

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 
def compare_distances(z, chi_bench, dm_bench, Omega_v, w0, wa)
def ccl_test_distances.compare_distances_hiz (   z,
  chi_bench,
  Omega_v,
  w0,
  wa 
)
Compare distances calculated by pyccl with the distances in the benchmark
file.
This test is only valid when radiation is explicitly set to 0.

Definition at line 322 of file ccl_test_distances.py.

Referenced by test_distance_hiz_model_0(), test_distance_hiz_model_1(), and test_distance_hiz_model_2().

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
def compare_distances_hiz(z, chi_bench, Omega_v, w0, wa)
def ccl_test_distances.compare_distances_mnu (   z,
  chi_bench,
  dm_bench,
  Omega_v,
  w0,
  wa,
  Neff,
  mnu 
)
Compare distances calculated by pyccl with the distances in the benchmark
file.

Definition at line 342 of file ccl_test_distances.py.

Referenced by test_distance_mnu_hiz_model_0(), test_distance_mnu_hiz_model_1(), test_distance_mnu_hiz_model_2(), test_distance_mnu_hiz_model_3(), test_distance_mnu_hiz_model_4(), test_distance_mnu_model_0(), test_distance_mnu_model_1(), test_distance_mnu_model_2(), test_distance_mnu_model_3(), and test_distance_mnu_model_4().

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
def compare_distances_mnu(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
def ccl_test_distances.compare_distances_mnu_hiz (   z,
  chi_bench,
  dm_bench,
  Omega_v,
  w0,
  wa,
  Neff_mnu,
  mnu 
)
Compare distances calculated by pyccl with the distances in the benchmark
file.

Definition at line 367 of file ccl_test_distances.py.

References compare_class_distances().

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 
def compare_distances_mnu_hiz(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff_mnu, mnu)
def ccl_test_distances.Neff_from_N_ur_N_ncdm (   N_ur,
  N_ncdm 
)
Calculate N_eff from the number of relativistic and massive neutrinos.

Definition at line 41 of file ccl_test_distances.py.

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 
def Neff_from_N_ur_N_ncdm(N_ur, N_ncdm)
def ccl_test_distances.read_chi_benchmark_file ( )
Read the file containing all the radial comoving distance benchmarks
(distances are in Mpc/h)

Definition at line 115 of file ccl_test_distances.py.

Referenced by read_class_mnu_dm_benchmark_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 
def ccl_test_distances.read_chi_hiz_benchmark_file ( )
Read the file containing all the radial comoving distance benchmarks
(distances are in Mpc/h)

Definition at line 129 of file ccl_test_distances.py.

Referenced by read_chi_mnu_benchmark_file(), and read_class_mnu_dm_benchmark_file().

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 
def ccl_test_distances.read_chi_mnu_benchmark_file ( )
Read the file containing all the radial comoving distance benchmarks
with non-zero massive neutrinos
(distances are in Mpc)

Definition at line 143 of file ccl_test_distances.py.

References read_chi_hiz_benchmark_file().

Referenced by read_class_mnu_dm_benchmark_file().

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 
def ccl_test_distances.read_chi_mnu_hiz_benchmark_file ( )
Read the file containing all the radial comoving distance benchmarks
with non-zero massive neutrinos
(distances are in Mpc)

Definition at line 172 of file ccl_test_distances.py.

Referenced by read_class_mnu_dm_benchmark_file().

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 
def ccl_test_distances.read_class_allz_chi_benchmark_file ( )
Read the file containing the radial comoving distance benchmarks from
CLASS for the CCL paper models. (distances are in Mpc)

Definition at line 187 of file ccl_test_distances.py.

Referenced by read_class_mnu_dm_benchmark_file().

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 
def read_class_allz_chi_benchmark_file()
def ccl_test_distances.read_class_allz_dm_benchmark_file ( )
Read the file containing the distance modulus benchmarks from
CLASS for the CCL paper models.

Definition at line 256 of file ccl_test_distances.py.

Referenced by read_class_mnu_dm_benchmark_file().

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 
def ccl_test_distances.read_class_mnu_chi_benchmark_file ( )
Read the file containing the radial comoving distance benchmarks from
CLASS additional massive neutrino models. (distances are in Mpc)

Definition at line 201 of file ccl_test_distances.py.

Referenced by read_class_mnu_dm_benchmark_file().

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 
def ccl_test_distances.read_class_mnu_dm_benchmark_file ( )
Read the file containing the distance modulus benchmarks from
CLASS for additional massive neutrino models.

Definition at line 270 of file ccl_test_distances.py.

References read_chi_benchmark_file(), read_chi_hiz_benchmark_file(), read_chi_mnu_benchmark_file(), read_chi_mnu_hiz_benchmark_file(), read_class_allz_chi_benchmark_file(), read_class_allz_dm_benchmark_file(), read_class_mnu_chi_benchmark_file(), read_dm_benchmark_file(), read_dm_mnu_benchmark_file(), and read_dm_mnu_hiz_benchmark_file().

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 
def read_class_allz_chi_benchmark_file()
def ccl_test_distances.read_dm_benchmark_file ( )
Read the file containing all the distance modulus benchmarks

Definition at line 215 of file ccl_test_distances.py.

Referenced by read_class_mnu_dm_benchmark_file().

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 
def ccl_test_distances.read_dm_mnu_benchmark_file ( )
Read the file containing all the distance modulus benchmarks
for non-zero massive neutrinos.

Definition at line 228 of file ccl_test_distances.py.

Referenced by read_class_mnu_dm_benchmark_file().

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 
def ccl_test_distances.read_dm_mnu_hiz_benchmark_file ( )
Read the file containing all the distance modulus benchmarks
for non-zero massive neutrinos at high z.

Definition at line 242 of file ccl_test_distances.py.

Referenced by read_class_mnu_dm_benchmark_file().

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 
def ccl_test_distances.test_class_allz_distance_model_ccl1 ( )

Definition at line 521 of file ccl_test_distances.py.

References compare_class_distances().

522  i = 0
523  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL1"])
524 
def test_class_allz_distance_model_ccl1()
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 ccl_test_distances.test_class_allz_distance_model_ccl10 ( )

Definition at line 553 of file ccl_test_distances.py.

References compare_class_distances().

554  i = 8
555  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL10"])
556 
def test_class_allz_distance_model_ccl10()
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 ccl_test_distances.test_class_allz_distance_model_ccl11 ( )

Definition at line 557 of file ccl_test_distances.py.

References compare_class_distances().

558  i = 9
559  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL11"])
560 
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 ccl_test_distances.test_class_allz_distance_model_ccl2 ( )

Definition at line 525 of file ccl_test_distances.py.

References compare_class_distances().

526  i = 1
527  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL2"])
528 
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_ccl2()
def ccl_test_distances.test_class_allz_distance_model_ccl3 ( )

Definition at line 529 of file ccl_test_distances.py.

References compare_class_distances().

530  i = 2
531  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL3"])
532 
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_ccl3()
def ccl_test_distances.test_class_allz_distance_model_ccl4 ( )

Definition at line 533 of file ccl_test_distances.py.

References compare_class_distances().

534  i = 3
535  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL4"])
536 
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_ccl4()
def ccl_test_distances.test_class_allz_distance_model_ccl5 ( )

Definition at line 537 of file ccl_test_distances.py.

References compare_class_distances().

538  i = 4
539  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL5"])
540 
def test_class_allz_distance_model_ccl5()
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 ccl_test_distances.test_class_allz_distance_model_ccl7 ( )

Definition at line 541 of file ccl_test_distances.py.

References compare_class_distances().

542  i = 5
543  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL7"])
544 
def test_class_allz_distance_model_ccl7()
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 ccl_test_distances.test_class_allz_distance_model_ccl8 ( )

Definition at line 545 of file ccl_test_distances.py.

References compare_class_distances().

546  i = 6
547  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL8"])
548 
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 ccl_test_distances.test_class_allz_distance_model_ccl9 ( )

Definition at line 549 of file ccl_test_distances.py.

References compare_class_distances().

550  i = 7
551  compare_class_distances(z_class_allz, chi_class_allz[i], dm_class_allz[i], **class_models["CCL9"])
552 
def test_class_allz_distance_model_ccl9()
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 ccl_test_distances.test_class_distance_model_flat_manynu1 ( )

Definition at line 509 of file ccl_test_distances.py.

References compare_class_distances().

510  i = 6
511  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["flat_manynu1"])
512 
def test_class_distance_model_flat_manynu1()
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 ccl_test_distances.test_class_distance_model_flat_massnu1 ( )

Definition at line 497 of file ccl_test_distances.py.

References compare_class_distances().

498  i = 3
499  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["flat_massnu1"])
500 
def test_class_distance_model_flat_massnu1()
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 ccl_test_distances.test_class_distance_model_flat_massnu2 ( )

Definition at line 501 of file ccl_test_distances.py.

References compare_class_distances().

502  i = 4
503  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["flat_massnu2"])
504 
def test_class_distance_model_flat_massnu2()
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 ccl_test_distances.test_class_distance_model_flat_massnu3 ( )

Definition at line 505 of file ccl_test_distances.py.

References compare_class_distances().

506  i = 5
507  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["flat_massnu3"])
508 
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_distance_model_flat_massnu3()
def ccl_test_distances.test_class_distance_model_flat_nonu ( )

Definition at line 485 of file ccl_test_distances.py.

References compare_class_distances().

486  i = 0
487  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["flat_nonu"])
488 
def test_class_distance_model_flat_nonu()
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 ccl_test_distances.test_class_distance_model_neg_curv_massnu1 ( )

Definition at line 513 of file ccl_test_distances.py.

References compare_class_distances().

514  i = 7
515  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["neg_curv_massnu1"])
516 
def test_class_distance_model_neg_curv_massnu1()
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 ccl_test_distances.test_class_distance_model_neg_curv_nonu ( )

Definition at line 493 of file ccl_test_distances.py.

References compare_class_distances().

494  i = 2
495  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["neg_curv_nonu"])
496 
def test_class_distance_model_neg_curv_nonu()
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 ccl_test_distances.test_class_distance_model_pos_curv_massnu1 ( )

Definition at line 517 of file ccl_test_distances.py.

References compare_class_distances().

518  i = 8
519  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["pos_curv_manynu1"])
520 
def test_class_distance_model_pos_curv_massnu1()
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 ccl_test_distances.test_class_distance_model_pos_curv_nonu ( )

Definition at line 489 of file ccl_test_distances.py.

References compare_class_distances().

490  i = 1
491  compare_class_distances(z_class_mnu, chi_class_mnu[i], dm_class_mnu[i], **class_models["pos_curv_nonu"])
492 
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_distance_model_pos_curv_nonu()
def ccl_test_distances.test_distance_hiz_model_0 ( )

Definition at line 433 of file ccl_test_distances.py.

References compare_distances_hiz().

434  i = 0
435  compare_distances_hiz(zhi, chi_hiz[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
436 
def compare_distances_hiz(z, chi_bench, Omega_v, w0, wa)
def ccl_test_distances.test_distance_hiz_model_1 ( )

Definition at line 437 of file ccl_test_distances.py.

References compare_distances_hiz().

438  i = 1
439  compare_distances_hiz(zhi, chi_hiz[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
440 
def compare_distances_hiz(z, chi_bench, Omega_v, w0, wa)
def ccl_test_distances.test_distance_hiz_model_2 ( )

Definition at line 441 of file ccl_test_distances.py.

References compare_distances_hiz().

442  i = 2
443  compare_distances_hiz(zhi, chi_hiz[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
444 
def compare_distances_hiz(z, chi_bench, Omega_v, w0, wa)
def ccl_test_distances.test_distance_mnu_hiz_model_0 ( )

Definition at line 465 of file ccl_test_distances.py.

References compare_distances_mnu().

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 
def compare_distances_mnu(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
def ccl_test_distances.test_distance_mnu_hiz_model_1 ( )

Definition at line 469 of file ccl_test_distances.py.

References compare_distances_mnu().

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 
def compare_distances_mnu(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
def ccl_test_distances.test_distance_mnu_hiz_model_2 ( )

Definition at line 473 of file ccl_test_distances.py.

References compare_distances_mnu().

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 
def compare_distances_mnu(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
def ccl_test_distances.test_distance_mnu_hiz_model_3 ( )

Definition at line 477 of file ccl_test_distances.py.

References compare_distances_mnu().

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 
def compare_distances_mnu(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
def ccl_test_distances.test_distance_mnu_hiz_model_4 ( )

Definition at line 481 of file ccl_test_distances.py.

References compare_distances_mnu().

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 
def compare_distances_mnu(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
def ccl_test_distances.test_distance_mnu_model_0 ( )

Definition at line 445 of file ccl_test_distances.py.

References compare_distances_mnu().

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 
def compare_distances_mnu(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
def ccl_test_distances.test_distance_mnu_model_1 ( )

Definition at line 449 of file ccl_test_distances.py.

References compare_distances_mnu().

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 
def compare_distances_mnu(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
def ccl_test_distances.test_distance_mnu_model_2 ( )

Definition at line 453 of file ccl_test_distances.py.

References compare_distances_mnu().

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 
def compare_distances_mnu(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
def ccl_test_distances.test_distance_mnu_model_3 ( )

Definition at line 457 of file ccl_test_distances.py.

References compare_distances_mnu().

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 
def compare_distances_mnu(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
def ccl_test_distances.test_distance_mnu_model_4 ( )

Definition at line 461 of file ccl_test_distances.py.

References compare_distances_mnu().

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 
def compare_distances_mnu(z, chi_bench, dm_bench, Omega_v, w0, wa, Neff, mnu)
def ccl_test_distances.test_distance_model_0 ( )

Definition at line 413 of file ccl_test_distances.py.

References compare_distances().

414  i = 0
415  compare_distances(z, chi[i],dm[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
416 
def compare_distances(z, chi_bench, dm_bench, Omega_v, w0, wa)
def ccl_test_distances.test_distance_model_1 ( )

Definition at line 417 of file ccl_test_distances.py.

References compare_distances().

418  i = 1
419  compare_distances(z, chi[i],dm[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
420 
def compare_distances(z, chi_bench, dm_bench, Omega_v, w0, wa)
def ccl_test_distances.test_distance_model_2 ( )

Definition at line 421 of file ccl_test_distances.py.

References compare_distances().

422  i = 2
423  compare_distances(z, chi[i],dm[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
424 
def compare_distances(z, chi_bench, dm_bench, Omega_v, w0, wa)
def ccl_test_distances.test_distance_model_3 ( )

Definition at line 425 of file ccl_test_distances.py.

References compare_distances().

426  i = 3
427  compare_distances(z, chi[i],dm[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
428 
def compare_distances(z, chi_bench, dm_bench, Omega_v, w0, wa)
def ccl_test_distances.test_distance_model_4 ( )

Definition at line 429 of file ccl_test_distances.py.

References compare_distances().

430  i = 4
431  compare_distances(z, chi[i],dm[i], Omega_v_vals[i], w0_vals[i], wa_vals[i])
432 
def compare_distances(z, chi_bench, dm_bench, Omega_v, w0, wa)

Variable Documentation

float ccl_test_distances.A_s = 2.1e-9

Definition at line 23 of file ccl_test_distances.py.

Referenced by ccl_parameters_read_yaml(), ccl_parameters_write_yaml(), and main().

dictionary ccl_test_distances.class_models

Definition at line 46 of file ccl_test_distances.py.

int ccl_test_distances.DISTANCES_TOLERANCE = 1

Definition at line 8 of file ccl_test_distances.py.

int ccl_test_distances.DISTANCES_TOLERANCE_CLASS = 1

Definition at line 16 of file ccl_test_distances.py.

int ccl_test_distances.DISTANCES_TOLERANCE_MNU = 1

Definition at line 13 of file ccl_test_distances.py.

list ccl_test_distances.mnu
Initial value:
1 = [
2  [0.04, 0., 0.], [0.05, 0.01, 0.], [0.03, 0.02, 0.04], [0.05, 0., 0.],
3  [0.03, 0.02, 0.]]

Definition at line 32 of file ccl_test_distances.py.

Referenced by __attribute__(), ccl_cosmology_create_flat_lcdm(), ccl_nu_masses(), ccl_parameters_create(), ccl_parameters_create_flat_lcdm(), ccl_parameters_read_yaml(), and main().

float ccl_test_distances.n_s = 0.96
float ccl_test_distances.Neff_mnu = 3.0

Definition at line 38 of file ccl_test_distances.py.

float ccl_test_distances.Omega_b = 0.05
ccl_test_distances.Omega_v_vals = np.array([0.7, 0.7, 0.7, 0.65, 0.75])

Definition at line 28 of file ccl_test_distances.py.

ccl_test_distances.w0_vals = np.array([-1.0, -0.9, -0.9, -0.9, -0.9])

Definition at line 29 of file ccl_test_distances.py.

ccl_test_distances.wa_vals = np.array([0.0, 0.0, 0.1, 0.1, 0.1])

Definition at line 30 of file ccl_test_distances.py.