-
Notifications
You must be signed in to change notification settings - Fork 35
Home
Welcome to the NuRadioMC wiki!
If you are new to NuRadioMC check out our tutorial as well as Example2 and Example3 for ways to use NuRadioMC.
You can also check out the two webinars on NuRadioMC and NuRadioReco for a live demonstration and hands-on tutorial.
Since version 2.0, the NuRadioReco code is part of the NuRadioMC repository. No separate installation of NuRadioReco is required, and any old installation of NuRadioReco needs to be removed from the $PYTHONPATH
environment variable (or uninstalled if it was installed via pip). For detailed instructions on how to switch to version 2.0 see below.
If you only want to use NuRadioMC/Reco then you can just install it via pip (follow the quickstart instructions). If you intend to modify/improve NuRadioMC/Reco for your needs, follow the manual installation instructions.
The release version of NuRadioMC/Reco including all its dependencies can easily installed via pip.
WARNING: this will install version 1.*. To obtain version 2.* please follow the manual installation instructions.
pip install NuRadioMC
where you might want to append a --user
to install it in your home directory. Otherwise, it will install it system-wide.
If you are unsure whether something might interfere with your custom installation, please consider using a virtual environment.
python3 -m venv --system-site-packages /path/to/new/virtual/environment
source /path/to/new/virtual/environment/bin/activate
If you installed NuRadioMC with pip
you can skip the manual installation section.
NuRadioMC requires python 3.6
NuRadioMC/Reco depend on a few python packages that needs to be installed. You can copy-and-paste the following line into your shell to install all dependencies via pip.
pip install numpy scipy matplotlib tinydb>=4.1.1 tinydb-serialization aenum astropy radiotools>=0.2.0 cython future awkward h5py pyyaml peakutils requests toml uproot numba pymongo dash plotly importlib-metadata
consider installing the dependencies in a virtual environment or via the additional --user
flag (see the quickstart instructions for more information).
If you would like to use the GSL Speed Boosts, you will need to have a working version of gsl https://www.gnu.org/software/gsl/ installed. This is straightforward both on Mac and Unix. For additional comments please visit the dedicated page.
You also need cython
which you can install via pip install cython
The first step is download (clone) the NuRadioMC repository. Go into the directory that contains your local software (e.g. $HOME/software
) and clone the github repository
cd $HOME/software
git clone https://github.com/nu-radio/NuRadioMC.git
and add the install location to your python path:
export PYTHONPATH=$HOME/software/NuRadioMC:$PYTHONPATH
where you need to exchange $HOME/software
with whatever directory you cloned NuRadioMC into.
In version 1.* we had NuRadioMC and NuRadioReco in separate github repositories. If you installed things to ~/software
it looked like
~/software/NuRadioMC/NuRadioMC
~/software/NuRadioReco/NuRadioReco
and you added both ~/software/NuRadioMC/
and ~/software/NuRadioReco/
to your $PYTHONPATH
environment variable so that you could import things as from NuRadioReco.utilities import units
or from NuRadioMC.utilities import attenuation
.
Now, with version v2.* NuRadioReco is just a subfolder in the NuRadioMC repository. It looks like:
~/software/NuRadioMC/NuRadioMC
~/software/NuRadioMC/NuRadioReco
now you only need to add ~/software/NuRadioMC/
to your $PYTHONPATH
environment variable (and you need to delete ~/software/NuRadioReco/
from your $PYTHONPATH
if you have a previous installation) . All imports will work as before.
So with this change, you will only need to checkout one github repository git clone https://github.com/nu-radio/NuRadioMC.git
and there will only be one version number, which we now increased to v2.0.0.
For the NuRadioReco only users: NuRadioReco will remain independent of NuRadioMC.
Another change for developers is that we reserve the master branch for stable releases (so that users don't accidentally use an in-progress development version). All ongoing developments will be merged to the develop
branch. From that branch, we will create new releases on a regular basis which then will be merged to the master branch.
There has also been a slight change in the way the ray-tracer is initialised. In v1.* NuRadioReco we transferred the 3D start and end vector (x1 and x2)
like this to the ray-tracer:
from NuRadioMC.SignalProp import propagation
prop = propagation.get_propagation_module('analytic')
rays = prop(x1, x2, ice, attenuation_model)
rays.find_solution()
With v2.* NuRadioReco the positions are transferred in 'set_start_and_end_point()':
from NuRadioMC.SignalProp import propagation
prop = propagation.get_propagation_module('analytic')
rays = prop(ice, attenuation_model)
rays.set_start_and_end_point(x1,x2)
rays.find_solution()