Package cosmolopy :: Module parameters

Source Code for Module cosmolopy.parameters

  1  """Some pre-defined sets of cosmological parameters (e.g. from WMAP). 
  2  """ 
  3   
4 -def add_extras(cosmo):
5 """Sets neutrino number N_nu = 0, neutrino density 6 omega_n_0 = 0.0, Helium mass fraction Y_He = 0.24. 7 Also sets w = -1. 8 """ 9 extras = {'omega_n_0' : 0.0, 10 'N_nu': 0, 11 'Y_He': 0.24, 12 'w' : -1.0, 13 'baryonic_effects' : False 14 } 15 16 cosmo.update(extras) 17 return cosmo
18
19 -def WMAP7_BAO_H0_mean(flat=False, extras=True):
20 """WMAP7 + BAO + H_0 parameters from Komatsu et al. 21 (arxiv:1001.4538v1) 22 23 Parameters 24 ---------- 25 26 flat: boolean 27 28 If True, sets omega_lambda_0 = 1 - omega_M_0 to ensure omega_k_0 29 = 0 exactly. Also sets omega_k_0 = 0 explicitly. 30 31 extras: boolean 32 33 If True, sets neutrino number N_nu = 0, neutrino density 34 omega_n_0 = 0.0, Helium mass fraction Y_He = 0.24. 35 36 """ 37 omega_c_0 = 0.227 #0.228 38 omega_b_0 = 0.0456 #0.0456 39 cosmo = {'omega_b_0' : omega_b_0, 40 'omega_M_0' : omega_b_0 + omega_c_0, 41 'omega_lambda_0' : 0.728, #0.726, 42 'h' : 0.704, #0.706, 43 'n' : 0.963, #0.960, 44 'sigma_8' : 0.809, #0.812, 45 'tau' : 0.087, #0.084, 46 'z_reion' : 10.4, #10.9, 47 't_0' : 13.75, #13.72 48 } 49 if flat: 50 cosmo['omega_lambda_0'] = 1. - cosmo['omega_M_0'] 51 cosmo['omega_k_0'] = 0.0 52 if extras: 53 add_extras(cosmo) 54 return cosmo
55
56 -def WMAP7_ML(flat=False, extras=True):
57 """WMAP7 ML parameters from Komatsu et al. (arxiv:1001.4538v1) 58 59 Parameters 60 ---------- 61 62 flat: boolean 63 64 If True, sets omega_lambda_0 = 1 - omega_M_0 to ensure omega_k_0 65 = 0 exactly. Also sets omega_k_0 = 0 explicitly. 66 67 extras: boolean 68 69 If True, sets neutrino number N_nu = 0, neutrino density 70 omega_n_0 = 0.0, Helium mass fraction Y_He = 0.24. 71 72 """ 73 omega_c_0 = 0.217 74 omega_b_0 = 0.0445 75 cosmo = {'omega_b_0' : omega_b_0, 76 'omega_M_0' : omega_b_0 + omega_c_0, 77 'omega_lambda_0' : 0.738, 78 'h' : 0.714, 79 'n' : 0.969, 80 'sigma_8' : 0.803, 81 'tau' : 0.086, 82 'z_reion' : 10.3, 83 't_0' : 13.71, 84 } 85 if flat: 86 cosmo['omega_lambda_0'] = 1. - cosmo['omega_M_0'] 87 cosmo['omega_k_0'] = 0.0 88 if extras: 89 add_extras(cosmo) 90 return cosmo
91
92 -def WMAP5_BAO_SN_mean(flat=False, extras=True):
93 """WMAP5 + BAO + SN parameters from Komatsu et al. (2009ApJS..180..330K). 94 95 Parameters 96 ---------- 97 98 flat: boolean 99 100 If True, sets omega_lambda_0 = 1 - omega_M_0 to ensure omega_k_0 101 = 0 exactly. Also sets omega_k_0 = 0 explicitly. 102 103 extras: boolean 104 105 If True, sets neutrino number N_nu = 0, neutrino density 106 omega_n_0 = 0.0, Helium mass fraction Y_He = 0.24. 107 108 Notes 109 ----- 110 111 From the abstract of the paper: 112 113 The six parameters and the corresponding 68% uncertainties, 114 derived from the WMAP data combined with the distance 115 measurements from the Type Ia supernovae (SN) and the Baryon 116 Acoustic Oscillations (BAO) in the distribution of galaxies, 117 are: 118 119 Omega_B h^2 = 0.02267+0.00058-0.00059, 120 Omega_c h^2 = 0.1131 +/- 0.0034, 121 Omega_Lambda = 0.726 +/- 0.015, 122 n_s = 0.960 +/- 0.013, 123 tau = 0.084 +/- 0.016, and 124 Delata^2 R = (2.445 +/- 0.096) * 10^-9 at k = 0.002 Mpc^-1. 125 126 From these, we derive 127 128 sigma_8 = 0.812 +/- 0.026, 129 H0 = 70.5 +/- 1.3 km s^-11 Mpc^-1, 130 Omega_b = 0.0456 +/- 0.0015, 131 Omega_c = 0.228 +/- 0.013, 132 Omega_m h^2 = 0.1358 + 0.0037 - 0.0036, 133 zreion = 10.9 +/- 1.4, and 134 t0 = 13.72 +/- 0.12 Gyr. 135 136 """ 137 omega_c_0 = 0.228 138 omega_b_0 = 0.0456 139 cosmo = {'omega_b_0' : omega_b_0, 140 'omega_M_0' : omega_b_0 + omega_c_0, 141 'omega_lambda_0' : 0.726, 142 'h' : 0.706, 143 'n' : 0.960, 144 'sigma_8' : 0.812, 145 'tau' : 0.084, 146 'z_reion' : 10.9, 147 't_0' : 13.72 148 } 149 if flat: 150 cosmo['omega_lambda_0'] = 1. - cosmo['omega_M_0'] 151 cosmo['omega_k_0'] = 0.0 152 if extras: 153 add_extras(cosmo) 154 return cosmo
155
156 -def WMAP5_ML(flat=False, extras=True):
157 """WMAP5 parameters (using WMAP data alone) from Komatsu et 158 al. (2009ApJS..180..330K). 159 160 Parameters 161 ---------- 162 163 flat: boolean 164 165 If True, sets omega_lambda_0 = 1 - omega_M_0 to ensure omega_k_0 166 = 0 exactly. Also sets omega_k_0 = 0 explicitly. 167 168 extras: boolean 169 170 If True, sets neutrino number N_nu = 0, neutrino density 171 omega_n_0 = 0.0, Helium mass fraction Y_He = 0.24. 172 173 Notes 174 ----- 175 176 Values taken from "WMAP 5 Year ML" column of Table 1 of the paper. 177 178 """ 179 omega_c_0 = 0.206 180 omega_b_0 = 0.0432 181 cosmo = {'omega_b_0' : omega_b_0, 182 'omega_M_0' : omega_b_0 + omega_c_0, 183 'omega_lambda_0' : 0.751, 184 'h' : 0.724, 185 'n' : 0.961, 186 'sigma_8' : 0.787, 187 'tau' : 0.089, 188 'z_reion' : 11.2, 189 't_0' : 13.69 190 } 191 if flat: 192 cosmo['omega_lambda_0'] = 1. - cosmo['omega_M_0'] 193 cosmo['omega_k_0'] = 0.0 194 if extras: 195 add_extras(cosmo) 196 return cosmo
197
198 -def WMAP5_mean(flat=False, extras=True):
199 """WMAP5 parameters (using WMAP data alone) from Komatsu et 200 al. (2009ApJS..180..330K). 201 202 Parameters 203 ---------- 204 205 flat: boolean 206 207 If True, sets omega_lambda_0 = 1 - omega_M_0 to ensure omega_k_0 208 = 0 exactly. Also sets omega_k_0 = 0 explicitly. 209 210 extras: boolean 211 212 If True, sets neutrino number N_nu = 0, neutrino density 213 omega_n_0 = 0.0, Helium mass fraction Y_He = 0.24. 214 215 Notes 216 ----- 217 218 Values taken from "WMAP 5 Year Mean" of Table 1 of the paper. 219 220 """ 221 omega_c_0 = 0.214 222 omega_b_0 = 0.0441 223 cosmo = {'omega_b_0' : omega_b_0, 224 'omega_M_0' : omega_b_0 + omega_c_0, 225 'omega_lambda_0' : 0.742, 226 'h' : 0.719, 227 'n' : 0.963, 228 'sigma_8' : 0.796, 229 'tau' : 0.087, 230 'z_reion' : 11.0, 231 't_0' : 13.69 232 } 233 if flat: 234 cosmo['omega_lambda_0'] = 1. - cosmo['omega_M_0'] 235 cosmo['omega_k_0'] = 0.0 236 if extras: 237 add_extras(cosmo) 238 return cosmo
239 240
241 -def WiggleZ_fiducial(extras=True):
242 """WiggleZ fiducial cosmological parameter set from Blake et al. 243 (arxiv:1105.2862). N.b. that this does not use any WiggleZ results. 244 245 Parameters 246 ---------- 247 248 extras: boolean 249 250 If True, sets neutrino number N_nu = 0, neutrino density 251 omega_n_0 = 0.0, Helium mass fraction Y_He = 0.24 252 253 Notes 254 ----- 255 256 Values taken from the final paragraph of Section 1 of the paper. 257 The cosmology is flat by definition. 258 259 """ 260 omega_M_0 = 0.27 261 omega_c_0 = (1-0.166)*omega_M_0 262 omega_b_0 = 0.166*omega_M_0 263 cosmo = {'omega_b_0' : omega_b_0, 264 'omega_M_0' : omega_M_0, 265 'omega_lambda_0' : 1. - omega_M_0, 266 'omega_k_0' : 0.0, 267 'h' : 0.71, 268 'n' : 0.96, 269 'sigma_8' : 0.8 270 } 271 if extras: 272 add_extras(cosmo) 273 return cosmo
274