Installation

Dependencies

You must have already installed the following packages on your computer:

Create python environment (optional but advised)

This will create locally a python environment in which you can install and specify the required libraries. The advantage is that it will avoid you to change the libraries version you are using for other projects. You need to install conda first:

Then to create the python environment, open a terminal and type:

conda create --name pyGRBz python=3  numpy iminuit

We named this environment pyGRBz as this the telescope for which we use this Image Simulator, but you can use an other environment name.

Once it is installed, type in a terminal (if you let pyGRBz as the environment name, otherwise write the one you chose):

source activate pyGRBz

It will activate the environment. You can see that (pyGRBz) is added in front of your ID in your terminal. If you type “conda list” you can check which libraries and version are installed. When you want to exit this environment type “source deactivate”.

Installation from sources

The sources for pyGRBz can be downloaded from the Github repo.

You can either clone the public repository:

$ git clone git://github.com/dcorre/pyGRBz

Or download the tarball:

$ curl  -OL https://github.com/dcorre/pyGRBz/tarball/master

Once you have a copy of the source, if you created a python environment, do not forget to activate it with:

source activate pyGRBz

Before installing it, remember that you need numpy to be installed.

You can now install it with:

$ python setup.py develop

iminuit and extinction need a gcc compiler to be installed as they are using cython. If you already installed iminuit successfully, the installation should be performed without any problem within the virtual conda environment.