diff options
| author | Stan Seibert <stan@mtrr.org> | 2011-07-27 16:23:27 -0400 | 
|---|---|---|
| committer | Stan Seibert <stan@mtrr.org> | 2011-07-27 16:23:27 -0400 | 
| commit | a5193f9b6b3267ef1a3b436cdffe2dc0d3615adc (patch) | |
| tree | 3b1d624734714d3db3e6707d8088d6ba95962da0 /solids/pmts.py | |
| parent | b94392f8ed2ce7bf364d0549bcda8e632d56de05 (diff) | |
| download | chroma-a5193f9b6b3267ef1a3b436cdffe2dc0d3615adc.tar.gz chroma-a5193f9b6b3267ef1a3b436cdffe2dc0d3615adc.tar.bz2 chroma-a5193f9b6b3267ef1a3b436cdffe2dc0d3615adc.zip | |
Use the more realistic SNO database and add PMT concentrators.
Diffstat (limited to 'solids/pmts.py')
| -rw-r--r-- | solids/pmts.py | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/solids/pmts.py b/solids/pmts.py index 6b10522..377024d 100644 --- a/solids/pmts.py +++ b/solids/pmts.py @@ -64,3 +64,14 @@ def build_pmt(filename, glass_thickness, outer_material=water, theta=np.pi/8):      pmt.theta = theta      return pmt + +def build_light_collector_from_file(filename, outer_material, theta=np.pi/24): +    profile = read_csv(filename) +     +    # Convert mm to m +    profile /= 1000.0 + +    mesh = rotate_extrude(profile[:,0], profile[:,1], theta) +    solid = Solid(mesh, outer_material, outer_material, color=0xFF0000, +                  surface=shiny_surface) +    return solid | 
