This page lists the Gammapy tutorials that are available as Jupyter notebooks.

You can read them here, or execute them using a temporary cloud server in Binder.

To execute them locally, you have to first install Gammapy locally (see Installation) and download the tutorial notebooks and example datasets (see Getting Started). Once Gammapy is installed, remember that you can always use gammapy info to check your setup.

Gammapy is a Python package built on Numpy and Astropy, so to use it effectively, you have to learn the basics. Many good free resources are available, e.g. A Whirlwind tour of Python, the Python data science handbook and the Astropy Hands-On Tutorial.

Getting started

The following tutorials show how to use gammapy to perform a complete data analysis, here a simple 3D cube analysis of the Crab. They show the gammapy workflow from data selection to data reduction and finally modeling and fitting.

First, we show how to do it with the high level interface in configuration-driven approach. The second tutorial exposes the same analysis, this time using the medium level API, showing what is happening ‘under-the-hood’:

Core tutorials

The following tutorials expose common analysis tasks.

Accessing and exploring DL3 data

1-dim spectral analysis

2-dim sky image analysis

3-dim sky cube analysis

Time-dependent analysis


Advanced tutorials

The following tutorials expose how to perform more complex analyses or they demonstrate how to use the Gammapy API.

Exclusion masks

Source detection

Spectral analysis

Multi-instrument analysis

Sensitivity estimation

Modeling and fitting in gammapy

Working with catalogs

Working with gammapy maps


Examples how to run Gammapy via Python scripts:

Extra topics

These notebooks contain examples on some more specialised functionality in Gammapy.