diff options
author | Stan Seibert <stan@mtrr.org> | 2011-09-08 11:38:18 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-09-08 11:38:18 -0400 |
commit | 3defeae5de899b315928f1b518fe2ff75662d430 (patch) | |
tree | eefd3114a10284db2eaec4d2b6358ba1c97bb965 /tests/test_propagation.py | |
parent | 7cae8c3b343d1bde0320ff2ea224cc1ef79889df (diff) | |
parent | c7c161179a0a26dc9b4e3acdbc61a48803fa00e7 (diff) | |
download | chroma-3defeae5de899b315928f1b518fe2ff75662d430.tar.gz chroma-3defeae5de899b315928f1b518fe2ff75662d430.tar.bz2 chroma-3defeae5de899b315928f1b518fe2ff75662d430.zip |
merge
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()) |