added bins per decade, clarified intro
"\n",
"## Context\n",
"\n",
- "While 3D analysis allows in principle to deal with complex situations such as overlapping sources, in many cases, it is not required to extract the spectrum of a source. Spectral analysis, where all data inside a ON region are binned into 1D datasets, provides a nice alternative. \n",
+ "While 3D analyses allow in principle to consider complex field of views containing overlapping gamma-ray sources, in many cases we might have an observation with a single, strong, point-like source in the field of view. A spectral analysis, in that case, might consider all the events inside a source (or ON) region and bin them in energy only, obtaining 1D datasets. \n",
"\n",
- "In classical Cherenkov astronomy, it is used with a specific background estimation technique that relies on OFF measurements taken in the field-of-view in regions where the background\n",
- "rate is assumed to be equal to the one in the ON region. \n",
+ "In classical Cherenkov astronomy, the background estimation technique associated with this method measures the number of events in OFF regions taken in regions of the field-of-view devoid of gamma-ray emitters, where the background rate is assumed to be equal to the one in the ON region. \n",
"\n",
"This allows to use a specific fit statistics for ON-OFF measurements, the wstat (see `~gammapy.stats.fit_statistics`), where no background model is assumed. Background is treated as a set of nuisance parameters. This removes some systematic effects connected\n",
"to the choice or the quality of the background model. But this comes at the expense of larger statistical uncertainties on the fitted model parameters.\n",
"outputs": [],
"source": [
"energy_axis = MapAxis.from_energy_bounds(\n",
- " 0.1, 40, 40, unit=\"TeV\", name=\"energy\"\n",
+ " 0.1, 40, nbin=15, per_decade=True, unit=\"TeV\", name=\"energy\"\n",
")\n",
"energy_axis_true = MapAxis.from_energy_bounds(\n",
- " 0.05, 100, 30, unit=\"TeV\", name=\"energy_true\"\n",
+ " 0.05, 100, nbin=20, per_decade=True, unit=\"TeV\", name=\"energy_true\"\n",
")\n",
"\n",
"geom = RegionGeom.create(region=on_region, axes=[energy_axis])\n",
