Use required_irf="point-like" in rad max tutorial
"* if the same $\\theta$ cut is applied at all energies and offsets, [a `RAD_MAX` keyword](https://gamma-astro-data-formats.readthedocs.io/en/latest/irfs/point_like/#rad-max) is added to the header of the data units containing IRF components. This should be used to define the size of the ON and OFF regions;\n",
"* in case an energy- (and offset-) dependent $\\theta$ cut is applied, its values are stored in additional `FITS` data unit, named [`RAD_MAX_2D`](https://gamma-astro-data-formats.readthedocs.io/en/latest/irfs/point_like/#rad-max-2d). \n",
"\n",
- "`Gammapy` provides a class to automatically read this values, `~gammapy.irf.RadMax2D`, for both cases (fixed or energy-dependent $\\theta$ cut). In this notebook we will focus on how to perform a spectral extraction with a point-like IRF with an energy-dependent $\\theta$ cut. We remark that in this case a `~regions.PointSkyRegion` (and not a `~regions.CircleSkyRegion`) should be used to define the ON region. If a geometry based on a `~regions.PointSkyRegion` is fed to the spectra and the background `Makers`, the latter will automatically use the values stored in the `RAD_MAX` keyword / table for defining the size of the ON and OFF regions.\n",
+ "`Gammapy` provides a class to automatically read these values, `~gammapy.irf.RadMax2D`, for both cases (fixed or energy-dependent $\\theta$ cut). In this notebook we will focus on how to perform a spectral extraction with a point-like IRF with an energy-dependent $\\theta$ cut. We remark that in this case a `~regions.PointSkyRegion` (and not a `~regions.CircleSkyRegion`) should be used to define the ON region. If a geometry based on a `~regions.PointSkyRegion` is fed to the spectra and the background `Makers`, the latter will automatically use the values stored in the `RAD_MAX` keyword / table for defining the size of the ON and OFF regions.\n",
"\n",
"Beside the definition of the ON region during the data reduction, the remaining steps are identical to the other [1D spectral analysis example](spectral_analysis.ipynb), so we will not detail the data reduction steps already presented in the other tutorial.\n",
"\n",
"outputs": [],
"source": [
"data_store = DataStore.from_dir(\"$GAMMAPY_DATA/magic/rad_max/data\")\n",
- "observations = data_store.get_observations(\n",
- " required_irf=[\"aeff\", \"edisp\", \"rad_max\"]\n",
- ")"
+ "observations = data_store.get_observations(required_irf=\"point-like\")"
]
},
{
"plt.legend()\n",
"plt.ylim([1e-13, 1e-10])"
]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": []
}
],
"metadata": {
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.0"
+ "version": "3.8.12"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
