icecube / FIRESONG

FIRst Extragalactic Simulation Of Neutrino and Gamma-ray
Other
18 stars 8 forks source link

Firesong

FIRst Extragalactic Simulation Of Neutrinos and Gamma-rays.

See the Docs

See the FIRESONG paper

Documentation for the astrophysics and cosmology of neutrino sources can be found on:

Set up

This package is developed for Python 3, and can be installed via pip:

pip install firesong

Or by downloading the repository and running:

python setup.py install

If you want to execute scripts of FIRESONG directly via shell command, you can specify where you would like the output of simulations to go, by default. In bash: export FIRESONG=/location/of/FIRESONG/.

Basic usage

Several scripts are provided:

Examples:

If installed via pip, in in the python console,

from firesong.Firesong import firesong_simulation
firesong_simulation('./', density=1e-6, Evolution='CC2015SNR', zmax=4.0,
                    fluxnorm=1.44e-8, index=2.28, LF='SC')

or with the repository downloaded

python Firesong.py -d 1e-6 --evolution CC2015SNR --zmax 4.0
--fluxnorm 1.44e-8 --index 2.28 --LF SC

wlll simulate neutrino sources with a local density of 10^-6 Mpc^-3 with a source density evolution that follows the Clash and Candels 2015 Supernova Rate (CC2015SNR). The simulation will be done up to a redshift of 4.0. The neutrino luminosity, because it is not specified as an option, will be calculated internally to saturate a muon neutrino diffuse flux with a normalization, at 100 TeV, of E^2d\phi/dE = 1.44 x 10^-8 GeV.cm^-2.s^-1.sr^-1 and with a spectral index of -2.28. Neutrino luminosity is distributed as a delta function, i.e., standard candle (SC). The result will be output as a text file firesong.out in the current directoy, or in the directory of environment variable FIRESONG if it is set.

python Firesong.py -d 1e-6 --evolution MD2016SFR --zmax 8.0
--index 2.28 --LF SC -L 1e51

will simulate neutrino sources with a local density of 10^-6 Mpc^-3 with a source density evolution that follows the Madau and Dickinson 2016 Star Formation Rate History (MD2014SFR). The simulation will be done up to a redshift of 8.0. The neutrino power law spectral index is -2.28. Neutrino luminosity is distributed as a delta function, i.e., standard candle (SC) and is set to be 10^51 erg/year. Note that muon neutrino diffuse flux normalization is ignored when a luminosity is specified, but the spectral index should still be provided. This mode of operation allows the exploration of the luminosity vs. local density plane (aka Kowalski plot).

More examples are included in the notebooks directory. Jupyter notebook and matplotlib are required to run the examples.

Tests

All unittest could be run by

python -m unittest discover tests/

If you would like to suppress the printed output, you may add a -b flag to this command. If you want to run a test for a certain file separately use either

python -m unittest tests/test_<...>

or

python tests/test_<...>.py

How to request support

Questions about support for FIRESONG can be sent to one of the development leads for FIRESONG. See AUTHORS.md

How to contribute

Community contributions to Firesong are accepted and welcome. Issues can be reported by any user, even if not a member of IceCube. Pull requests can be requested by any user, even if not a member of IceCube.