{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Detector Geometry" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from asteria import config, detector\n", "\n", "import astropy.units as u\n", "\n", "import numpy as np\n", "import matplotlib as mpl\n", "import matplotlib.pyplot as plt\n", "from mpl_toolkits.mplot3d import Axes3D\n", "\n", "mpl.rc('font', size=12)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load Configuration\n", "\n", "This will load the source configuration from a file.\n", "\n", "For this to work, either the user needs to have done one of two things:\n", "1. Run `python setup.py install` in the ASTERIA directory.\n", "2. Run `python setup.py develop` and set the environment variable `ASTERIA` to point to the git source checkout.\n", "\n", "If these were not done, the initialization will fail because the paths will not be correctly resolved." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "conf = config.load_config('../../data/config/default.yaml')\n", "ic86 = detector.initialize(conf)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "Table length=5160\n", "
| 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 |