summaryrefslogtreecommitdiff
path: root/solids/__init__.py
diff options
context:
space:
mode:
authorAnthony LaTorre <tlatorre9@gmail.com>2011-08-16 17:07:52 -0400
committerAnthony LaTorre <tlatorre9@gmail.com>2011-08-16 17:07:52 -0400
commit54d7d1efe215337d121813e27cd4909b9a76e912 (patch)
tree7865db28adf2f9328fb9dcbbca8f8f125ecad40c /solids/__init__.py
parentfd2e841c4c40f9e46258ac8d11c32c2204cddd5b (diff)
downloadchroma-54d7d1efe215337d121813e27cd4909b9a76e912.tar.gz
chroma-54d7d1efe215337d121813e27cd4909b9a76e912.tar.bz2
chroma-54d7d1efe215337d121813e27cd4909b9a76e912.zip
add linear_extrude() function to make.py. rotate_extrude() now takes the number of rotational steps to extrude instead of the angle step size. updated documention in make.py.
Diffstat (limited to 'solids/__init__.py')
-rw-r--r--solids/__init__.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/solids/__init__.py b/solids/__init__.py
index 46f3119..a24ce9c 100644
--- a/solids/__init__.py
+++ b/solids/__init__.py
@@ -12,11 +12,11 @@ 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)
+def build_12inch_pmt(outer_material=water, nsteps=16):
+ return build_pmt(dir + '/hamamatsu_12inch.txt', 0.003, outer_material, nsteps)
@buildable('12inch_pmt_shell')
-def build_12inch_pmt_shell(outer_material=water, theta=np.pi/8):
+def build_12inch_pmt_shell(outer_material=water, nsteps=16):
return build_pmt_shell(dir + '/hamamatsu_12inch.txt')
# from Jelena Maricic
@@ -27,22 +27,22 @@ 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)
+def build_12inch_pmt_with_lc(outer_material=water, nsteps=16):
+ pmt = build_12inch_pmt(outer_material, nsteps)
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)
@buildable('12inch_pmt_with_lc_hd')
-def build_12inch_pmt_with_lc_hd(outer_material=water, theta=np.pi/64):
- pmt = build_12inch_pmt(outer_material, theta)
+def build_12inch_pmt_with_lc_hd(outer_material=water, nsteps=128):
+ pmt = build_12inch_pmt(outer_material, nsteps)
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, npoints=100)
@buildable('8inch_pmt')
-def build_8inch_pmt(outer_material=water, theta=np.pi/12):
- return build_pmt(dir + '/sno_pmt_reduced.txt', 0.003, outer_material, theta)
+def build_8inch_pmt(outer_material=water, nsteps=24):
+ return build_pmt(dir + '/sno_pmt_reduced.txt', 0.003, outer_material, nsteps)
@buildable('8inch_pmt_with_lc')
-def build_8inch_pmt_with_lc(outer_material=water, theta=np.pi/12):
- pmt = build_8inch_pmt(outer_material, theta)
- lc = build_light_collector_from_file(dir + '/sno_cone.txt', outer_material, theta)
+def build_8inch_pmt_with_lc(outer_material=water, nsteps=24):
+ pmt = build_8inch_pmt(outer_material, nsteps)
+ lc = build_light_collector_from_file(dir + '/sno_cone.txt', outer_material, nsteps)
return pmt + lc