This folder contains the analysis notebooks shown in the Gammapy hands on sessions for University of Adelaide and CTA-Oz. The related indico page can be found at https://indico.cta-observatory.org/event/5395/
These instructions assume that you have previously installed a version of Anaconda or Miniconda on your machine.
We recommend that you install the latest version of gammapy as follows:
curl -O https://gammapy.org/download/install/gammapy-1.2-environment.yml
conda env create -f gammapy-1.2-environment.yml
conda activate gammapy-1.2
OR with pip
python -m pip install gammapy[all]
To download the tutorials and associated datasets (necessary for the tutorials in this workshop)
gammapy download notebooks
gammapy download datasets
If using conda environment, set GAMMAPY_DATA with conda
conda env config vars set GAMMAPY_DATA=$PWD/gammapy-datasets/1.2
conda activate gammapy-1.2
else set with shell:
export GAMMAPY_DATA=$PWD/gammapy-datasets/1.2
To check that the gammapy environment is working, open a new terminal and type
conda activate gammapy-1.2
gammapy info
To further check that you have correctly set up the data folder type
ipython
Then in the ipython window, type
from gammapy.data import DataStore
ds = DataStore.from_dir("$GAMMAPY_DATA/hess-dl3-dr1")
obs = ds.get_observations()
print(len(obs))
If the cells run without any error and prints 105
, Congratulations! You have correctly set-up gammapy
If you have any issues with installation please contact Kirsty via email [email protected]
Session 1 - 1D spectral simulation
Session 2 - Simulation of sky maps
Session 3 - Internal Science Data Challenge (Sabrina)
Session 4 - Producing 1D spectra
Session 5 - Producing skymaps through 3D analysis