summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-06-24 17:03:10 +0800
committerAaron LI <aaronly.me@outlook.com>2016-06-24 17:03:10 +0800
commit2f511e2ed3e8628b28ca3bef872b76bb4c3d4a1d (patch)
treea2fc6f390a79709ef37e8a4e4ae8f393a95636b6
parentd3be61ffe23953c9c785fe4d2d6f8445a4bad80f (diff)
downloadcexcess-2f511e2ed3e8628b28ca3bef872b76bb4c3d4a1d.tar.bz2
astro_params.py: add some constants
-rw-r--r--astro_params.py25
1 files changed, 20 insertions, 5 deletions
diff --git a/astro_params.py b/astro_params.py
index b3b733b..bf7a0da 100644
--- a/astro_params.py
+++ b/astro_params.py
@@ -6,6 +6,9 @@
#
# Change logs:
# 2016-06-24:
+# * Add some constants from `astropy.constants`
+# * Add parameter 'mu'
+# * Fix reference
# * Add class 'ChandraPixel', moved from 'deproject_sbp.py'
#
@@ -15,6 +18,7 @@ and astrophysics.
"""
import astropy.units as au
+import astropy.constants as ac
from astropy.cosmology import FlatLambdaCDM
@@ -22,20 +26,31 @@ class AstroParams:
"""
The parameters/constants used in astronomy.
+ NOTE:
+ The 'cgs' unit system is used.
+
References:
- [1] ref. [4], eq.(9) below
+ [1] Ettori et al, 2013, Space Science Review, 177, 119-154
"""
+ # Gravitational constant
+ G = ac.G.cgs.value # [ cm^3 g^-1 s^-2 ]
+ # Boltzmann constant
+ k_B = ac.k_B.cgs.value # [ erg K^-1 ]
+ # Atomic mass unit (i.e., a.m.u)
+ m_atom = ac.u.cgs.value # [ g ]
# Hubble constant at z=0
H0 = 71.0 # [ km/s/Mpc ]
# density of non-relativistic matter in units of the critical density
# at z=0
OmegaM0 = 0.27
- # ratio of electron density (n_e) to proton density (n_p) [1]
+ # ratio of electron density (n_e) to proton density (n_p)
+ # (Ref: [1], eq.(9) below)
ratio_ne_np = 1.211
- # molecular weight per electron (0.3 solar abundance; grsa table) [1]
+ # molecular weight per electron (0.3 solar abundance; grsa table)
+ # (Ref: [1], eq.(9) below)
mu_e = 1.155
- # atomic mass unit
- m_atom = au.u.to(au.g) # [ g ]
+ # mean molecular weight (unit: a.m.u) [1] (Ref: [1], eq.(6) below)
+ mu = 0.6
class ChandraPixel: