summaryrefslogtreecommitdiff
path: root/solids/__init__.py
diff options
context:
space:
mode:
authorAnthony LaTorre <tlatorre9@gmail.com>2011-07-20 17:48:32 -0400
committerAnthony LaTorre <tlatorre9@gmail.com>2011-07-20 17:48:32 -0400
commit46011a8e4ffa31f4b057b20b84e5b45b447902b7 (patch)
treecde666bfb4b568c74923dff4a1de99505ff89ed1 /solids/__init__.py
parentf5a328b72ebb643b51cae41a991c934da712f0e5 (diff)
downloadchroma-46011a8e4ffa31f4b057b20b84e5b45b447902b7.tar.gz
chroma-46011a8e4ffa31f4b057b20b84e5b45b447902b7.tar.bz2
chroma-46011a8e4ffa31f4b057b20b84e5b45b447902b7.zip
pulled a lot of the photon propagation code out of src/kernel.cu into src/photon.h so that photon propagation by propagate() in kernel.cu and the hybrid monte carlo ray tracing use the same code. instead of a single state, photons now carry the history of the processes they've undergone. this history is stored as a bitmask; see src/photon.h. start_node and first_node of the mesh are now stored as global variables in mesh.h instead of being passed to kernel functions.
Diffstat (limited to 'solids/__init__.py')
-rw-r--r--solids/__init__.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/solids/__init__.py b/solids/__init__.py
new file mode 100644
index 0000000..b6df2f3
--- /dev/null
+++ b/solids/__init__.py
@@ -0,0 +1,29 @@
+import numpy as np
+
+from pmts import build_pmt, build_light_collector
+
+import os
+import sys
+
+dir = os.path.split(os.path.realpath(__file__))[0]
+sys.path.append(dir + '/..')
+
+from optics import *
+from view import buildable
+
+@buildable('12inch_pmt')
+def build_12inch_pmt(outer_material=water, theta=np.pi/8):
+ return build_pmt(dir + '/hamamatsu_12inch.txt', 0.003, outer_material, theta)
+
+# from Jelena Maricic
+lc_12inch_a = 0.16597
+lc_12inch_b = 0.584525
+lc_12inch_d = 0.09548
+lc_12inch_rmin = 0.1524
+lc_12inch_rmax = 0.235072
+
+@buildable('12inch_pmt_with_lc')
+def build_12inch_pmt_with_lc(outer_material=water, theta=np.pi/8):
+ pmt = build_12inch_pmt(outer_material, theta)
+ return pmt + build_light_collector(pmt, a=lc_12inch_a, b=lc_12inch_b, d=lc_12inch_d, rmin=lc_12inch_rmin, rmax=lc_12inch_rmax)
+