Skip to content

schultel/pisa

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pisa

The common PINGU simulation and analysis code for the neutrino mass hierarchy.

Simulation chain

Simulation chain

The original drawing is here.

Installation

Requirements

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

If you are working on OSX, we suggest homebrew as a package manager, which supports all of the non-python packages above.

Obtaining pisa

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/sboeser/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.

  1. Create your own github account
  2. Navigate to the pisa github page and fork the repository by clicking on the fork button
  3. 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, or master
  • --editable tells pip 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 subdirectory pisa that holds your files will be created within <your/source/dir>.
  • As for now (pip <= 1.5.6) the additional git checkout <branch> is required as pip will checkout the specific latest commit in the branch you give, rather than the HEAD 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.

Updating pisa

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

  1. Make sure your fork of pisa on github has the right version
  2. 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.

Data formats

This working document describes some of the data formats that will be used in the different steps.

About

The common PINGU simulation and analysis code for the neutrino mass hierarchy.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • D 93.1%
  • Python 5.2%
  • Other 1.7%