diff options
author | Aaron LI <aly@aaronly.me> | 2017-07-22 21:54:07 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-07-22 21:54:07 +0800 |
commit | 7459867f5fef8cf8ac02619ef3761e7a3d1cf3b1 (patch) | |
tree | b59b1eaffa0536b229869bed295b6bb8c4bd17b3 /fg21sim/utils | |
parent | cb4cd8cc3d244d13b15f5cf8fb0a1d65746b11cc (diff) | |
download | fg21sim-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')
-rw-r--r-- | fg21sim/utils/units.py | 6 |
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: |