aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/utils
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-10-04 13:37:23 +0800
committerAaron LI <aly@aaronly.me>2017-10-04 13:37:23 +0800
commit3f100476ab746c27b3fded3b9237f78d84e9b9c0 (patch)
tree6bd1ebeef2b332dd65d9aea9dfc48448d2b1f6f9 /fg21sim/utils
parenta21fa84337356aeba294e00bbf63d19552d65553 (diff)
downloadfg21sim-3f100476ab746c27b3fded3b9237f78d84e9b9c0.tar.bz2
utils/units.py: Add "K2eV" and "K2keV"
Diffstat (limited to 'fg21sim/utils')
-rw-r--r--fg21sim/utils/units.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/fg21sim/utils/units.py b/fg21sim/utils/units.py
index 0389715..b83bd02 100644
--- a/fg21sim/utils/units.py
+++ b/fg21sim/utils/units.py
@@ -69,7 +69,9 @@ class UnitConversions:
arcsec2arcmin = au.arcsec.to(au.arcmin)
# Temperature
eV2K = au.eV.to(ac.k_B*au.K)
+ K2eV = 1 / eV2K
keV2K = au.keV.to(ac.k_B*au.K)
+ K2keV = 1 / keV2K
class Constants: