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

Functions

def do_all (m_arr, cpar, prefix)
 

Variables

float TCMB = 2.725
 
int PLOT_STUFF = 0
 
int WRITE_STUFF = 1
 
int FS = 16
 
int LKMAX = 7
 

Function Documentation

def sigmaM_bm.do_all (   m_arr,
  cpar,
  prefix 
)

Definition at line 14 of file sigmaM_bm.py.

14 def do_all(m_arr,cpar,prefix) :
15  pcs=csm.PcsPar()
16  pcs.background_set(cpar['om'],cpar['ol'],cpar['ob'],cpar['w0'],cpar['wa'],cpar['hh'],TCMB)
17  pcs.set_linear_pk('BBKS',-3,LKMAX,0.01,cpar['ns'],cpar['s8'])
18 
19  r_arr=np.array([pcs.M2R(m) for m in m_arr])
20  sm_arr=np.sqrt(np.array([pcs.sig0_L(r,r,'TopHat','TopHat') for r in r_arr]))
21 
22  if PLOT_STUFF==1 :
23  plt.plot(m_arr,sm_arr)
24  plt.xlabel('$M\\,[M_{\\odot}\\,h^{-1}]$',fontsize=FS)
25  plt.ylabel('$\\sigma(M)$',fontsize=FS)
26  plt.gca().set_xscale('log');
27  plt.gca().set_yscale('log');
28  plt.show()
29 
30  if WRITE_STUFF==1 :
31  np.savetxt(prefix+"_sm.txt",np.transpose([m_arr,sm_arr]),header="[1] M (M_sun/h), [2] sigma(M)")
32 
33 z_arr=np.array([0.,1.,2.,3.,4.,5.])
34 lm_arr=6.+2*np.arange(6)
35 m_arr=10**lm_arr
36 
37 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}
38 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}
39 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}
40 
41 do_all(m_arr,cpar_model1,"model1")
42 do_all(m_arr,cpar_model2,"model2")
43 do_all(m_arr,cpar_model3,"model3")
44 
def do_all(m_arr, cpar, prefix)
Definition: sigmaM_bm.py:14

Variable Documentation

int sigmaM_bm.FS = 16

Definition at line 11 of file sigmaM_bm.py.

int sigmaM_bm.LKMAX = 7

Definition at line 12 of file sigmaM_bm.py.

int sigmaM_bm.PLOT_STUFF = 0

Definition at line 9 of file sigmaM_bm.py.

float sigmaM_bm.TCMB = 2.725

Definition at line 8 of file sigmaM_bm.py.

int sigmaM_bm.WRITE_STUFF = 1

Definition at line 10 of file sigmaM_bm.py.