diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-09-06 17:18:14 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-09-06 17:18:14 -0400 |
commit | 86cb5f26029b3357727b88fee3fa7dd799a8d6c8 (patch) | |
tree | fc915556ef813cf4ad59edeb7b59fee0e3244c34 /tests/test_propagation.py | |
parent | 3d3140071713e523516793258e3c904ca162d7b7 (diff) | |
download | chroma-86cb5f26029b3357727b88fee3fa7dd799a8d6c8.tar.gz chroma-86cb5f26029b3357727b88fee3fa7dd799a8d6c8.tar.bz2 chroma-86cb5f26029b3357727b88fee3fa7dd799a8d6c8.zip |
geometry on the GPU is now a struct created in the GPUGeometry class. coding style for cuda code is now compliant with python PEP 7 -- Style Guide for C Code.
Diffstat (limited to 'tests/test_propagation.py')
-rw-r--r-- | tests/test_propagation.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/test_propagation.py b/tests/test_propagation.py index bf886bd..8f9d084 100644 --- a/tests/test_propagation.py +++ b/tests/test_propagation.py @@ -34,10 +34,12 @@ class TestPropagation(unittest.TestCase): wavelengths = np.empty(nphotons, np.float32) wavelengths.fill(400.0) - photons = Photons(pos=pos, dir=dir, pol=pol, t=t, wavelengths=wavelengths) + photons = Photons(pos=pos, dir=dir, pol=pol, t=t, + wavelengths=wavelengths) # First make one step to check for strangeness - photons_end = sim.simulate([photons], keep_photons_end=True, max_steps=1).next().photons_end + photons_end = sim.simulate([photons], keep_photons_end=True, + max_steps=1).next().photons_end self.assertFalse(np.isnan(photons_end.pos).any()) self.assertFalse(np.isnan(photons_end.dir).any()) @@ -46,8 +48,10 @@ class TestPropagation(unittest.TestCase): self.assertFalse(np.isnan(photons_end.wavelengths).any()) # Now let it run the usual ten steps - photons_end = sim.simulate([photons], keep_photons_end=True, max_steps=10).next().photons_end + photons_end = sim.simulate([photons], keep_photons_end=True, + max_steps=10).next().photons_end aborted = (photons_end.flags & (1 << 31)) > 0 - print 'aborted photons: %1.1f' % (float(np.count_nonzero(aborted)) / nphotons) + print 'aborted photons: %1.1f' % \ + (float(np.count_nonzero(aborted)) / nphotons) self.assertFalse(aborted.any()) |