Updated light curve tutorial
"source": [
"# Light curve estimation\n",
"\n",
- "## Introduction\n",
+ "## Prerequisites\n",
"\n",
- "This tutorial presents how light curve extraction is performed in gammapy. \n",
+ "- Knowledge of the high level interface to perform data reduction, see [first gammapy analysis with the high level interface tutorial](analysis_1.ipynb)\n",
"\n",
- "We will demonstrate how to compute a `~gammapy.time.LightCurve` from 3D reduced datasets (`~gammapy.cube.MapDataset`) as well as 1D ON-OFF spectral datasets (`~gammapy.spectrum.SpectrumDatasetOnOff`). \n",
+ "## Context\n",
"\n",
- "The data reduction will be performed with the high level interface for the data reduction. Then we will use the `~gammapy.time.LightCurveEstimator` class, which is able to extract a light curve independently of the dataset type. \n",
+ "This tutorial presents how light curve extraction is performed in gammapy, i.e. how to measure the flux of a source\n",
+ "in different time bins.\n",
+ "\n",
+ "Cherenkov telescopes usually work with observing runs and distribute data according to this basic time interval. A typical use case is to look for variability of a source on various time binnings: observation run-wise binning, nightly, weekly etc.\n",
+ "\n",
+ "**Objective: The Crab nebula is not known to be variable at TeV energies, so we expect constant brightness within statistical and systematic errors. Compute per-observation and nightly fluxes of the four Crab nebula observations from the [H.E.S.S. first public test data release](https://www.mpi-hd.mpg.de/hfm/HESS/pages/dl3-dr1/) to check it.**\n",
"\n",
- "We will compute two LCs: one per observing run and one per night.\n",
+ "## Proposed approach\n",
"\n",
- "We will use the four Crab nebula observations from the [H.E.S.S. first public test data release](https://www.mpi-hd.mpg.de/hfm/HESS/pages/dl3-dr1/) and compute per-observation fluxes. The Crab nebula is not known to be variable at TeV energies, so we expect constant brightness within statistical and systematic errors."
+ "We will demonstrate how to compute a `~gammapy.time.LightCurve` from 3D reduced datasets (`~gammapy.cube.MapDataset`) as well as 1D ON-OFF spectral datasets (`~gammapy.spectrum.SpectrumDatasetOnOff`). \n",
+ "\n",
+ "The data reduction will be performed with the high level interface for the data reduction. Then we will use the `~gammapy.time.LightCurveEstimator` class, which is able to extract a light curve independently of the dataset type. \n",
+ "\n"
]
},
{
"nightwise_lc.plot()"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## What next?\n",
+ "\n",
+ "When sources are bight enough to look for variability at small time scales, the per-observation time binning is no longer relevant. One can easily extend the light curve estimation approach presented above to any time binning. This is demonstrated in the [following tutorial](light_curve_flare.ipynb) which shows the extraction of the lightcurve of an AGN flare."
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
