Tutorials and Examples

We currently have three places for Gammapy tutorials and examples:

  1. Python scripts with Sphinx documentation in the docs/tutorials folder in the gammapy repo.
  2. Python scripts without inline comments only in the examples folder in the gammapy repo.
  3. IPython notebooks in the notebooks folder in the gammapy-extra repo.

Each of these solutions has advantages / disadvantages, we might consolidate this in the future as the tooling to convert between these formats improves.

Python example scripts with Sphinx documentation

The tutorials show some real-world usage examples of the Gammapy Python package and / or command line tools.

Python example scripts

The examples folder in the gammapy repo contains small Python scripts illustrating how to use Gammapy.

Note

For now the full list of examples is only available here: https://github.com/gammapy/gammapy/tree/master/examples

We plan to integrate that into the online Sphinx docs ... please help if you know how to do this: https://github.com/gammapy/gammapy/issues/172

IPython notebooks

The IPython notebooks are in the gammapy-extra repo, see here.

External

Here’s some links to good external resources to learn Python, Numpy, Scipy, Astropy, ...

Python is very popular in astronomy (and data science in general). It’s possible to learn the basics within a day and to become productive within a week.