{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Example Configuration" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from asteria.simulation import Simulation\n", "from snewpy.neutrino import Flavor\n", "\n", "import matplotlib.pyplot as plt\n", "from importlib.resources import files" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "configfile = files('asteria.etc').joinpath('example.ini')\n", "sim = Simulation(config=configfile)\n", "sim.run()\n", "\n", "fig, ax = plt.subplots(1, figsize = (6,7))\n", "for flavor in sim.flavors:\n", " ax.plot(sim.time, sim.avg_dom_signal(flavor=flavor), label=flavor.name)\n", "ax.legend()\n", "ax.set(xlabel=r't-t$_{bounce}$ [s]', ylabel='Signal per DOM', xlim=(-0.025, 0.65));" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.11" } }, "nbformat": 4, "nbformat_minor": 4 }