Blame view

modules/constants.py 822 Bytes
b5217158   Thomas Fitoussi   Python scripts to...
1
2
#!/bin/python

7030f150   Thomas Fitoussi   Full reorganisati...
3
4
from numpy import pi, sqrt
from scipy.special import zeta
b5217158   Thomas Fitoussi   Python scripts to...
5
6
7
8
9
10
11
12
13
14
15
16

e=4.8032068e-10 # esu (cgs units)
qe=1.602176565e-12 # erg
m=9.1093897e-28 # g
me=510.998928 # kev
c=2.99792458e10 # cm.s-1
k=1.380658E-16 # erg.K-1
h=6.62606957e-27 # erg.s
hb=1.05457266E-27 # erg.s
alpha=1./137.035999679
lambdaC=hb/(m*c)
Mpc=(3.0856776e+16)*1e8 # Mpc to cm
188a8c6a   Thomas Fitoussi   Update analysis 2...
17
18

# conversion
b5217158   Thomas Fitoussi   Python scripts to...
19
erg_to_GeV=1/(1.602176565e-3)
3c65fe50   Thomas Fitoussi   Modification in t...
20
degre=pi/180
188a8c6a   Thomas Fitoussi   Update analysis 2...
21
22
day=24*3600 # s
yr=365.25*day # s
b5217158   Thomas Fitoussi   Python scripts to...
23
24
25
26
27
28
29
30
31
32
33

# Cosmology
a0=1.
H0=67.8*1e5/(Mpc) # s-1
omegaM = 0.3
omegaK = 0
omegaL = 0.7

# CMB 
Tcmb=2.7255 # K
Tcmbp=(k*Tcmb)/(m*c*c) # Adimentionnal thermal energy
e4ba931e   Thomas Fitoussi   Corrections:
34
35
nCMB=(16*pi*zeta(3,1))*(k*Tcmb/(h*c))**3 # cm^-3
Ecmb=(pi**4/(30*zeta(3,1)))*Tcmbp*me*1e3 #eV
b5217158   Thomas Fitoussi   Python scripts to...
36
37
38
39
40
41
42
43
rhoCMB=Ecmb*nCMB #eV.cm^-3

# EBL
Eebl=1 #eV

# Particles physics
r0=e*e/(m*c*c)
sigmaT=8.*pi*(r0**2)/3. # Thomson cross section