aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-02-21 22:25:44 +0800
committerAaron LI <aly@aaronly.me>2019-02-21 22:25:44 +0800
commitadab9d6a380d51bd5dafe6fa32d3ef8661de4458 (patch)
tree6638447ee6c3e177b36999281e3f991dec95df57
parentf44881c14f6bcf972da019f7c19d87faa84c4f80 (diff)
downloadfg21sim-adab9d6a380d51bd5dafe6fa32d3ef8661de4458.tar.bz2
utils/unit: Minor cleanups
-rw-r--r--fg21sim/utils/units.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/fg21sim/utils/units.py b/fg21sim/utils/units.py
index 401b1e8..0a5d037 100644
--- a/fg21sim/utils/units.py
+++ b/fg21sim/utils/units.py
@@ -1,14 +1,18 @@
-# Copyright (c) 2017 Weitian LI <weitian@aaronly.me>
-# MIT license
+# Copyright (c) 2017,2019 Weitian LI <wt@liwt.net>
+# MIT License
"""
-Commonly used units and their conversions relations, as well as constants.
+Commonly used units, conversion relations, as well as some constants.
Astropy's units system is very powerful, but also very slow,
and may even be the speed bottleneck of the program.
-This module provides commonly used units conversions by holding
-them directly in a class, thus avoid repeated/unnecessary calculations.
+This module provides the commonly used unit conversions by holding
+them directly in a class, avoiding repeated/unnecessary calculations.
+
+.. [ettori2013]
+ Ettori et al. 2013, Space Science Review, 177, 119-154
+ http://adsabs.harvard.edu/abs/2013SSRv..177..119E
"""
import astropy.units as au
@@ -100,7 +104,7 @@ class Constants:
k_B = ac.k_B.cgs.value # [erg/K]
# Mean molecular weight
- # Ref.: Ettori et al, 2013, Space Science Review, 177, 119-154, Eq.(6)
+ # Reference: [ettori2013],Eq.(6)
mu = 0.6
# Adiabatic index of ideal monatomic gas