forked from alexander-mead/python_library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.py
27 lines (23 loc) · 807 Bytes
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Physical constants
h = 6.62607004e-34 # Planck constant [kg m^2 s^-1]
c = 2.998e8 # Speed of light [m s^-1]
kB = 1.38064852e-23 # Boltzmann constant [kg m^2 s^-2 K^-1]
mp = 1.6726219e-27 # Proton mass [kg]
# Units
Jy = 1e-26 # Jansky [W m^-2 Hz^-1]
au = 1.496e11 # au [m]
eV_mass = 1.79e-36 # eV/c^2 [kg]
year = 365.25*24.*60.*60. # year [s]
# Time
seconds_in_day = 60*60*24
# Astronomy
R_Sun = 6.957e8 # Solar radius [m]
M_Sun = 2.e30 # Solar mass [kg]
# Cosmology
# TODO: Derive those that should be derived
Hdist = 2997.92458 # c/H0 [Mpc/h]
Htime = 9.777922217 # 1/H0 [Gyr/h]
H0 = 100. # H0 in h [km/s/Mpc]
#rhoc = 277537383080.52332 # Critical density [(Msun/h) (Mpc/h)^-3]
rhoc = 2.775373e11 # Critical density [(Msun/h) (Mpc/h)^-3]
nuconst = 93.1 # Neutrino mass required to close universe [eV]