aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/utils/units.py
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-07-22 21:54:07 +0800
committerAaron LI <aly@aaronly.me>2017-07-22 21:54:07 +0800
commit7459867f5fef8cf8ac02619ef3761e7a3d1cf3b1 (patch)
treeb59b1eaffa0536b229869bed295b6bb8c4bd17b3 /fg21sim/utils/units.py
parentcb4cd8cc3d244d13b15f5cf8fb0a1d65746b11cc (diff)
downloadfg21sim-7459867f5fef8cf8ac02619ef3761e7a3d1cf3b1.tar.bz2
utils/units.py: Add "mec2" energy of a still electron
Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'fg21sim/utils/units.py')
-rw-r--r--fg21sim/utils/units.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/fg21sim/utils/units.py b/fg21sim/utils/units.py
index bb8f670..3230225 100644
--- a/fg21sim/utils/units.py
+++ b/fg21sim/utils/units.py
@@ -20,7 +20,11 @@ class Units:
Commonly used units, especially in the CGS unit system.
"""
# Unit for electron momentum (p), thus its value is the Lorentz factor
- mec = ac.m_e.cgs.value*ac.c.cgs.value # [g cm / s]
+ # Unit: [g cm / s]
+ mec = ac.m_e.cgs.value*ac.c.cgs.value
+ # Energy of a still electron
+ # Unit: [erg]
+ mec2 = (ac.m_e * ac.c**2).to(au.erg).value
class UnitConversions: