diff options
author | Stan Seibert <stan@mtrr.org> | 2011-09-10 15:01:35 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-09-10 15:01:35 -0400 |
commit | 655c354c9fc0dce41c158570ee7f1ec7df337922 (patch) | |
tree | 0f42a3bcf2e69d3f20cc908241ea416c99a7bf00 /event.py | |
parent | cb07b863464ad85cf4f18a2e97764db5c3bcc766 (diff) | |
download | chroma-655c354c9fc0dce41c158570ee7f1ec7df337922.tar.gz chroma-655c354c9fc0dce41c158570ee7f1ec7df337922.tar.bz2 chroma-655c354c9fc0dce41c158570ee7f1ec7df337922.zip |
Implement len() for event.Photons class.
Diffstat (limited to 'event.py')
-rw-r--r-- | event.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -42,6 +42,9 @@ class Photons(object): flags = np.concatenate((self.flags, other.flags)) return Photons(pos, dir, pol, wavelengths, t, last_hit_triangles, flags) + def __len__(self): + return len(self.pos) + class Channels(object): def __init__(self, hit, t, q, flags=None): self.hit = hit |