Tutorial notebooks¶
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 and download
the tutorial notebooks and example datasets. The setup steps are described in
Getting Started. Once Gammapy installed, remember that you can always use
gammapy info
to check your setup.
Notebooks¶
For a quick introduction to Gammapy, go here:
- First steps with Gammapy | first_steps.ipynb
- Introduction to gammapy.maps | intro_maps.ipynb
Interested to do a first analysis of simulated CTA data?
- CTA first data challenge (1DC) with Gammapy | cta_1dc_introduction.ipynb
- CTA data analysis with Gammapy | cta_data_analysis.ipynb
To get started with H.E.S.S. data analysis see here:
- H.E.S.S. with Gammapy | hess.ipynb
3-dimensional cube analysis:
- 3D analysis | analysis_3d.ipynb
- Joint 3D analysis | analysis_3d_joint.ipynb
- 3D simulation and fitting | simulate_3d.ipynb
- Fermi-LAT data with Gammapy | fermi_lat.ipynb
2-dimensional sky image analysis:
- Source detection with Gammapy (Fermi-LAT data example) | detect_ts.ipynb
- CTA 2D source fitting with Gammapy (DC 1 example) | image_analysis.ipynb
- CTA 2D source fitting with Sherpa | image_fitting_with_sherpa.ipynb
1-dimensional spectral analysis:
- Spectral models in Gammapy | spectrum_models.ipynb
- Spectral analysis with Gammapy (run pipeline) (H.E.S.S. data example) | spectrum_pipe.ipynb
- Spectral analysis with Gammapy (individual steps) (H.E.S.S. data example) | spectrum_analysis.ipynb
- Fitting gammapy spectra with sherpa | spectrum_fitting_with_sherpa.ipynb
- Flux point fitting with Gammapy | sed_fitting_gammacat_fermi.ipynb
Time-dependent analysis:
- Light curves | light_curve.ipynb
Sensitivity:
- Compute the CTA sensitivity | cta_sensitivity.ipynb
Extra topics¶
These notebooks contain examples on some more specialised functionality in Gammapy.
- H.E.S.S. Galactic plane survey (HGPS) data | hgps.ipynb
- Astrophysical source population modeling with Gammapy | source_population_model.ipynb
- Continuous wavelet transform on gamma-ray images | cwt.ipynb
- Dark matter spatial and spectral models | astro_dark_matter.ipynb
- Make template background model | background_model.ipynb
- MCMC sampling of Gammapy models using the emcee package | mcmc_sampling.ipynb
- Pulsar analysis with Gammapy | pulsar_analysis.ipynb
Basics¶
Gammapy is a Python package built on Numpy and Astropy, so for now you have to learn a bit of Python, Numpy and Astropy to be able to use Gammapy. To make plots you have to learn a bit of matplotlib.
We plan to add a very simple to use high-level interface to Gammapy where you just have to adjust a config file, but that isn’t available yet.
Here are some great resources:
- Python: A Whirlwind tour of Python
- IPython, Jupyter, Numpy, matplotlib: Python data science handbook
- Astropy introduction for Gammapy users | astropy_introduction.ipynb
- Astropy Hands On (1st ASTERICS-OBELICS International School)
Other useful resources: