From af1ba15919bbc4534980b31d896e173673370aaa Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Wed, 5 Oct 2011 12:29:25 -0400 Subject: Add tlatorre/histogram as a subrepository so that we can use it in the Rayleigh scattering unit test --- test/test_rayleigh.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/test_rayleigh.py') diff --git a/test/test_rayleigh.py b/test/test_rayleigh.py index cfb0441..487184f 100644 --- a/test/test_rayleigh.py +++ b/test/test_rayleigh.py @@ -6,11 +6,11 @@ from chroma.make import box from chroma.sim import Simulation from chroma.demo.optics import water from chroma.event import Photons -import histogram -from histogram.root import rootify -import ROOT +from chroma.rootimport import ROOT ROOT.gROOT.SetBatch(1) +from chroma.histogram import Histogram, rootify + class TestRayleigh(unittest.TestCase): def setUp(self): self.cube = Geometry(water) @@ -44,7 +44,7 @@ class TestRayleigh(unittest.TestCase): rayleigh_scatters = (photons_end.flags & (1 << 4)) > 0 cos_scatter = (self.photons.dir[rayleigh_scatters] * photons_end.dir[rayleigh_scatters]).sum(axis=1) theta_scatter = np.arccos(cos_scatter) - h = histogram.Histogram(bins=100, range=(0, np.pi)) + h = Histogram(bins=100, range=(0, np.pi)) h.fill(theta_scatter) h = rootify(h) -- cgit