diff options
-rw-r--r-- | chroma/__init__.py | 1 | ||||
-rw-r--r-- | chroma/camera.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/chroma/__init__.py b/chroma/__init__.py index c3f4243..b409871 100644 --- a/chroma/__init__.py +++ b/chroma/__init__.py @@ -4,7 +4,6 @@ except ImportError: pass # Allow chroma usage when pygame not present from chroma import geometry from chroma import event -from chroma.io import root from chroma import generator from chroma.generator import constant_particle_gun from chroma import gpu diff --git a/chroma/camera.py b/chroma/camera.py index 4929519..09463d1 100644 --- a/chroma/camera.py +++ b/chroma/camera.py @@ -17,7 +17,6 @@ from chroma.geometry import Mesh, Solid, Geometry, vacuum from chroma.transform import rotate, make_rotation_matrix from chroma.sample import uniform_sphere from chroma.project import from_film -from chroma.io.root import RootReader from chroma import make from chroma import gpu @@ -686,6 +685,9 @@ class EventViewer(Camera): def __init__(self, geometry, filename, **kwargs): Camera.__init__(self, geometry, **kwargs) + # This is really slow, so we do it here in the constructor to + # avoid slowing down the import of this module + from chroma.io.root import RootReader self.rr = RootReader(filename) self.display_mode = EventViewer.CHARGE self.sum_mode = False |