From adab9d6a380d51bd5dafe6fa32d3ef8661de4458 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 21 Feb 2019 22:25:44 +0800 Subject: utils/unit: Minor cleanups --- fg21sim/utils/units.py | 16 ++++++++++------ 1 file 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 -# MIT license +# Copyright (c) 2017,2019 Weitian LI +# 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 -- cgit v1.2.2