Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
growth_allz.py
Go to the documentation of this file.
1 import numpy as np
2 import py_cosmo_mad as csm
3 
4 TCMB = 2.725
5 
6 z_arr = np.logspace(-2, 3, 10, endpoint=True)
7 
8 cpar_model1={'om': 0.3,'ol': 0.7 ,'ob':0.05,'hh': 0.7,'s8': 0.8,'ns': 0.96,'w0': -1.0, 'wa': 0.0}
9 cpar_model2={'om': 0.3,'ol': 0.7 ,'ob':0.05,'hh': 0.7,'s8': 0.8,'ns': 0.96,'w0': -0.9, 'wa': 0.0}
10 cpar_model3={'om': 0.3,'ol': 0.7 ,'ob':0.05,'hh': 0.7,'s8': 0.8,'ns': 0.96,'w0': -0.9, 'wa': 0.1}
11 cpar_model4={'om': 0.3,'ol': 0.75,'ob':0.05,'hh': 0.7,'s8': 0.8,'ns': 0.96,'w0': -0.9, 'wa': 0.1}
12 cpar_model5={'om': 0.3,'ol': 0.65,'ob':0.05,'hh': 0.7,'s8': 0.8,'ns': 0.96,'w0': -0.9, 'wa': 0.1}
13 
14 growth_factor = np.zeros((5+1, len(z_arr)))
15 growth_factor[0] = z_arr
16 
17 for i, cpar in enumerate([cpar_model1, cpar_model2, cpar_model3, cpar_model5, cpar_model4]):
18  pcs=csm.PcsPar()
19  pcs.background_set(cpar['om'],cpar['ol'],cpar['ob'],cpar['w0'],cpar['wa'],cpar['hh'],TCMB)
20 
21  a_arr=1./(z_arr+1)
22  gf_arr=np.array([pcs.growth_factor(a) for a in a_arr])
23 
24  growth_factor[i+1] = gf_arr
25 
26 np.savetxt("../growth_cosmomad_allz.txt", growth_factor.T ,header="z, D(z) CCL1, D(z) CCL2, D(z) CCL3, D(z) CCL4, D(z) CCL5")