From e13031902dd5a891e5eb4fba199298a57d3b115b Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sat, 29 Jul 2017 23:50:24 +0800 Subject: utils/units.py: Add several units conversions Signed-off-by: Aaron LI --- fg21sim/utils/units.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fg21sim/utils') diff --git a/fg21sim/utils/units.py b/fg21sim/utils/units.py index 3230225..e65f831 100644 --- a/fg21sim/utils/units.py +++ b/fg21sim/utils/units.py @@ -41,6 +41,10 @@ class UnitConversions: Gyr2s = au.Gyr.to(au.s) s2Gyr = au.s.to(au.Gyr) # Length + kpc2m = au.kpc.to(au.m) + m2kpc = au.m.to(au.kpc) + Mpc2m = au.Mpc.to(au.m) + m2Mpc = au.m.to(au.Mpc) kpc2cm = au.kpc.to(au.cm) cm2kpc = au.cm.to(au.kpc) Mpc2cm = au.Mpc.to(au.cm) -- cgit v1.2.2