summaryrefslogtreecommitdiff
path: root/photon.py
diff options
context:
space:
mode:
authorAnthony LaTorre <telatorre@gmail.com>2011-05-18 11:29:26 -0400
committerAnthony LaTorre <telatorre@gmail.com>2011-05-18 11:29:26 -0400
commit9306f888fea903accf827870a122a2f6f76e472e (patch)
tree0fc29e94d8e2e35f04f4d3392326f205403a7fcb /photon.py
parent909309302c83423994e9c1dd36a3309890a67b90 (diff)
downloadchroma-9306f888fea903accf827870a122a2f6f76e472e.tar.gz
chroma-9306f888fea903accf827870a122a2f6f76e472e.tar.bz2
chroma-9306f888fea903accf827870a122a2f6f76e472e.zip
added some more documentation and a more accurate miniature version of lbne
Diffstat (limited to 'photon.py')
-rw-r--r--photon.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/photon.py b/photon.py
index b58a97b..d1574ea 100644
--- a/photon.py
+++ b/photon.py
@@ -17,14 +17,11 @@ def uniform_sphere(size=None):
c = np.sqrt(1-u**2)
- x = c*np.cos(theta)
- y = c*np.sin(theta)
- z = u
-
points = np.empty((x.size, 3))
- points[:,0] = x
- points[:,1] = y
- points[:,2] = z
+
+ points[:,0] = c*np.cos(theta)
+ points[:,1] = c*np.sin(theta)
+ points[:,2] = u
if size is None:
return points[0]