The common PINGU simulation and analysis code for the neutrino mass hierarchy.
The original drawing is here.
To install this package, you'll need to have the following requirements installed
- pip -- version > 1.2 recommended
- swig -- install with
--universal
option - numpy
- scipy -- version > 0.12 recommended
- hdf5 -- install with
--enable-cxx
option - h5py -- install via pip
- cython -- install via pip
If you are working on OSX, we suggest homebrew as a package manager, which supports all of the non-python packages above.
User mode:
Use this if you just want to run pisa
, but don't want to edit it. First pick a revision from this github page. Then run this command in your shell, to directly install pisa from github.
pip install git+https://github.com/tarlen5/pisa@<release>#egg=pisa
where
<release>
is the release number, e.g.2.0.0
Developer mode:
Also in developer mode, you can directly install via pip
from github. In order to contribute, you'll first need your own fork of the pisa
repository.
- Create your own github account
- Navigate to the pisa github page and fork the repository by clicking on the button
- Now go to your terminal and install
pisa
from your fork using the following commands
pip install [ --src <your/source/dir> --editable ] git+https://github.com/<user>/pisa@<branch>#egg=pisa
cd <your/source/dir>/pisa && git checkout <branch>
where
<user>
is the user name you picked on github.<branch>
is the branch you'd like to install. This could be either one of the releases, ormaster
--editable
tellspip
to make an editable installation, i.e instead of installing directories in your<site-packages>
directory,pip
will install the source in<your/source/dir>
and link this from the<site-packages>
. This way, if you change the source the changes will be automatically reflected when you run the code. NOTE: a subdirectorypisa
that holds your files will be created within<your/source/dir>
.- As for now (
pip <= 1.5.6
) the additionalgit checkout <branch>
is required aspip
will checkout the specific latest commit in the branch you give, rather than theHEAD
of that branch. You are thus left with a detached HEAD, and can not commit to the branch you check out.
Notes:
-
You can work with your installation using the usual git commands (pull, push, etc.). Note however, that these won't rebuild any of the extension (i.e. C/C++) libraries. If you want to recompile these libraries, simply run
cd <your/source/dir>/pisa && python setup.py build_ext --inplace
-
If you did not install
pisa
in a virtual environment, then the package will be installed alongside with your other python packages. This typically means that you'll need super-user priviledges to install, i.e.
sudo pip install ...
If your are using above with the--editable
option, the source files will also be installed by the super-user, which means you might not be able to edit them. In this case, just
cd <your/source/dir> && sudo chown -R <user> pisa
where<user>
obviously just is your user name.
Developer mode:
To upgrade to new version of pisa, just run the install command again with a new version number and the --upgrade
flag.
Developer mode:
The simplest way to update pisa is just to checkout the version you want in git. However, this will not update the version number for pip
, and it also won't recompile the prob3
oscillation package. In order to get those updated, the best way is to
- Make sure your fork of pisa on github has the right version
- Run the install command again
pip install --src <your/source/dir> --editable git+https://github.com/<user>/pisa@<branch>#egg=pisa
Git will automatically realize that there is already a version of pisa
in <your/source/dir>
, so it will just update, but won't delete any of the files you have in there.
This working document describes some of the data formats that will be used in the different steps.