aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-09-26 10:54:53 +0800
committerAaron LI <aly@aaronly.me>2017-09-26 10:54:53 +0800
commit280f767d850322190e72550cefdfcdee405c195e (patch)
tree967aff4eb76b7399260ff70f0588d389af1190e7
parent77ad5739e805e08a792ca747dcbe2712249c81b0 (diff)
downloadfg21sim-280f767d850322190e72550cefdfcdee405c195e.tar.bz2
utils/units.py: Add eV and keV to temperature conversions
-rw-r--r--fg21sim/utils/units.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/fg21sim/utils/units.py b/fg21sim/utils/units.py
index a6d7034..0389715 100644
--- a/fg21sim/utils/units.py
+++ b/fg21sim/utils/units.py
@@ -67,6 +67,9 @@ class UnitConversions:
deg2arcsec = au.deg.to(au.arcsec)
arcmin2arcsec = au.arcmin.to(au.arcsec)
arcsec2arcmin = au.arcsec.to(au.arcmin)
+ # Temperature
+ eV2K = au.eV.to(ac.k_B*au.K)
+ keV2K = au.keV.to(ac.k_B*au.K)
class Constants: