diff options
author | Stan Seibert <stan@mtrr.org> | 2011-08-17 14:38:45 -0400 |
---|---|---|
committer | Stan Seibert <stan@mtrr.org> | 2011-08-17 14:38:45 -0400 |
commit | b88e37c5c7de5411fb003a3c146a1b697b5813ad (patch) | |
tree | ce6b6bc992a901da7e83097bfe22d2b1f3ced09f /solids/__init__.py | |
parent | ee07d0165f86ef6942bffd6ae88057926ab4e775 (diff) | |
parent | 11210ce25a543875eb51cff8efc06e7f02984214 (diff) | |
download | chroma-b88e37c5c7de5411fb003a3c146a1b697b5813ad.tar.gz chroma-b88e37c5c7de5411fb003a3c146a1b697b5813ad.tar.bz2 chroma-b88e37c5c7de5411fb003a3c146a1b697b5813ad.zip |
merge
Diffstat (limited to 'solids/__init__.py')
-rw-r--r-- | solids/__init__.py | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/solids/__init__.py b/solids/__init__.py index a24ce9c..421b66f 100644 --- a/solids/__init__.py +++ b/solids/__init__.py @@ -1,23 +1,16 @@ import numpy as np - from pmts import build_pmt, build_light_collector, build_light_collector_from_file, build_pmt_shell - -import os -import sys - -dir = os.path.split(os.path.realpath(__file__))[0] -sys.path.append(dir + '/..') - -from optics import * -from view import buildable +from chroma.optics import * +from chroma.camera import buildable +from os.path import dirname @buildable('12inch_pmt') def build_12inch_pmt(outer_material=water, nsteps=16): - return build_pmt(dir + '/hamamatsu_12inch.txt', 0.003, outer_material, nsteps) + return build_pmt(dirname(__file__) + '/hamamatsu_12inch.txt', 0.003, outer_material, nsteps) @buildable('12inch_pmt_shell') def build_12inch_pmt_shell(outer_material=water, nsteps=16): - return build_pmt_shell(dir + '/hamamatsu_12inch.txt') + return build_pmt_shell(dirname(__file__) + '/hamamatsu_12inch.txt') # from Jelena Maricic lc_12inch_a = 0.16597 @@ -39,10 +32,10 @@ def build_12inch_pmt_with_lc_hd(outer_material=water, nsteps=128): @buildable('8inch_pmt') def build_8inch_pmt(outer_material=water, nsteps=24): - return build_pmt(dir + '/sno_pmt_reduced.txt', 0.003, outer_material, nsteps) + return build_pmt(dirname(__file__) + '/sno_pmt_reduced.txt', 0.003, outer_material, nsteps) @buildable('8inch_pmt_with_lc') 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) + lc = build_light_collector_from_file(dirname(__file__) + '/sno_cone.txt', outer_material, nsteps) return pmt + lc |