Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions data/config/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ name: IceCube fast supernova simulation
# - Set to <PACKAGE_DATA> will use an absolute installation path.
# - Set to an empty string to force paths relative to the working directory.
# - Set to some other absolute path.
base_path: '{USSR}/data'
base_path: '{ASTERIA}/data'
#base_path: 'data'

# Turn up simulation verbosity.
verbose: no

# The detector configuration is loaded by the ussr.detector module.
# The detector configuration is loaded by the asteria.detector module.
detector:
name: IceCube_IC-86
geometry:
Expand All @@ -26,7 +26,7 @@ detector:
format: ascii
path: detector/effectivevolume_benedikt_AHA_normalDoms.txt

# The source configuration is loaded by the ussr.source module.
# The source configuration is loaded by the asteria.source module.
source:
name: Sukh_SFHo_z9.6
model: Sukhbold 9.6Msun progenitor with SFHo equation of state
Expand Down
50 changes: 27 additions & 23 deletions docs/nb/DetectorResponse.ipynb

Large diffs are not rendered by default.

23 changes: 5 additions & 18 deletions docs/nb/cross_sections.ipynb

Large diffs are not rendered by default.

117 changes: 60 additions & 57 deletions docs/nb/detector.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"source": [
"%matplotlib notebook\n",
"\n",
"from ussr import config, detector\n",
"from asteria import config, detector\n",
"\n",
"import astropy.units as u\n",
"\n",
Expand All @@ -29,8 +29,8 @@
"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 USSR directory.\n",
"2. Run `python setup.py develop` and set the environment variable `USSR` to point to the git source checkout.\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."
]
Expand All @@ -53,59 +53,59 @@
{
"data": {
"text/html": [
"&lt;Table length=5160&gt;\n",
"<table id=\"table4695499832\" class=\"table-striped table-bordered table-condensed\">\n",
"<i>Table length=5160</i>\n",
"<table id=\"table47646655768\" class=\"table-striped table-bordered table-condensed\">\n",
"<thead><tr><th>str</th><th>i</th><th>x</th><th>y</th><th>z</th><th>effvol</th><th>type</th></tr></thead>\n",
"<thead><tr><th>float32</th><th>float32</th><th>float64</th><th>float64</th><th>float64</th><th>float64</th><th>bytes2</th></tr></thead>\n",
"<tr><td>1.0</td><td>1.0</td><td>-256.14</td><td>-521.08</td><td>496.07</td><td>0.14061218769</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>2.0</td><td>-256.14</td><td>-521.08</td><td>479.05</td><td>0.151956327476</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>3.0</td><td>-256.14</td><td>-521.08</td><td>462.03</td><td>0.168092222017</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>4.0</td><td>-256.14</td><td>-521.08</td><td>445.01</td><td>0.172946579312</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>5.0</td><td>-256.14</td><td>-521.08</td><td>427.99</td><td>0.169791127356</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>6.0</td><td>-256.14</td><td>-521.08</td><td>410.97</td><td>0.150059274509</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>7.0</td><td>-256.14</td><td>-521.08</td><td>393.95</td><td>0.127951532803</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>8.0</td><td>-256.14</td><td>-521.08</td><td>376.92</td><td>0.124871497561</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>9.0</td><td>-256.14</td><td>-521.08</td><td>359.9</td><td>0.134764602325</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>10.0</td><td>-256.14</td><td>-521.08</td><td>342.88</td><td>0.14425616809</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>1.0</td><td>-256.14</td><td>-521.08</td><td>496.07</td><td>0.14061218768974068</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>2.0</td><td>-256.14</td><td>-521.08</td><td>479.05</td><td>0.1519563274759284</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>3.0</td><td>-256.14</td><td>-521.08</td><td>462.03</td><td>0.1680922220166442</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>4.0</td><td>-256.14</td><td>-521.08</td><td>445.01</td><td>0.1729465793124855</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>5.0</td><td>-256.14</td><td>-521.08</td><td>427.99</td><td>0.16979112735610766</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>6.0</td><td>-256.14</td><td>-521.08</td><td>410.97</td><td>0.1500592745094757</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>7.0</td><td>-256.14</td><td>-521.08</td><td>393.95</td><td>0.12795153280329327</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>8.0</td><td>-256.14</td><td>-521.08</td><td>376.92</td><td>0.1248714975611894</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>9.0</td><td>-256.14</td><td>-521.08</td><td>359.9</td><td>0.13476460232511675</td><td>i3</td></tr>\n",
"<tr><td>1.0</td><td>10.0</td><td>-256.14</td><td>-521.08</td><td>342.88</td><td>0.144256168089653</td><td>i3</td></tr>\n",
"<tr><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td><td>...</td></tr>\n",
"<tr><td>86.0</td><td>51.0</td><td>-10.97</td><td>6.72</td><td>-437.44</td><td>0.311158217191</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>52.0</td><td>-10.97</td><td>6.72</td><td>-444.45</td><td>0.312026257229</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>53.0</td><td>-10.97</td><td>6.72</td><td>-451.46</td><td>0.312446966737</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>54.0</td><td>-10.97</td><td>6.72</td><td>-458.47</td><td>0.310884383234</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>55.0</td><td>-10.97</td><td>6.72</td><td>-465.48</td><td>0.308030643505</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>56.0</td><td>-10.97</td><td>6.72</td><td>-472.49</td><td>0.304913300616</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>57.0</td><td>-10.97</td><td>6.72</td><td>-479.49</td><td>0.300940170325</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>58.0</td><td>-10.97</td><td>6.72</td><td>-486.5</td><td>0.296480038783</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>59.0</td><td>-10.97</td><td>6.72</td><td>-493.51</td><td>0.291580948874</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>60.0</td><td>-10.97</td><td>6.72</td><td>-500.83</td><td>0.285821144513</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>51.0</td><td>-10.97</td><td>6.72</td><td>-437.44</td><td>0.31115821719070447</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>52.0</td><td>-10.97</td><td>6.72</td><td>-444.45</td><td>0.31202625722900373</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>53.0</td><td>-10.97</td><td>6.72</td><td>-451.46</td><td>0.31244696673740874</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>54.0</td><td>-10.97</td><td>6.72</td><td>-458.47</td><td>0.31088438323443457</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>55.0</td><td>-10.97</td><td>6.72</td><td>-465.48</td><td>0.3080306435054105</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>56.0</td><td>-10.97</td><td>6.72</td><td>-472.49</td><td>0.30491330061603933</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>57.0</td><td>-10.97</td><td>6.72</td><td>-479.49</td><td>0.30094017032486026</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>58.0</td><td>-10.97</td><td>6.72</td><td>-486.5</td><td>0.2964800387830281</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>59.0</td><td>-10.97</td><td>6.72</td><td>-493.51</td><td>0.2915809488737785</td><td>dc</td></tr>\n",
"<tr><td>86.0</td><td>60.0</td><td>-10.97</td><td>6.72</td><td>-500.83</td><td>0.28582114451291024</td><td>dc</td></tr>\n",
"</table>"
],
"text/plain": [
"<Table length=5160>\n",
" str i x y z effvol type \n",
"float32 float32 float64 float64 float64 float64 bytes2\n",
"------- ------- ------- ------- ------- -------------- ------\n",
" 1.0 1.0 -256.14 -521.08 496.07 0.14061218769 i3\n",
" 1.0 2.0 -256.14 -521.08 479.05 0.151956327476 i3\n",
" 1.0 3.0 -256.14 -521.08 462.03 0.168092222017 i3\n",
" 1.0 4.0 -256.14 -521.08 445.01 0.172946579312 i3\n",
" 1.0 5.0 -256.14 -521.08 427.99 0.169791127356 i3\n",
" 1.0 6.0 -256.14 -521.08 410.97 0.150059274509 i3\n",
" 1.0 7.0 -256.14 -521.08 393.95 0.127951532803 i3\n",
" 1.0 8.0 -256.14 -521.08 376.92 0.124871497561 i3\n",
" 1.0 9.0 -256.14 -521.08 359.9 0.134764602325 i3\n",
" 1.0 10.0 -256.14 -521.08 342.88 0.14425616809 i3\n",
" ... ... ... ... ... ... ...\n",
" 86.0 51.0 -10.97 6.72 -437.44 0.311158217191 dc\n",
" 86.0 52.0 -10.97 6.72 -444.45 0.312026257229 dc\n",
" 86.0 53.0 -10.97 6.72 -451.46 0.312446966737 dc\n",
" 86.0 54.0 -10.97 6.72 -458.47 0.310884383234 dc\n",
" 86.0 55.0 -10.97 6.72 -465.48 0.308030643505 dc\n",
" 86.0 56.0 -10.97 6.72 -472.49 0.304913300616 dc\n",
" 86.0 57.0 -10.97 6.72 -479.49 0.300940170325 dc\n",
" 86.0 58.0 -10.97 6.72 -486.5 0.296480038783 dc\n",
" 86.0 59.0 -10.97 6.72 -493.51 0.291580948874 dc\n",
" 86.0 60.0 -10.97 6.72 -500.83 0.285821144513 dc"
" str i x y z effvol type \n",
"float32 float32 float64 float64 float64 float64 bytes2\n",
"------- ------- ------- ------- ------- ------------------- ------\n",
" 1.0 1.0 -256.14 -521.08 496.07 0.14061218768974068 i3\n",
" 1.0 2.0 -256.14 -521.08 479.05 0.1519563274759284 i3\n",
" 1.0 3.0 -256.14 -521.08 462.03 0.1680922220166442 i3\n",
" 1.0 4.0 -256.14 -521.08 445.01 0.1729465793124855 i3\n",
" 1.0 5.0 -256.14 -521.08 427.99 0.16979112735610766 i3\n",
" 1.0 6.0 -256.14 -521.08 410.97 0.1500592745094757 i3\n",
" 1.0 7.0 -256.14 -521.08 393.95 0.12795153280329327 i3\n",
" 1.0 8.0 -256.14 -521.08 376.92 0.1248714975611894 i3\n",
" 1.0 9.0 -256.14 -521.08 359.9 0.13476460232511675 i3\n",
" 1.0 10.0 -256.14 -521.08 342.88 0.144256168089653 i3\n",
" ... ... ... ... ... ... ...\n",
" 86.0 51.0 -10.97 6.72 -437.44 0.31115821719070447 dc\n",
" 86.0 52.0 -10.97 6.72 -444.45 0.31202625722900373 dc\n",
" 86.0 53.0 -10.97 6.72 -451.46 0.31244696673740874 dc\n",
" 86.0 54.0 -10.97 6.72 -458.47 0.31088438323443457 dc\n",
" 86.0 55.0 -10.97 6.72 -465.48 0.3080306435054105 dc\n",
" 86.0 56.0 -10.97 6.72 -472.49 0.30491330061603933 dc\n",
" 86.0 57.0 -10.97 6.72 -479.49 0.30094017032486026 dc\n",
" 86.0 58.0 -10.97 6.72 -486.5 0.2964800387830281 dc\n",
" 86.0 59.0 -10.97 6.72 -493.51 0.2915809488737785 dc\n",
" 86.0 60.0 -10.97 6.72 -500.83 0.28582114451291024 dc"
]
},
"execution_count": 3,
Expand Down Expand Up @@ -205,7 +205,7 @@
" };\n",
"\n",
" this.imageObj.onunload = function() {\n",
" this.ws.close();\n",
" fig.ws.close();\n",
" }\n",
"\n",
" this.ws.onmessage = this._make_on_message_function(this);\n",
Expand Down Expand Up @@ -682,7 +682,7 @@
"};\n",
"mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Pan axes with left mouse, zoom with right\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
"\n",
"mpl.extensions = [\"eps\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\"];\n",
"mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
"\n",
"mpl.default_extension = \"png\";var comm_websocket_adapter = function(comm) {\n",
" // Create a \"websocket\"-like object which calls the given IPython comm\n",
Expand Down Expand Up @@ -852,9 +852,12 @@
" // Check for shift+enter\n",
" if (event.shiftKey && event.which == 13) {\n",
" this.canvas_div.blur();\n",
" // select the cell after this one\n",
" var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
" IPython.notebook.select(index + 1);\n",
" event.shiftKey = false;\n",
" // Send a \"J\" for go to next cell\n",
" event.which = 74;\n",
" event.keyCode = 74;\n",
" manager.command_mode();\n",
" manager.handle_keydown(event);\n",
" }\n",
"}\n",
"\n",
Expand Down Expand Up @@ -943,9 +946,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:icecube]",
"display_name": "Python 3",
"language": "python",
"name": "conda-env-icecube-py"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -957,7 +960,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"version": "3.6.4"
}
},
"nbformat": 4,
Expand Down
20 changes: 10 additions & 10 deletions docs/nb/inverse_beta_decay.ipynb

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions docs/nb/luminosity.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions python/ussr/__init__.py → python/asteria/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
====
ussr
====
=======
asteria
=======
Tools for IceCube supernova simulations, including neutrino luminosity and
energy spectra data files.
"""
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion python/ussr/detector.py → python/asteria/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def initialize(config):
Parameters
----------

config : :class:`ussr.config.Configuration`
config : :class:`asteria.config.Configuration`
Configuration parameters used to create a Detector.

Returns
Expand Down
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions python/ussr/source.py → python/asteria/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get_luminosity(self, t, flavor=Flavor.nu_e_bar):

t : float
Time relative to core bounce.
flavor : :class:`ussr.neutrino.Flavor`
flavor : :class:`asteria.neutrino.Flavor`
Neutrino flavor.

Returns
Expand All @@ -95,7 +95,7 @@ def get_mean_energy(self, t, flavor=Flavor.nu_e_bar):

t : float
Time relative to core bounce.
flavor : :class:`ussr.neutrino.Flavor`
flavor : :class:`asteria.neutrino.Flavor`
Neutrino flavor.

Returns
Expand All @@ -114,7 +114,7 @@ def get_flux(self, time, flavor=Flavor.nu_e_bar):

t : float
Time relative to core bounce (units seconds).
flavor : :class:`ussr.neutrino.Flavor`
flavor : :class:`asteria.neutrino.Flavor`
Neutrino flavor.

Returns
Expand Down Expand Up @@ -142,7 +142,7 @@ def energy_spectrum(self, t, E, flavor=Flavor.nu_e_bar):

t : float
Time relative to core bounce.
flavor : :class:`ussr.neutrino.Flavor`
flavor : :class:`asteria.neutrino.Flavor`
Neutrino flavor.
E : `numpy.ndarray`
Sorted grid of neutrino energies to compute the energy PDF.
Expand Down Expand Up @@ -187,7 +187,7 @@ def sample_energies(self, t, E, n=1, flavor=Flavor.nu_e_bar):
Sorted grid of neutrino energies to compute the energy PDF.
n : int
Number of energy samples to produce.
flavor : :class:`ussr.neutrino.Flavor`
flavor : :class:`asteria.neutrino.Flavor`
Neutrino flavor.

Returns
Expand Down Expand Up @@ -244,7 +244,7 @@ def initialize(config):
Parameters
----------

config : :class:`ussr.config.Configuration`
config : :class:`asteria.config.Configuration`
Configuration parameters used to create a Source.

Returns
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
from distutils.command.sdist import sdist as DistutilsSdist
from setuptools import setup, find_packages
#
from python.ussr._git import get_version, SetVersion
from python.asteria._git import get_version, SetVersion
#
# Begin setup
#
setup_keywords = dict()
#
setup_keywords['name'] = 'ussr'
setup_keywords['name'] = 'asteria'
setup_keywords['description'] = 'IceCube supernova simulation package'
setup_keywords['author'] = 'IceCube Collaboration'
setup_keywords['author_email'] = 'sn-wg@icecube.wisc.edu'
Expand Down Expand Up @@ -46,8 +46,8 @@
#
# Internal data directories.
#
setup_keywords['data_files'] = [('ussr/data/config', glob('data/config/*')),
('ussr/data/spectra', glob('data/spectra/*'))]
setup_keywords['data_files'] = [('asteria/data/config', glob('data/config/*')),
('asteria/data/spectra', glob('data/spectra/*'))]
#
# Run setup command.
#
Expand Down