aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/clusters/units.py
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-01-16 21:10:30 +0800
committerAaron LI <aly@aaronly.me>2017-06-01 16:33:40 +0800
commit93dc96a0a6a336419b2e80b221257a8a7532019a (patch)
tree767c4bfbeb88e9fb44ac463963f2bd735f6d45c8 /fg21sim/extragalactic/clusters/units.py
parent912e2c8b5a37606828241e259e719bbced50989c (diff)
downloadfg21sim-93dc96a0a6a336419b2e80b221257a8a7532019a.tar.bz2
Add clusters/emission.py: Calculate synchrotron emissivity
Calculate the synchrotron emissivity from the given electron spectrum at specified frequency. Add the electron charge to units.Constants
Diffstat (limited to 'fg21sim/extragalactic/clusters/units.py')
-rw-r--r--fg21sim/extragalactic/clusters/units.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/fg21sim/extragalactic/clusters/units.py b/fg21sim/extragalactic/clusters/units.py
index 01891fa..a7e4ef5 100644
--- a/fg21sim/extragalactic/clusters/units.py
+++ b/fg21sim/extragalactic/clusters/units.py
@@ -30,10 +30,13 @@ class UnitConversions:
Hold the conversion relations directly to avoid repeated/unnecessary
calculations.
"""
+ # Mass
Msun2g = au.solMass.to(au.g)
g2Msun = au.g.to(au.solMass)
+ # Time
Gyr2s = au.Gyr.to(au.s)
s2Gyr = au.s.to(au.Gyr)
+ # Length
kpc2cm = au.kpc.to(au.cm)
cm2kpc = au.cm.to(au.kpc)
Mpc2cm = au.Mpc.to(au.cm)
@@ -43,6 +46,7 @@ class UnitConversions:
kpc2km = au.kpc.to(au.km)
km2kpc = au.km.to(au.kpc)
km2cm = au.km.to(au.cm)
+ # Energy
keV2erg = au.keV.to(au.erg)
@@ -60,6 +64,8 @@ class Constants:
u = ac.u.cgs.value # [g]
# Gravitational constant
G = ac.G.cgs.value # [cm^3/g/s^2]
+ # Electron charge
+ e = ac.e.gauss.value # [Fr] = [esu]
# Mean molecular weight
# Ref.: Ettori et al, 2013, Space Science Review, 177, 119-154, Eq.(6)