diff options
author | Stan Seibert <stan@mtrr.org> | 2011-09-29 19:35:48 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-09-29 19:35:48 -0400 |
commit | bcb3e951260a0ba44e9b52d0243d65f09bebadb5 (patch) | |
tree | 842dbe96c6ba0a50094df88f006e915d2937d591 | |
parent | 82d9054a3fc092cf62c4d683e33587fe822d9561 (diff) | |
download | chroma-bcb3e951260a0ba44e9b52d0243d65f09bebadb5.tar.gz chroma-bcb3e951260a0ba44e9b52d0243d65f09bebadb5.tar.bz2 chroma-bcb3e951260a0ba44e9b52d0243d65f09bebadb5.zip |
Remove MiniCLEAN
-rw-r--r-- | chroma/detectors/__init__.py | 4 | ||||
-rw-r--r-- | chroma/detectors/miniclean.py | 80 | ||||
-rw-r--r-- | chroma/detectors/miniclean_cassettes.txt | 92 | ||||
-rw-r--r-- | chroma/detectors/miniclean_polygons.txt | 3 |
4 files changed, 0 insertions, 179 deletions
diff --git a/chroma/detectors/__init__.py b/chroma/detectors/__init__.py deleted file mode 100644 index ae6c9ab..0000000 --- a/chroma/detectors/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from miniclean import build_miniclean as build_miniclean_detector - -def miniclean(): - return build_miniclean_detector() diff --git a/chroma/detectors/miniclean.py b/chroma/detectors/miniclean.py deleted file mode 100644 index 92dd019..0000000 --- a/chroma/detectors/miniclean.py +++ /dev/null @@ -1,80 +0,0 @@ -import numpy as np -import numpy.linalg -import math -from chroma.make import linear_extrude, sphere -from chroma.geometry import * -from chroma.optics import * -from chroma.transform import rotate, make_rotation_matrix -from chroma.itertoolset import grouper -import os - - -dir = os.path.split(os.path.realpath(__file__))[0] - -def read_polygons(filename): - polygons = {} - with open(filename) as f: - for line in f: - parts = line.split() - idnum = int(parts[0]) - npoints = int(parts[1]) - points = np.zeros(shape=(npoints,2), dtype=np.float32) - for i, (x,y) in enumerate(grouper(2, parts[2:])): - points[i] = [float(x), float(y)] - polygons[idnum] = points - return polygons - -def read_cassettes(filename): - cassettes = [] - with open(filename) as f: - for line in f: - parts = line.split() - cassette_type = int(parts[0]) - rotation = np.transpose(np.array(map(float, parts[1:10]), dtype=np.float32).reshape((3,3))) - displacement = np.array(map(float, parts[10:13]), dtype=np.float32) - - cassettes.append({'type' : cassette_type, 'rotation' : rotation, - 'displacement' : displacement}) - - return cassettes - -def build_miniclean(real_av=False): - geo = Geometry() - - simple_iv = sphere(0.818) - geo.add_solid(Solid(simple_iv, liquid_argon, vacuum, color=0xffFF0000)) - - polygons = read_polygons(os.path.join(dir, 'miniclean_polygons.txt')) - - height = 0.30 - polygon_types = {} - for polygon_id, polygon_points in polygons.items(): - mesh = linear_extrude(polygon_points[::-1,0]/1000.0, - polygon_points[::-1,1]/1000.0, - height=height, - center=[0,0,height/2]) - colors = np.zeros(len(mesh.triangles), dtype=np.uint32) - colors.fill(0x03CCCCFF) - # Color the faces on one end - triangles = mesh.assemble(group=True) - triangle_centroids = triangles.mean(axis=1) - face = triangle_centroids[:,2] < 0.1 - colors[face] = 0xffffff - - polygon_types[polygon_id] = (mesh, colors) - - cassettes = read_cassettes(os.path.join(dir, 'miniclean_cassettes.txt')) - - geo.pmtids = [] - geo.pmt_id_map = {} - for i, cassette in enumerate(cassettes): - polygon_mesh, polygon_colors = polygon_types[cassette['type']] - solid = Solid(polygon_mesh, liquid_argon, liquid_argon, surface=shiny_surface, - color=polygon_colors) - - chroma_id = geo.add_solid(solid, cassette['rotation'], - cassette['displacement']/1000.0) - geo.pmt_id_map[chroma_id] = i - geo.pmtids.append(chroma_id) - - return geo diff --git a/chroma/detectors/miniclean_cassettes.txt b/chroma/detectors/miniclean_cassettes.txt deleted file mode 100644 index a5e59f2..0000000 --- a/chroma/detectors/miniclean_cassettes.txt +++ /dev/null @@ -1,92 +0,0 @@ -1 1.000000 -0.000000 0.000000 0.000000 1.000000 0.000000 -0.000000 -0.000000 1.000000 0.000000 0.000000 435.000000 -1 0.361804 0.262866 -0.894427 -0.587785 0.809017 0.000000 0.723607 0.525731 0.447214 314.768956 228.692931 194.538037 -1 -0.138197 0.425326 -0.894427 -0.951057 -0.309017 0.000000 -0.276393 0.850651 0.447214 -120.230916 370.033081 194.538032 -1 -0.447214 0.000000 -0.894427 -0.000000 -1.000000 0.000000 -0.894427 0.000000 0.447214 -389.075740 0.000000 194.538090 -1 -0.138197 -0.425326 -0.894427 0.951057 -0.309017 -0.000000 -0.276393 -0.850651 0.447214 -120.230916 -370.033081 194.538032 -1 0.361804 -0.262866 -0.894427 0.587785 0.809017 -0.000000 0.723607 -0.525731 0.447214 314.768956 -228.692931 194.538037 -1 0.447214 0.000000 0.894427 0.000000 -1.000000 -0.000000 0.894427 0.000000 -0.447214 389.075740 0.000000 -194.538090 -1 0.138197 0.425326 0.894427 0.951057 -0.309017 0.000000 0.276393 0.850651 -0.447214 120.230916 370.033081 -194.538032 -1 -0.361804 0.262866 0.894427 0.587785 0.809017 -0.000000 -0.723607 0.525731 -0.447214 -314.768956 228.692931 -194.538037 -1 -0.361804 -0.262866 0.894427 -0.587785 0.809017 0.000000 -0.723607 -0.525731 -0.447214 -314.768956 -228.692931 -194.538037 -1 0.138197 -0.425326 0.894427 -0.951057 -0.309017 0.000000 0.276393 -0.850651 -0.447214 120.230916 -370.033081 -194.538032 -1 -1.000000 -0.000000 0.000000 -0.000000 1.000000 -0.000000 0.000000 -0.000000 -1.000000 0.000000 0.000000 -435.000000 -2 0.794654 -0.000000 -0.607062 0.000000 1.000000 0.000000 0.607062 -0.000000 0.794654 264.072061 0.000000 345.674625 -2 0.245561 0.755761 -0.607062 -0.951057 0.309016 0.000000 0.187592 0.577350 0.794654 81.602569 251.147409 345.674702 -2 -0.642889 0.467086 -0.607062 -0.587786 -0.809017 0.000000 -0.491123 0.356822 0.794655 -213.638636 155.217674 345.674713 -2 -0.642889 -0.467086 -0.607062 0.587786 -0.809017 0.000000 -0.491123 -0.356822 0.794655 -213.638636 -155.217674 345.674713 -2 0.245561 -0.755761 -0.607062 0.951057 0.309016 0.000000 0.187592 -0.577350 0.794654 81.602569 -251.147409 345.674702 -2 0.187592 -0.000000 -0.982247 0.000000 1.000000 -0.000000 0.982247 -0.000000 0.187592 427.277460 0.000000 81.602523 -2 0.057969 0.178411 -0.982247 -0.951056 0.309017 -0.000000 0.303531 0.934172 0.187592 132.036041 406.364992 81.602557 -2 -0.151765 0.110264 -0.982247 -0.587785 -0.809017 -0.000000 -0.794654 0.577350 0.187592 -345.674702 251.147409 81.602569 -2 -0.151765 -0.110264 -0.982247 0.587785 -0.809017 0.000000 -0.794654 -0.577350 0.187592 -345.674702 -251.147409 81.602569 -2 0.057969 -0.178411 -0.982247 0.951056 0.309017 0.000000 0.303531 -0.934172 0.187592 132.036041 -406.364992 81.602557 -2 -0.151765 -0.110264 -0.982247 -0.587785 0.809017 -0.000000 0.794654 0.577350 -0.187592 345.674702 251.147409 -81.602569 -2 0.057969 -0.178411 -0.982247 -0.951056 -0.309017 -0.000000 -0.303531 0.934172 -0.187592 -132.036041 406.364992 -81.602557 -2 0.187592 0.000000 -0.982247 -0.000000 -1.000000 -0.000000 -0.982247 0.000000 -0.187592 -427.277460 0.000000 -81.602523 -2 0.057969 0.178411 -0.982247 0.951056 -0.309017 0.000000 -0.303531 -0.934172 -0.187592 -132.036041 -406.364992 -81.602557 -2 -0.151765 0.110264 -0.982247 0.587785 0.809017 0.000000 0.794654 -0.577350 -0.187592 345.674702 -251.147409 -81.602569 -2 -0.642889 -0.467086 -0.607062 -0.587786 0.809017 0.000000 0.491123 0.356822 -0.794655 213.638636 155.217674 -345.674713 -2 0.245561 -0.755761 -0.607062 -0.951057 -0.309016 -0.000000 -0.187592 0.577350 -0.794654 -81.602569 251.147409 -345.674702 -2 0.794654 0.000000 -0.607062 -0.000000 -1.000000 -0.000000 -0.607062 0.000000 -0.794654 -264.072061 0.000000 -345.674625 -2 0.245561 0.755761 -0.607062 0.951057 -0.309016 -0.000000 -0.187592 -0.577350 -0.794654 -81.602569 -251.147409 -345.674702 -2 -0.642889 0.467086 -0.607062 0.587786 0.809017 -0.000000 0.491123 -0.356822 -0.794655 213.638636 -155.217674 -345.674713 -3 0.759856 0.552068 -0.343278 -0.587785 0.809017 0.000000 0.277718 0.201774 0.939234 120.807298 87.771665 408.566679 -3 -0.290240 0.893264 -0.343278 -0.951056 -0.309018 0.000000 -0.106079 0.326477 0.939234 -46.144352 142.017454 408.566692 -3 -0.939234 0.000000 -0.343279 -0.000000 -1.000000 0.000000 -0.343279 0.000000 0.939234 -149.326291 0.000000 408.566590 -3 -0.290240 -0.893264 -0.343278 0.951056 -0.309018 0.000000 -0.106079 -0.326477 0.939234 -46.144352 -142.017454 408.566692 -3 0.759856 -0.552068 -0.343278 0.587785 0.809017 0.000000 0.277718 -0.201774 0.939234 120.807298 -87.771665 408.566679 -3 -0.588217 -0.427365 0.686557 0.587785 -0.809017 -0.000000 0.555436 0.403548 0.727076 241.614708 175.543411 316.278111 -3 0.224679 -0.691490 0.686557 0.951056 0.309017 -0.000000 -0.212158 0.652955 0.727076 -92.288693 284.035318 316.277940 -3 0.727076 -0.000000 0.686557 0.000000 1.000000 0.000000 -0.686557 -0.000000 0.727076 -298.652292 0.000000 316.278056 -3 0.224679 0.691490 0.686557 -0.951056 0.309017 0.000000 -0.212158 -0.652955 0.727076 -92.288693 -284.035318 316.277940 -3 -0.588217 0.427365 0.686557 -0.587785 -0.809017 0.000000 0.555436 -0.403548 0.727076 241.614708 -175.543411 316.278111 -3 0.171639 -0.979432 0.106079 0.525731 -0.000000 -0.850651 0.833155 0.201774 0.514918 362.422317 87.771667 223.989282 -3 -0.878456 0.465900 0.106079 -0.162460 -0.500000 0.850651 0.449358 0.730026 0.514918 195.470612 317.561131 223.989214 -3 0.984535 -0.139422 0.106079 0.162460 0.500000 -0.850651 0.065560 0.854729 0.514918 28.518594 371.807049 223.989304 -3 -0.714555 -0.691490 0.106079 0.425325 -0.309017 0.850651 -0.555436 0.652955 0.514918 -241.614670 284.035427 223.989346 -3 0.436836 0.893264 0.106079 -0.425326 0.309017 -0.850651 -0.792636 0.326477 0.514918 -344.796720 142.017520 223.989388 -3 0.436836 -0.893264 0.106079 0.425326 0.309017 0.850651 -0.792636 -0.326477 0.514918 -344.796720 -142.017520 223.989388 -3 -0.714555 0.691490 0.106079 -0.425325 -0.309017 -0.850651 -0.555436 -0.652955 0.514918 -241.614670 -284.035427 223.989346 -3 0.984535 0.139422 0.106079 -0.162460 0.500000 0.850651 0.065560 -0.854729 0.514918 28.518594 -371.807049 223.989304 -3 -0.878456 -0.465900 0.106079 0.162460 -0.500000 -0.850651 0.449358 -0.730026 0.514918 195.470612 -317.561131 223.989214 -3 0.171639 0.979432 0.106079 -0.525731 -0.000000 0.850651 0.833155 -0.201774 0.514918 362.422317 -87.771667 223.989282 -3 0.351017 -0.427365 -0.833155 -0.262866 0.809017 -0.525731 0.898715 0.403548 0.171639 390.941108 175.543414 74.662977 -3 -0.297978 0.465899 -0.833155 -0.688191 0.500000 0.525731 0.661515 0.730026 0.171639 287.759023 317.561312 74.662963 -3 0.514918 0.201774 -0.833155 -0.850651 -0.000000 -0.525731 -0.106079 0.979432 0.171639 -46.144370 426.052975 74.662974 -3 -0.535177 -0.139423 -0.833155 -0.688191 -0.500000 0.525731 -0.489876 0.854729 0.171639 -213.096050 371.807095 74.662959 -3 -0.032780 0.552068 -0.833155 -0.262865 -0.809017 -0.525731 -0.964275 0.201774 0.171639 -419.459842 87.771736 74.663001 -3 -0.032780 -0.552068 -0.833155 0.262865 -0.809017 0.525731 -0.964275 -0.201774 0.171639 -419.459842 -87.771736 74.663001 -3 -0.535177 0.139423 -0.833155 0.688191 -0.500000 -0.525731 -0.489876 -0.854729 0.171639 -213.096050 -371.807095 74.662959 -3 0.514918 -0.201774 -0.833155 0.850651 -0.000000 0.525731 -0.106079 -0.979432 0.171639 -46.144370 -426.052975 74.662974 -3 -0.297978 -0.465899 -0.833155 0.688191 0.500000 -0.525731 0.661515 -0.730026 0.171639 287.759023 -317.561312 74.662963 -3 0.351017 0.427365 -0.833155 0.262866 0.809017 0.525731 0.898715 -0.403548 0.171639 390.941108 -175.543414 74.662977 -3 0.032780 0.552068 0.833155 0.262865 -0.809017 0.525731 0.964275 0.201774 -0.171639 419.459842 87.771736 -74.663001 -3 0.535177 -0.139423 0.833155 0.688191 -0.500000 -0.525731 0.489876 0.854729 -0.171639 213.096050 371.807095 -74.662959 -3 -0.514918 0.201774 0.833155 0.850651 -0.000000 0.525731 0.106079 0.979432 -0.171639 46.144370 426.052975 -74.662974 -3 0.297978 0.465899 0.833155 0.688191 0.500000 -0.525731 -0.661515 0.730026 -0.171639 -287.759023 317.561312 -74.662963 -3 -0.351017 -0.427365 0.833155 0.262866 0.809017 0.525731 -0.898715 0.403548 -0.171639 -390.941108 175.543414 -74.662977 -3 -0.351017 0.427365 0.833155 -0.262866 0.809017 -0.525731 -0.898715 -0.403548 -0.171639 -390.941108 -175.543414 -74.662977 -3 0.297978 -0.465899 0.833155 -0.688191 0.500000 0.525731 -0.661515 -0.730026 -0.171639 -287.759023 -317.561312 -74.662963 -3 -0.514918 -0.201774 0.833155 -0.850651 -0.000000 -0.525731 0.106079 -0.979432 -0.171639 46.144370 -426.052975 -74.662974 -3 0.535177 0.139423 0.833155 -0.688191 -0.500000 0.525731 0.489876 -0.854729 -0.171639 213.096050 -371.807095 -74.662959 -3 0.032780 -0.552068 0.833155 -0.262865 -0.809017 -0.525731 0.964275 -0.201774 -0.171639 419.459842 -87.771736 -74.663001 -3 -0.436836 0.893264 -0.106079 0.425326 0.309017 0.850651 0.792636 0.326477 -0.514918 344.796720 142.017520 -223.989388 -3 0.714555 -0.691490 -0.106079 -0.425325 -0.309017 -0.850651 0.555436 0.652955 -0.514918 241.614670 284.035427 -223.989346 -3 -0.984535 -0.139422 -0.106079 -0.162460 0.500000 0.850651 -0.065560 0.854729 -0.514918 -28.518594 371.807049 -223.989304 -3 0.878456 0.465900 -0.106079 0.162460 -0.500000 -0.850651 -0.449358 0.730026 -0.514918 -195.470612 317.561131 -223.989214 -3 -0.171639 -0.979432 -0.106079 -0.525731 -0.000000 0.850651 -0.833155 0.201774 -0.514918 -362.422317 87.771667 -223.989282 -3 -0.171639 0.979432 -0.106079 0.525731 -0.000000 -0.850651 -0.833155 -0.201774 -0.514918 -362.422317 -87.771667 -223.989282 -3 0.878456 -0.465900 -0.106079 -0.162460 -0.500000 0.850651 -0.449358 -0.730026 -0.514918 -195.470612 -317.561131 -223.989214 -3 -0.984535 0.139422 -0.106079 0.162460 0.500000 -0.850651 -0.065560 -0.854729 -0.514918 -28.518594 -371.807049 -223.989304 -3 0.714555 0.691490 -0.106079 0.425325 -0.309017 0.850651 0.555436 -0.652955 -0.514918 241.614670 -284.035427 -223.989346 -3 -0.436836 -0.893264 -0.106079 -0.425326 0.309017 -0.850651 0.792636 -0.326477 -0.514918 344.796720 -142.017520 -223.989388 -3 -0.727076 0.000000 -0.686557 0.000000 1.000000 -0.000000 0.686557 -0.000000 -0.727076 298.652292 0.000000 -316.278056 -3 -0.224679 -0.691490 -0.686557 -0.951056 0.309017 -0.000000 0.212158 0.652955 -0.727076 92.288693 284.035318 -316.277940 -3 0.588217 -0.427365 -0.686557 -0.587785 -0.809017 -0.000000 -0.555436 0.403548 -0.727076 -241.614708 175.543411 -316.278111 -3 0.588217 0.427365 -0.686557 0.587785 -0.809017 -0.000000 -0.555436 -0.403548 -0.727076 -241.614708 -175.543411 -316.278111 -3 -0.224679 0.691490 -0.686557 0.951056 0.309017 -0.000000 0.212158 -0.652955 -0.727076 92.288693 -284.035318 -316.277940 -3 0.939234 0.000000 0.343279 0.000000 -1.000000 -0.000000 0.343279 0.000000 -0.939234 149.326291 0.000000 -408.566590 -3 0.290240 0.893264 0.343278 0.951056 -0.309018 -0.000000 0.106079 0.326477 -0.939234 46.144352 142.017454 -408.566692 -3 -0.759856 0.552068 0.343278 0.587785 0.809017 -0.000000 -0.277718 0.201774 -0.939234 -120.807298 87.771665 -408.566679 -3 -0.759856 -0.552068 0.343278 -0.587785 0.809017 -0.000000 -0.277718 -0.201774 -0.939234 -120.807298 -87.771665 -408.566679 -3 0.290240 -0.893264 0.343278 -0.951056 -0.309018 -0.000000 0.106079 -0.326477 -0.939234 46.144352 -142.017454 -408.566692 diff --git a/chroma/detectors/miniclean_polygons.txt b/chroma/detectors/miniclean_polygons.txt deleted file mode 100644 index 594ed7d..0000000 --- a/chroma/detectors/miniclean_polygons.txt +++ /dev/null @@ -1,3 +0,0 @@ -1 5 -66.925194 48.624001 25.563150 78.675285 82.724091 0.000000 25.563150 -78.675285 -66.925194 -48.624001 -3 6 -84.296997 48.624001 1.690830 107.301506 87.678658 61.878311 87.678658 -61.878311 1.690830 -107.301506 -84.296997 -48.624001 -2 6 -97.248001 0.000000 -48.624001 84.219238 48.624001 84.219238 97.248001 0.000000 48.624001 -84.219238 -48.624001 -84.219238 |