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:

  1. Run python setup.py install in the ASTERIA directory.

  2. Run python setup.py develop and set the environment variable ASTERIA to 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
strixyzeffvoltype
float32float32float64float64float64float64bytes2
1.01.0-256.14-521.08496.070.14061218768974065i3
1.02.0-256.14-521.08479.050.15195632747592844i3
1.03.0-256.14-521.08462.030.1680922220166442i3
1.04.0-256.14-521.08445.010.17294657931248547i3
1.05.0-256.14-521.08427.990.16979112735610763i3
1.06.0-256.14-521.08410.970.1500592745094757i3
1.07.0-256.14-521.08393.950.12795153280329327i3
1.08.0-256.14-521.08376.920.12487149756118941i3
1.09.0-256.14-521.08359.90.13476460232511675i3
1.010.0-256.14-521.08342.880.144256168089653i3
.....................
86.051.0-10.976.72-437.440.31115821719070447dc
86.052.0-10.976.72-444.450.3120262572290038dc
86.053.0-10.976.72-451.460.31244696673740874dc
86.054.0-10.976.72-458.470.3108843832344346dc
86.055.0-10.976.72-465.480.30803064350541054dc
86.056.0-10.976.72-472.490.30491330061603933dc
86.057.0-10.976.72-479.490.30094017032486026dc
86.058.0-10.976.72-486.50.2964800387830281dc
86.059.0-10.976.72-493.510.2915809488737785dc
86.060.0-10.976.72-500.830.2858211445129103dc
[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()
[ ]: