diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-07-26 21:10:10 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-07-26 21:10:10 -0400 |
commit | 8eec1bd5fd39b3991f660726cf41dc899347a81f (patch) | |
tree | 8a3b02ac284c42c18e008e1313a3f2094fcfb2ed /optics.py | |
parent | 0716c8af5be04ea1709ca178d5341e5ee3df607b (diff) | |
download | chroma-8eec1bd5fd39b3991f660726cf41dc899347a81f.tar.gz chroma-8eec1bd5fd39b3991f660726cf41dc899347a81f.tar.bz2 chroma-8eec1bd5fd39b3991f660726cf41dc899347a81f.zip |
added a camera class which is able to render using the simple ray tracer or the hybrid monte carlo ray tracer in a separate thread. the camera object is initialized by passing a pycuda.driver.Context object and a threading.Lock object; you can then run kernels and copy arrays to and from the device in the same context as that used by the camera by acquiring the lock, calling context.push(), executing the kernel and/or copying arrays, calling context.pop(), and then releasing the lock. fixed mistakes in both build_rgb_lookup() and render() where I had accidently switched the green and blue photons. updated the lbne geometry with the latest specifications. added profiles for the sno pmt and concentrator.
Diffstat (limited to 'optics.py')
-rw-r--r-- | optics.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -42,9 +42,10 @@ r7081hqe_photocathode.detect = \ (710.0, 0.00)]) # convert percent -> fraction r7081hqe_photocathode.detect[:,1] /= 100.0 -# photons not detected are absorbed -#r7081hqe_photocathode.set('absorb', 1.0 - r7081hqe_photocathode.detect[:,1], wavelengths=r7081hqe_photocathode.detect[:,0]) -r7081hqe_photocathode.set('reflect_diffuse', 1.0 - r7081hqe_photocathode.detect[:,1], wavelengths=r7081hqe_photocathode.detect[:,0]) +# roughly the same amount of detected photons are absorbed without detection +r7081hqe_photocathode.absorb = r7081hqe_photocathode.detect +# remaining photons are diffusely reflected +r7081hqe_photocathode.set('reflect_diffuse', 1.0 - r7081hqe_photocathode.detect[:,1] - r7081hqe_photocathode.absorb[:,1], wavelengths=r7081hqe_photocathode.detect[:,0]) # water data comes from 'lightwater_sno' material in the SNO+ optics database water = Material('water') |