aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-10-28 21:39:18 +0800
committerAaron LI <aaronly.me@outlook.com>2016-10-28 21:39:18 +0800
commit0a99b0808741b6fdffcfdb8dc40c3c63f2aa7f5d (patch)
treeb06df1bc58f3c9e93fd5025d7da4e68c2baac496 /fg21sim
parentf75f5e4e8078520fde7857fe78009e78414e93fd (diff)
downloadfg21sim-0a99b0808741b6fdffcfdb8dc40c3c63f2aa7f5d.tar.bz2
utils/random.py: Add a note on conversion to (longitude, latitude)
Diffstat (limited to 'fg21sim')
-rw-r--r--fg21sim/utils/random.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/fg21sim/utils/random.py b/fg21sim/utils/random.py
index d825101..6d835f8 100644
--- a/fg21sim/utils/random.py
+++ b/fg21sim/utils/random.py
@@ -34,6 +34,11 @@ def spherical_uniform(n=1):
However, this convention is *different* to the convention generally
used by mathematicians.
+ The following relation can be used to convert the generated (theta, phi)
+ to the Galactic longitude and latitude convention:
+ glon = np.rad2deg(phi)
+ glat = 90.0 - np.rad2deg(theta)
+
References
----------
.. [SpherePointPicking]