Blame view

Modules/Constants.py 1.55 KB
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
17
18

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
erg_to_GeV=1/(1.602176565e-3)
degre=180/pi
a05caa75   Thomas Fitoussi   Add 2d-histogram ...
19
yr=3600*24*365.25 # s
b5217158   Thomas Fitoussi   Python scripts to...
20
21
22
23
24
25
26
27
28
29
30

# 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:
31
32
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...
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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

# Compton accumulation
Compton_threshold = 0.05
ECompton_threshold = Compton_threshold/(4/3*2.7*Tcmbp) *me*1e-6 #GeV

# Value for analytic expression
Ee=1e3 #GeV
B=1e-17 #Gauss
lambda_B=0.3 #Mpc

# Compton scattering
Dic= 3*(me*1e-6)**2/(4*sigmaT*rhoCMB*1e-9*Ee) /Mpc #Mpc
lambdaIC=1/(nCMB*sigmaT*Mpc) #Mpc
Eic= 4*Ecmb*Ee**2/(3*me**2)*1e3 #GeV 
a05caa75   Thomas Fitoussi   Add 2d-histogram ...
55
tIC=lambdaIC/(c*yr/Mpc) #yr
b5217158   Thomas Fitoussi   Python scripts to...
56
57
58
59
60
61
62
63
64
65
66
67
68

# Larmor radius
RL=(Ee/erg_to_GeV)/(e*B) /Mpc #Mpc
# Magnetic deflection
delta=lambdaIC/RL*degre
Delta1=Dic/RL*degre                #degre if Dic >> lambda_B 
Delta2=sqrt(Dic*lambda_B)/RL*degre #degre if Dic << lambda_B

# Threshold energy when Dic = RL
Ethreshold_ic = Eic*Dic/RL # GeV
# Pair production
Ethreshold_gg=(me)**2/Eebl *1e-3 #GeV
lambda_gg=0.8 # (E_gamma/1TeV)^-1 Gpc (from Durrer and Neronov 2013)
ab1642d3   Thomas Fitoussi   Add usefull integ...