diff options
author | Stan Seibert <stan@mtrr.org> | 2011-11-18 14:44:04 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2021-05-09 08:42:38 -0700 |
commit | 50d52ae4810e4bd180703ac770b9d49d8bd7dffe (patch) | |
tree | b46ccb4995978d966eefc134bc2d17596c3a67d1 | |
parent | 4809f1e7dde999e0f714aedcface9d5e7cbd179c (diff) | |
download | chroma-50d52ae4810e4bd180703ac770b9d49d8bd7dffe.tar.gz chroma-50d52ae4810e4bd180703ac770b9d49d8bd7dffe.tar.bz2 chroma-50d52ae4810e4bd180703ac770b9d49d8bd7dffe.zip |
Docstring for chroma.event.Photons
-rw-r--r-- | chroma/event.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/chroma/event.py b/chroma/event.py index 5f7c4c7..a8f5f52 100644 --- a/chroma/event.py +++ b/chroma/event.py @@ -21,6 +21,31 @@ class Vertex(object): class Photons(object): def __init__(self, pos, dir, pol, wavelengths, t=None, last_hit_triangles=None, flags=None): + '''Create a new list of n photons. + + pos: numpy.ndarray(dtype=numpy.float32, shape=(n,3)) + Position 3-vectors (mm) + + dir: numpy.ndarray(dtype=numpy.float32, shape=(n,3)) + Direction 3-vectors (normalized) + + pol: numpy.ndarray(dtype=numpy.float32, shape=(n,3)) + Polarization direction 3-vectors (normalized) + + wavelengths: numpy.ndarray(dtype=numpy.float32, shape=n) + Photon wavelengths (nm) + + t: numpy.ndarray(dtype=numpy.float32, shape=n) + Photon times (ns) + + last_hit_triangles: numpy.ndarray(dtype=numpy.int32, shape=n) + ID number of last intersected triangle. -1 if no triangle hit in last step + If set to None, a default array filled with -1 is created + + flags: numpy.ndarray(dtype=numpy.uint32, shape=n) + Bit-field indicating the physics interaction history of the photon. See + history bit constants in chroma.event for definition. + ''' self.pos = pos self.dir = dir self.pol = pol |