From 7459867f5fef8cf8ac02619ef3761e7a3d1cf3b1 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 22 Jul 2017 21:54:07 +0800 Subject: utils/units.py: Add "mec2" energy of a still electron Signed-off-by: Aaron LI --- fg21sim/utils/units.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fg21sim/utils') 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: -- cgit v1.2.2