Detector Geometry
[1]:
from asteria import config, detector
import astropy.units as u
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
mpl.rc('font', size=12)
Load Configuration
This will load the source configuration from a file.
For this to work, either the user needs to have done one of two things:
Run
python setup.py installin the ASTERIA directory.Run
python setup.py developand set the environment variableASTERIAto point to the git source checkout.
If these were not done, the initialization will fail because the paths will not be correctly resolved.
[2]:
conf = config.load_config('../../data/config/default.yaml')
ic86 = detector.initialize(conf)
[3]:
doms = ic86.doms_table()
doms
[3]:
Table length=5160
| str | i | x | y | z | effvol | type |
|---|---|---|---|---|---|---|
| float32 | float32 | float64 | float64 | float64 | float64 | bytes2 |
| 1.0 | 1.0 | -256.14 | -521.08 | 496.07 | 0.14061218768974065 | i3 |
| 1.0 | 2.0 | -256.14 | -521.08 | 479.05 | 0.15195632747592844 | i3 |
| 1.0 | 3.0 | -256.14 | -521.08 | 462.03 | 0.1680922220166442 | i3 |
| 1.0 | 4.0 | -256.14 | -521.08 | 445.01 | 0.17294657931248547 | i3 |
| 1.0 | 5.0 | -256.14 | -521.08 | 427.99 | 0.16979112735610763 | i3 |
| 1.0 | 6.0 | -256.14 | -521.08 | 410.97 | 0.1500592745094757 | i3 |
| 1.0 | 7.0 | -256.14 | -521.08 | 393.95 | 0.12795153280329327 | i3 |
| 1.0 | 8.0 | -256.14 | -521.08 | 376.92 | 0.12487149756118941 | i3 |
| 1.0 | 9.0 | -256.14 | -521.08 | 359.9 | 0.13476460232511675 | i3 |
| 1.0 | 10.0 | -256.14 | -521.08 | 342.88 | 0.144256168089653 | i3 |
| ... | ... | ... | ... | ... | ... | ... |
| 86.0 | 51.0 | -10.97 | 6.72 | -437.44 | 0.31115821719070447 | dc |
| 86.0 | 52.0 | -10.97 | 6.72 | -444.45 | 0.3120262572290038 | dc |
| 86.0 | 53.0 | -10.97 | 6.72 | -451.46 | 0.31244696673740874 | dc |
| 86.0 | 54.0 | -10.97 | 6.72 | -458.47 | 0.3108843832344346 | dc |
| 86.0 | 55.0 | -10.97 | 6.72 | -465.48 | 0.30803064350541054 | dc |
| 86.0 | 56.0 | -10.97 | 6.72 | -472.49 | 0.30491330061603933 | dc |
| 86.0 | 57.0 | -10.97 | 6.72 | -479.49 | 0.30094017032486026 | dc |
| 86.0 | 58.0 | -10.97 | 6.72 | -486.5 | 0.2964800387830281 | dc |
| 86.0 | 59.0 | -10.97 | 6.72 | -493.51 | 0.2915809488737785 | dc |
| 86.0 | 60.0 | -10.97 | 6.72 | -500.83 | 0.2858211445129103 | dc |
[4]:
fig = plt.figure(figsize=(6,6))
ax = fig.add_subplot(111, projection='3d')
# Plot the DeepCore DOMs
dc = doms['type'] == 'dc'
x, y, z = [doms[coord][dc] for coord in 'xyz']
ax.scatter(x, y, z, alpha=0.7)
# Plot the standard DOMs
i3 = doms['type'] == 'i3'
x, y, z = [doms[coord][i3] for coord in 'xyz']
ax.scatter(x, y, z, alpha=0.2)
ax.set(xlabel='x [m]', ylabel='y [m]', zlabel='z [m]')
ax.view_init(30, -40)
fig.tight_layout()
[ ]: