Skip to content

Commit

Permalink
Merge pull request #3281 from adonath/workflow_overview
Browse files Browse the repository at this point in the history
Refactor and shorten overview docs page
  • Loading branch information
adonath committed Mar 23, 2021
2 parents 9543f82 + b913a31 commit 3f79b2c
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 232 deletions.
Binary file added docs/_static/data-flow-gammapy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

plot_html_show_source_link = False

numfig = False

# -- General configuration ----------------------------------------------------

Expand Down
14 changes: 14 additions & 0 deletions docs/data/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,24 @@ data - DL3 data access and observations

Introduction
============
IACT data is typically structured in "observations", which define a given
time interval during with the instrument response is considered stable.


`gammapy.data` currently contains the `~gammapy.data.EventList` class,
as well as classes for IACT data and observation handling.


The main classes in Gammapy to access the DL3 data library are the
`~gammapy.data.DataStore` and `~gammapy.data.Observation`.
They are used to store and retrieve dynamically the datasets
relevant to any observation (event list in the form of an `~gammapy.data.EventList`,
IRFs see :ref:`irf` and other relevant informations).

Once some observation selection has been selected, the user can build a list of observations:
a `~gammapy.data.Observations` object, which will be used for the data reduction process.


Getting Started
===============

Expand Down
5 changes: 5 additions & 0 deletions docs/datasets/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ the ``wstat`` fit statistic. The `~gammapy.datasets.FluxPointsDataset` contains
`~gammapy.estimatorsFluxPoints` and a spectral model, the fit statistic used is
``chi2``.

Note that in Gammapy, 2D image analyses are done with 3D cubes with a single
energy bin, e.g. for modeling and fitting,
see the `2D map analysis tutorial <./tutorials/image_analysis.html>`__.


Getting Started
===============

Expand Down
7 changes: 7 additions & 0 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ lists the common commands to install packages and work with environments.

Use Gammapy
-----------
To use Gammapy you need a basic knowledge of Python, Numpy, Astropy, as well as
matplotlib for plotting. Many standard gamma-ray analyses can be done with few
lines of configuration and code, so you can get pretty far by copy and pasting
and adapting the working examples from the Gammapy documentation. But
eventually, if you want to script more complex analyses, or inspect analysis
results or intermediate analysis products, you need to acquire a basic to
intermediate Python skill level.

Python
++++++
Expand Down
9 changes: 7 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ Gammapy
-------

Gammapy is a community-developed, open-source Python package for gamma-ray
astronomy. It is a prototype for the `CTA`_ science tools. This webpage contains
the Gammapy documentation. You may also check out the `Gammapy webpage <https://gammapy.org>`_
astronomy built on Numpy, Scipy and Astropy. It is a prototype for the `CTA`_ science tools
and can also be used to analyse data from existing imaging atmospheric Cherenkov telescopes
(IACTs), such as `H.E.S.S.`_, `MAGIC`_ and `VERITAS`_. It also provides some support
for `Fermi-LAT`_ and `HAWC`_ data analysis.

This webpage contains the Gammapy documentation. You may also check out the `Gammapy webpage <https://gammapy.org>`_
where you may find more information about Gammapy, including the
`list of releases <https://gammapy.org/news.html#releases>`_ and contact information if you
have any questions, want to report and issue or request a feature, or need help with anything
Gammapy-related.


.. _gammapy_intro:
.. toctree::
:caption: Getting Started
Expand Down
6 changes: 5 additions & 1 deletion docs/irf/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ irf - Instrument response functions

Introduction
============
For a definition of the response function you are invited to read
Typically the IRFs are stored in the form of multidimensional tables giving
the response functions such as the distribution of gamma-like events or the
probability density functions of the reconstructed energy and position.

For a more detailed definition of the response function you are invited to read
:ref:`irf-theory`.

`gammapy.irf` handles the following instrument response functions (IRFs):
Expand Down
17 changes: 13 additions & 4 deletions docs/irf/plot_edisp_kernel_param.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
"""Plot an energy dispersion using a gaussian parametrisation"""
import numpy as np
import astropy.units as u
import matplotlib.pyplot as plt
from gammapy.irf import EDispKernel
from gammapy.maps import MapAxis

energy = np.logspace(0, 1, 101) * u.TeV
edisp = EDispKernel.from_gauss(energy=energy, energy_true=energy, sigma=0.1, bias=0,)
energy_axis = MapAxis.from_energy_bounds("1 TeV", "10 TeV", nbin=10)
energy_axis_true = MapAxis.from_energy_bounds(
"0.5 TeV", "30 TeV", nbin=10, per_decade=True, name="energy_true"
)


edisp = EDispKernel.from_gauss(
energy_axis=energy_axis,
energy_axis_true=energy_axis_true,
sigma=0.1,
bias=0
)
edisp.peek()
plt.show()
2 changes: 0 additions & 2 deletions docs/makers/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,6 @@ offset-cut later, you can also choose a larger width of the cutout
than `2 * offset_max`.




Using `gammapy.makers`
======================

Expand Down

0 comments on commit 3f79b2c

Please sign in to comment.