Getting started

The last release of the pygammaspec package can be installed directly from pip using the command:

pip install pygammaspec

The latest unreleased version can instead be downloaded directly from our GitHub page and then installed using pip.

git clone
cd PyGammaSpec
pip install .


We always recommend installing new Python packages in a clean Conda environment and avoid installing in the system Python distribution or in the base Conda environment! If you are unfamiliar with Conda, please refer to their documentation for a guide on how to set up environments.

The library can be imported in a Python script via the following syntax:

import pygammaspec

Alternatively, individual submodules, classes, and functions can be imported separately:

from pygammaspec.spectrum import GammaSpectrum

For a more detailed explanation of the available features in each submodule, please refer to their specific page in this User Guide.