diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-10-28 21:39:18 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-10-28 21:39:18 +0800 |
commit | 0a99b0808741b6fdffcfdb8dc40c3c63f2aa7f5d (patch) | |
tree | b06df1bc58f3c9e93fd5025d7da4e68c2baac496 /fg21sim/utils | |
parent | f75f5e4e8078520fde7857fe78009e78414e93fd (diff) | |
download | fg21sim-0a99b0808741b6fdffcfdb8dc40c3c63f2aa7f5d.tar.bz2 |
utils/random.py: Add a note on conversion to (longitude, latitude)
Diffstat (limited to 'fg21sim/utils')
-rw-r--r-- | fg21sim/utils/random.py | 5 |
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] |