# Gammapy tutorial notebooks¶

## What is this?¶

- This is an overview of tutorial
`Jupyter`

notebooks for`Gammapy`

, a Python package for gamma-ray astronomy. - The notebooks complement the Gammapy Sphinx-based documentation at http://docs.gammapy.org
- You can read a static HTML version of these notebooks (i.e. code
can’t be executed) online
`here`

. - The notebooks and example datasets are available at https://github.com/gammapy/gammapy-extra

## Set up¶

If you want to execute the notebooks locally, to play around with the
examples, or to try to do one of the exercises, you have to first
install Gammapy and get the `gammapy-extra`

repository. This is
described in Gammapy tutorial
setup.

## The basics¶

Gammapy is a Python package built on Numpy and Astropy, and the tutorials are Jupyter notebooks. If you’re already familar with those, you can skip to the next section and start learning about Gammapy.

If you’re new to Python or scientific Python, we can recommmend the following resources:

- A Whirlwind tour of Python (learn Python)
- Python data science handbook (learn IPython, Numpy, matplotlib)
- Scipy lectures (another intro to scientific Python)

If you’re new to Astropy, here’s some good resources:

## Notebooks¶

If you’re new to Astro (haven’t used `Table`

, `SkyCoord`

and
`Time`

much), start here:

For a quick introduction to Gammapy, go here:

Interested to do a first analysis of simulated CTA data?

To learn how to work with gamma-ray data with Gammapy:

- IACT DL3 data with Gammapy (H.E.S.S data example)
- Fermi-LAT data with Gammapy (Fermi-LAT data example)

2-dimensional sky image analysis:

- Image analysis with Gammapy (run pipeline) (H.E.S.S. data example)
- Image analysis with Gammapy (individual steps) (H.E.S.S. data example)
- Source detection with Gammapy (Fermi-LAT data example)

1-dimensional spectral analysis:

- Spectral models in Gammapy
- Spectral analysis with Gammapy (run pipeline) (H.E.S.S. data example)
- Spectral analysis with Gammapy (individual steps) (H.E.S.S. data example)
- Spectrum simulation and fitting (CTA data example with AGN / EBL)
- Flux point fitting with Gammapy

3-dimensional cube analysis:

- Cube analysis with Gammapy (part 1) - compute cubes and mean PSF / EDISP
- Cube analysis with Gammapy (part 2) - likelihood fit

Time-related analysis:

- Light curve estimation with Gammapy
- Time analysis with Gammapy (not written yet)

### Extra topics¶

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

Most users will not need them. It doesn’t make much sense that you read through all of them, but maybe browse the list and see if there’s something that could be interesting for your work (or contribute to Gammapy if something is missing!).

### Work in progress¶

The following notebooks are work in progress or broken.

Please help make these better, or write new, better ones!

- TODO: joint Fermi-IACT analysis with Gammpy
- TODO: simulate Fermi and CTA sky with Gammapy
- Astrophysical source population modeling with Gammapy
- Source catalogs : Working with gamma-ray source catalogs
- Diffuse model computation : Diffuse model computation
- Fermi Vela model : Fermi Vela model
- Simulating and analysing sources and diffuse emission

### List of notebooks¶

Here’s a complete list of all notebooks. Note that some are for experts and debugging. All end-user notebooks are listed above grouped by topic.

- Astropy introduction for Gammapy users
- Template background model production with Gammapy
- CTA first data challenge (1DC) with Gammapy
- CTA data analysis with Gammapy
- Computation of the CTA sensitivity
- CTA simulation tools
- Cube analysis with Gammapy (part 1)
- Cube analysis with Gammapy (part 2)
- CWT Algorithm
- Fermi-LAT data with Gammapy
- IACT DL3 data with Gammapy
- Source detection with Gammapy
- Diffuse model computation
- Compute some numbers to check if this looks OK
- Gammapy IPython notebook : Fermi-LAT Vela region model
- Getting started with Gammapy
- Image analysis with Gammapy
- Background modeling
- CTA 2D source fitting with Sherpa
- Image analysis with Gammapy (run pipeline)
- Example of light curve
- How to use the NDDataArray class
- Flux point fitting in Gammapy
- Gamma-ray source catalogs with Gammapy
- Simulating and analysing sources and diffuse emission
- Astrophysical source population modeling with Gammapy
- Spectral analysis with Gammapy
- Fitting gammapy spectra with sherpa
- Spectral models in Gammapy
- Spectrum analysis with Gammapy (run pipeline)
- Spectrum simulation with Gammapy
- Spectrum simulation for CTA
- Time analysis with Gammapy
- Gammapy tutorial setup
- Rapid introduction on using numpy, scipy, matplotlib