Updated analysis_1
"cell_type": "markdown",
"metadata": {},
"source": [
- "# First analysis\n",
+ "# First analysis with gammapy high level interface\n",
"\n",
- "This notebook shows a simple example of a Crab analysis using the H.E.S.S. DL3 data release 1. It reduces the data to cube datasets and performs a simple 3D model fitting of the Crab nebula.\n",
+ "## Prerequisites:\n",
"\n",
- "It uses the high level `Analysis` class to orchestrate data reduction. In its current state, `Analysis` supports the standard analysis cases of joint or stacked 3D and 1D analyses. It is instantiated with an `AnalysisConfig` object that gives access to analysis parameters either directly or via a YAML config file. \n",
+ "- Understanding the gammapy data workflow, in particular what are DL3 events and intrument response functions (IRF).\n",
+ "\n",
+ "## Context\n",
+ "\n",
+ "This notebook is an introduction to gammapy analysis using the high level interface. \n",
+ "\n",
+ "Gammapy analysis consists in two main steps. \n",
+ "\n",
+ "The first one is data reduction: user selected observations are reduced to a geometry defined by the user. \n",
+ "It can be 1D (spectrum from a given extraction region) or 3D (with a sky projection and an energy axis). \n",
+ "The resulting reduced data and instrument response functions (IRF) are called datasets in Gammapy.\n",
+ "\n",
+ "The second step consists in setting a physical model on the datasets and fitting it to obtain relevant physical informations.\n",
+ "\n",
+ "\n",
+ "**Objective: Create a 3D dataset of the Crab using the H.E.S.S. DL3 data release 1 and perform a simple model fitting of the Crab nebula.**\n",
+ "\n",
+ "## Proposed approach:\n",
+ "\n",
+ "This notebook uses the high level `Analysis` class to orchestrate data reduction. In its current state, `Analysis` supports the standard analysis cases of joint or stacked 3D and 1D analyses. It is instantiated with an `AnalysisConfig` object that gives access to analysis parameters either directly or via a YAML config file. \n",
"\n",
"To see what is happening under-the-hood and to get an idea of the internal API, a second notebook performs the same analysis without using the `Analysis` class. \n",
"\n",
- "We will first show how to configure and run a stacked 3D analysis. The structure of the tutorial follows a typical analysis:\n",
+ "In summary, we have to:\n",
"\n",
- "- Analysis configuration\n",
+ "- Create an `~gammapy.analysis.AnalysisConfig` object and edit it to define the analysis configuration:\n",
+ " - Define what observations to use\n",
+ " - Define the geometry of the dataset (data and IRFs)\n",
+ " - Define the model we want to fit on the dataset.\n",
+ "- Instantiate a `~gammapy.analysis.Analysis` from this configuration and run the different analysis steps\n",
" - Observation selection\n",
" - Data reduction\n",
" - Model fitting\n",
