From 8eec1bd5fd39b3991f660726cf41dc899347a81f Mon Sep 17 00:00:00 2001 From: Anthony LaTorre Date: Tue, 26 Jul 2011 21:10:10 -0400 Subject: 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. --- optics.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'optics.py') diff --git a/optics.py b/optics.py index 671d561..91f60cc 100644 --- a/optics.py +++ b/optics.py @@ -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') -- cgit