aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/utils/units.py
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-07-29 23:50:24 +0800
committerAaron LI <aly@aaronly.me>2017-07-29 23:50:24 +0800
commite13031902dd5a891e5eb4fba199298a57d3b115b (patch)
treee666b22da76d24eb78c4707b14009d8406bc498b /fg21sim/utils/units.py
parent7072f20adaf4ceeb9152e956fedd17277e356969 (diff)
downloadfg21sim-e13031902dd5a891e5eb4fba199298a57d3b115b.tar.bz2
utils/units.py: Add several units conversions
Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'fg21sim/utils/units.py')
-rw-r--r--fg21sim/utils/units.py4
1 files changed, 4 insertions, 0 deletions
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)