From 0a99b0808741b6fdffcfdb8dc40c3c63f2aa7f5d Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Fri, 28 Oct 2016 21:39:18 +0800 Subject: utils/random.py: Add a note on conversion to (longitude, latitude) --- fg21sim/utils/random.py | 5 +++++ 1 file changed, 5 insertions(+) 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] -- cgit v1.2.2