Skip to content

Commit

Permalink
commit docs dev version
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Apr 9, 2024
1 parent 9336c66 commit 8666e22
Show file tree
Hide file tree
Showing 407 changed files with 1,150 additions and 1,116 deletions.
2 changes: 1 addition & 1 deletion docs/dev/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: f24a531e77cf224f324d9627ee2ee37f
config: 8e5b1a17777fd847e8364870d57269f5
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/dev/.doctrees/api/gammapy.data.EventListMetaData.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/.doctrees/api/gammapy.estimators.FluxMetaData.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/.doctrees/api/gammapy.maps.containment_region.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/dev/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/sg_execution_times.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/analysis-1d/cta_sensitivity.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/analysis-1d/sed_fitting.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/analysis-2d/detect.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/analysis-2d/modeling_2D.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/analysis-2d/ring_background.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/analysis-3d/analysis_3d.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/analysis-3d/analysis_mwl.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/analysis-3d/event_sampling.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/analysis-3d/flux_profiles.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/analysis-3d/simulate_3d.doctree
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/analysis-time/light_curve.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/api/astro_dark_matter.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/api/catalog.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/api/datasets.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/api/fitting.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/api/makers.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/api/maps.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/api/mask_maps.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/api/model_management.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/api/models.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/api/observation_clustering.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/api/priors.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/api/sg_execution_times.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/data/cta.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/data/fermi_lat.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/data/hawc.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/data/hess.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/data/sg_execution_times.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/scripts/sg_execution_times.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/starting/analysis_1.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/starting/analysis_2.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/starting/overview.doctree
Binary file not shown.
Binary file modified docs/dev/.doctrees/tutorials/starting/sg_execution_times.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
21 changes: 11 additions & 10 deletions docs/dev/_downloads/1574af02de7a1c335664819e66ace9e7/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@
######################################################################
# To access the energy range defined by the mask you can use:
#
# -`~gammapy.datasets.MapDataset.energy_range_safe` : energy range defined by the `~gammapy.datasets.MapDataset.mask_safe`
# - `~gammapy.datasets.MapDataset.energy_range_fit` : energy range defined by the `~gammapy.datasets.MapDataset.mask_fit`
# - `~gammapy.datasets.MapDataset.energy_range` : the final energy range used in likelihood computation
# - `~gammapy.datasets.MapDataset.energy_range_safe` : energy range defined by the `~gammapy.datasets.MapDataset.mask_safe`
# - `~gammapy.datasets.MapDataset.energy_range_fit` : energy range defined by the `~gammapy.datasets.MapDataset.mask_fit`
# - `~gammapy.datasets.MapDataset.energy_range` : the final energy range used in likelihood computation
#
# These methods return two maps, with the `min` and `max` energy
# values at each spatial pixel
Expand All @@ -324,7 +324,7 @@
######################################################################
# Just as for `~gammapy.maps.Map` objects it is possible to cutout a whole
# `~gammapy.datasets.MapDataset`, which will perform the cutout for all maps in
# parallel.Optionally one can provide a new name to the resulting dataset:
# parallel. Optionally one can provide a new name to the resulting dataset:
#

cutout = dataset_cta.cutout(
Expand Down Expand Up @@ -417,8 +417,8 @@
# ---------------
#
# `~gammapy.datasets.SpectrumDataset` inherits from a `~gammapy.datasets.MapDataset`, and is specially
# adapted for 1D spectral analysis, and uses a `RegionGeom` instead of a
# `WcsGeom`. A `~gammapy.datasets.MapDataset` can be converted to a `~gammapy.datasets.SpectrumDataset`,
# adapted for 1D spectral analysis, and uses a `~gammapy.maps.RegionGeom` instead of a
# `~gammapy.maps.WcsGeom`. A `~gammapy.datasets.MapDataset` can be converted to a `~gammapy.datasets.SpectrumDataset`,
# by summing the `counts` and `background` inside the `on_region`,
# which can then be used for classical spectral analysis. Containment
# correction is feasible only for circular regions.
Expand Down Expand Up @@ -485,7 +485,7 @@
######################################################################
#
# For an example of fitting `~gammapy.estimators.FluxPoints`, see :doc:`/tutorials/analysis-1d/sed_fitting`,
# and for using source catalogs see :doc:`/tutorials/api/catalog`
# and for using source catalogs see :doc:`/tutorials/api/catalog`.
#


Expand All @@ -499,11 +499,12 @@
#
# For modelling and fitting of a list of `~gammapy.datasets.Dataset` objects, you can
# either:
# (a) Do a joint fitting of all the datasets together OR
# (b) Stack the datasets together, and then fit them.
#
# - (A) Do a joint fitting of all the datasets together **OR**
# - (B) Stack the datasets together, and then fit them.
#
# `~gammapy.datasets.Datasets` is a convenient tool to handle joint fitting of
# simultaneous datasets. As an example, please see :doc:`/tutorials/analysis-3d/analysis_mwl`
# simultaneous datasets. As an example, please see :doc:`/tutorials/analysis-3d/analysis_mwl`.
#
# To see how stacking is performed, please see :ref:`stack`.
#
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -247,4 +247,4 @@
plt.show()


# sphinx_gallery_thumbnail_number = 2
# sphinx_gallery_thumbnail_number = 1
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/_downloads/432ee3a608125ae95df2e8d950f07716/dl3-1.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,13 @@
# Define the geometries
# ~~~~~~~~~~~~~~~~~~~~~
#
# This part is especially important. - We have to define first energy
# axes. They define the axes of the resulting
# `~gammapy.datasets.SpectrumDatasetOnOff`. In particular, we have to be
# careful to the true energy axis: it has to cover a larger range than the
# reconstructed energy one. - Then we define the region geometry itself
# from the on region.
# This part is especially important.
#
# - We have to define first energy axes. They define the axes of the resulting
# `~gammapy.datasets.SpectrumDatasetOnOff`. In particular, we have to be
# careful to the true energy axis: it has to cover a larger range than the
# reconstructed energy one.
# - Then we define the region geometry itself from the on region.
#

# The binning of the final spectrum is defined here.
Expand Down Expand Up @@ -212,12 +213,12 @@
# Perform the data reduction loop.
# --------------------------------
#
# We can now run over selected observations. For each of them, we: -
# create the `~gammapy.datasets.SpectrumDataset` - Compute the OFF via
# the reflected background method and create a
# `~gammapy.datasets.SpectrumDatasetOnOff` object - Run the safe mask
# maker on it - Add the `~gammapy.datasets.SpectrumDatasetOnOff` to the
# list.
# We can now run over selected observations. For each of them, we:
#
# - Create the `~gammapy.datasets.SpectrumDataset`
# - Compute the OFF via the reflected background method and create a `~gammapy.datasets.SpectrumDatasetOnOff` object
# - Run the safe mask maker on it
# - Add the `~gammapy.datasets.SpectrumDatasetOnOff` to the list.
#

# %%time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"To access the energy range defined by the mask you can use:\n\n-`~gammapy.datasets.MapDataset.energy_range_safe` : energy range defined by the `~gammapy.datasets.MapDataset.mask_safe`\n- `~gammapy.datasets.MapDataset.energy_range_fit` : energy range defined by the `~gammapy.datasets.MapDataset.mask_fit`\n- `~gammapy.datasets.MapDataset.energy_range` : the final energy range used in likelihood computation\n\nThese methods return two maps, with the `min` and `max` energy\nvalues at each spatial pixel\n\n\n"
"To access the energy range defined by the mask you can use:\n\n- `~gammapy.datasets.MapDataset.energy_range_safe` : energy range defined by the `~gammapy.datasets.MapDataset.mask_safe`\n- `~gammapy.datasets.MapDataset.energy_range_fit` : energy range defined by the `~gammapy.datasets.MapDataset.mask_fit`\n- `~gammapy.datasets.MapDataset.energy_range` : the final energy range used in likelihood computation\n\nThese methods return two maps, with the `min` and `max` energy\nvalues at each spatial pixel\n\n\n"
]
},
{
Expand Down Expand Up @@ -425,7 +425,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Just as for `~gammapy.maps.Map` objects it is possible to cutout a whole\n`~gammapy.datasets.MapDataset`, which will perform the cutout for all maps in\nparallel.Optionally one can provide a new name to the resulting dataset:\n\n\n"
"Just as for `~gammapy.maps.Map` objects it is possible to cutout a whole\n`~gammapy.datasets.MapDataset`, which will perform the cutout for all maps in\nparallel. Optionally one can provide a new name to the resulting dataset:\n\n\n"
]
},
{
Expand Down Expand Up @@ -569,7 +569,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## SpectrumDataset\n\n`~gammapy.datasets.SpectrumDataset` inherits from a `~gammapy.datasets.MapDataset`, and is specially\nadapted for 1D spectral analysis, and uses a `RegionGeom` instead of a\n`WcsGeom`. A `~gammapy.datasets.MapDataset` can be converted to a `~gammapy.datasets.SpectrumDataset`,\nby summing the `counts` and `background` inside the `on_region`,\nwhich can then be used for classical spectral analysis. Containment\ncorrection is feasible only for circular regions.\n\n\n"
"## SpectrumDataset\n\n`~gammapy.datasets.SpectrumDataset` inherits from a `~gammapy.datasets.MapDataset`, and is specially\nadapted for 1D spectral analysis, and uses a `~gammapy.maps.RegionGeom` instead of a\n`~gammapy.maps.WcsGeom`. A `~gammapy.datasets.MapDataset` can be converted to a `~gammapy.datasets.SpectrumDataset`,\nby summing the `counts` and `background` inside the `on_region`,\nwhich can then be used for classical spectral analysis. Containment\ncorrection is feasible only for circular regions.\n\n\n"
]
},
{
Expand Down Expand Up @@ -663,14 +663,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"For an example of fitting `~gammapy.estimators.FluxPoints`, see :doc:`/tutorials/analysis-1d/sed_fitting`,\nand for using source catalogs see :doc:`/tutorials/api/catalog`\n\n\n"
"For an example of fitting `~gammapy.estimators.FluxPoints`, see :doc:`/tutorials/analysis-1d/sed_fitting`,\nand for using source catalogs see :doc:`/tutorials/api/catalog`.\n\n\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Datasets\n\n`~gammapy.datasets.Datasets` are a collection of `~gammapy.datasets.Dataset` objects. They can be of the\nsame type, or of different types, eg: mix of `~gammapy.datasets.FluxPointsDataset`,\n`~gammapy.datasets.MapDataset` and `~gammapy.datasets.SpectrumDataset`.\n\nFor modelling and fitting of a list of `~gammapy.datasets.Dataset` objects, you can\neither:\n(a) Do a joint fitting of all the datasets together OR\n(b) Stack the datasets together, and then fit them.\n\n`~gammapy.datasets.Datasets` is a convenient tool to handle joint fitting of\nsimultaneous datasets. As an example, please see :doc:`/tutorials/analysis-3d/analysis_mwl`\n\nTo see how stacking is performed, please see `stack`.\n\nTo create a `~gammapy.datasets.Datasets` object, pass a list of `~gammapy.datasets.Dataset` on init, eg\n\n\n"
"## Datasets\n\n`~gammapy.datasets.Datasets` are a collection of `~gammapy.datasets.Dataset` objects. They can be of the\nsame type, or of different types, eg: mix of `~gammapy.datasets.FluxPointsDataset`,\n`~gammapy.datasets.MapDataset` and `~gammapy.datasets.SpectrumDataset`.\n\nFor modelling and fitting of a list of `~gammapy.datasets.Dataset` objects, you can\neither:\n\n- (A) Do a joint fitting of all the datasets together **OR**\n- (B) Stack the datasets together, and then fit them.\n\n`~gammapy.datasets.Datasets` is a convenient tool to handle joint fitting of\nsimultaneous datasets. As an example, please see :doc:`/tutorials/analysis-3d/analysis_mwl`.\n\nTo see how stacking is performed, please see `stack`.\n\nTo create a `~gammapy.datasets.Datasets` object, pass a list of `~gammapy.datasets.Dataset` on init, eg\n\n\n"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
},
"outputs": [],
"source": [
"empty_map = Map.create(\n skydir=spatial_model.position, frame=spatial_model.frame, width=1, binsz=0.02\n)\n\ncolors = [\"red\", \"blue\", \"green\", \"magenta\"]\n\nfig = plt.figure(figsize=(6, 4))\nax = empty_map.plot()\n\nlat_0 = results[\"energy_dependence\"][\"result\"][\"lat_0\"][1:]\nlat_0_err = results[\"energy_dependence\"][\"result\"][\"lat_0_err\"][1:]\nlon_0 = results[\"energy_dependence\"][\"result\"][\"lon_0\"][1:]\nlon_0_err = results[\"energy_dependence\"][\"result\"][\"lon_0_err\"][1:]\nsigma = results[\"energy_dependence\"][\"result\"][\"sigma\"][1:]\nsigma_err = results[\"energy_dependence\"][\"result\"][\"sigma_err\"][1:]\n\nfor i in range(len(lat_0)):\n model_plot = GaussianSpatialModel(\n lat_0=lat_0[i], lon_0=lon_0[i], sigma=sigma[i], frame=spatial_model.frame\n )\n model_plot.lat_0.error = lat_0_err[i]\n model_plot.lon_0.error = lon_0_err[i]\n model_plot.sigma.error = sigma_err[i]\n\n model_plot.plot_error(\n ax=ax,\n which=\"all\",\n kwargs_extension={\"facecolor\": colors[i], \"edgecolor\": colors[i]},\n kwargs_position={\"color\": colors[i]},\n )\nplt.show()\n\n\n# sphinx_gallery_thumbnail_number = 2"
"empty_map = Map.create(\n skydir=spatial_model.position, frame=spatial_model.frame, width=1, binsz=0.02\n)\n\ncolors = [\"red\", \"blue\", \"green\", \"magenta\"]\n\nfig = plt.figure(figsize=(6, 4))\nax = empty_map.plot()\n\nlat_0 = results[\"energy_dependence\"][\"result\"][\"lat_0\"][1:]\nlat_0_err = results[\"energy_dependence\"][\"result\"][\"lat_0_err\"][1:]\nlon_0 = results[\"energy_dependence\"][\"result\"][\"lon_0\"][1:]\nlon_0_err = results[\"energy_dependence\"][\"result\"][\"lon_0_err\"][1:]\nsigma = results[\"energy_dependence\"][\"result\"][\"sigma\"][1:]\nsigma_err = results[\"energy_dependence\"][\"result\"][\"sigma_err\"][1:]\n\nfor i in range(len(lat_0)):\n model_plot = GaussianSpatialModel(\n lat_0=lat_0[i], lon_0=lon_0[i], sigma=sigma[i], frame=spatial_model.frame\n )\n model_plot.lat_0.error = lat_0_err[i]\n model_plot.lon_0.error = lon_0_err[i]\n model_plot.sigma.error = sigma_err[i]\n\n model_plot.plot_error(\n ax=ax,\n which=\"all\",\n kwargs_extension={\"facecolor\": colors[i], \"edgecolor\": colors[i]},\n kwargs_position={\"color\": colors[i]},\n )\nplt.show()\n\n\n# sphinx_gallery_thumbnail_number = 1"
]
}
],
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/_downloads/84424d59ec624940199b69d87a792d50/index-1.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Define the geometries\n\nThis part is especially important. - We have to define first energy\naxes. They define the axes of the resulting\n`~gammapy.datasets.SpectrumDatasetOnOff`. In particular, we have to be\ncareful to the true energy axis: it has to cover a larger range than the\nreconstructed energy one. - Then we define the region geometry itself\nfrom the on region.\n\n\n"
"### Define the geometries\n\nThis part is especially important.\n\n- We have to define first energy axes. They define the axes of the resulting\n `~gammapy.datasets.SpectrumDatasetOnOff`. In particular, we have to be\n careful to the true energy axis: it has to cover a larger range than the\n reconstructed energy one.\n- Then we define the region geometry itself from the on region.\n\n\n"
]
},
{
Expand Down Expand Up @@ -155,7 +155,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Perform the data reduction loop.\n\nWe can now run over selected observations. For each of them, we: -\ncreate the `~gammapy.datasets.SpectrumDataset` - Compute the OFF via\nthe reflected background method and create a\n`~gammapy.datasets.SpectrumDatasetOnOff` object - Run the safe mask\nmaker on it - Add the `~gammapy.datasets.SpectrumDatasetOnOff` to the\nlist.\n\n\n"
"## Perform the data reduction loop.\n\nWe can now run over selected observations. For each of them, we:\n\n- Create the `~gammapy.datasets.SpectrumDataset`\n- Compute the OFF via the reflected background method and create a `~gammapy.datasets.SpectrumDatasetOnOff` object\n- Run the safe mask maker on it\n- Add the `~gammapy.datasets.SpectrumDatasetOnOff` to the list.\n\n\n"
]
},
{
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/_downloads/c6bad13b7bd034ce07497e4d5025d5d2/edisp-1.pdf
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Confidence contours\n\nIn most studies, one wishes to estimate parameters distribution using\nobserved sample data. A 1-dimensional confidence interval gives an\nestimated range of values which is likely to include an unknown\nparameter. A confidence contour is a 2-dimensional generalization of a\nconfidence interval, often represented as an ellipsoid around the\nbest-fit value.\n\nGammapy offers two ways of computing confidence contours, in the\ndedicated methods `~gammapy.modeling.Fit.minos_contour` and `~gammapy.modeling.Fit.stat_profile`. In\nthe following sections we will describe them.\n\n\n"
"## Confidence contours\n\nIn most studies, one wishes to estimate parameters distribution using\nobserved sample data. A 1-dimensional confidence interval gives an\nestimated range of values which is likely to include an unknown\nparameter. A confidence contour is a 2-dimensional generalization of a\nconfidence interval, often represented as an ellipsoid around the\nbest-fit value.\n\nGammapy offers two ways of computing confidence contours, in the\ndedicated methods `~gammapy.modeling.Fit.stat_contour` and `~gammapy.modeling.Fit.stat_profile`. In\nthe following sections we will describe them.\n\n\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"An important point to keep in mind is: *what does a $N\\sigma$\nconfidence contour really mean?* The answer is it represents the points\nof the parameter space for which the model likelihood is $N\\sigma$\nabove the minimum. But one always has to keep in mind that **1 standard\ndeviation in two dimensions has a smaller coverage probability than\n68%**, and similarly for all other levels. In particular, in\n2-dimensions the probability enclosed by the $N\\sigma$ confidence\ncontour is $P(N)=1-e^{-N^2/2}$.\n\n\n"
"An important point to keep in mind is: *what does a* $N\\sigma$\n*confidence contour really mean?* The answer is it represents the points\nof the parameter space for which the model likelihood is $N\\sigma$\nabove the minimum. But one always has to keep in mind that **1 standard\ndeviation in two dimensions has a smaller coverage probability than\n68%**, and similarly for all other levels. In particular, in\n2-dimensions the probability enclosed by the $N\\sigma$ confidence\ncontour is $P(N)=1-e^{-N^2/2}$.\n\n\n"
]
},
{
Expand Down Expand Up @@ -407,7 +407,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Computing contours using `~gammapy.modeling.Fit.stat_surface`\n\nThis alternative method for the computation of confidence contours,\nalthough more time consuming than `~gammapy.modeling.Fit.minos_contour()`, is expected\nto be more stable. It consists of a generalization of\n`~gammapy.modeling.Fit.stat_profile()` to a 2-dimensional parameter space. The algorithm\nis very simple: - First, passing two arrays of parameters values, a\n2-dimensional discrete parameter space is defined; - For each node of\nthe parameter space, the two parameters of interest are frozen. This\nway, a likelihood value ($-2\\mathrm{ln}\\,\\mathcal{L}$, actually)\nis computed, by either freezing (default) or fitting all nuisance\nparameters; - Finally, a 2-dimensional surface of\n$-2\\mathrm{ln}(\\mathcal{L})$ values is returned. Using that\nsurface, one can easily compute a surface of\n$TS = -2\\Delta\\mathrm{ln}(\\mathcal{L})$ and compute confidence\ncontours.\n\nLet\u2019s see it step by step.\n\nFirst of all, we can notice that this method is \u201cbackend-agnostic\u201d,\nmeaning that it can be run with MINUIT, sherpa or scipy as fitting\ntools. Here we will stick with MINUIT, which is the default choice:\n\nAs an example, we can compute the confidence contour for the `alpha`\nand `beta` parameters of the `dataset_hess`. Here we define the\nparameter space:\n\n\n"
"### Computing contours using `~gammapy.modeling.Fit.stat_surface`\n\nThis alternative method for the computation of confidence contours,\nalthough more time consuming than `~gammapy.modeling.Fit.stat_contour()`, is expected\nto be more stable. It consists of a generalization of\n`~gammapy.modeling.Fit.stat_profile()` to a 2-dimensional parameter space. The algorithm\nis very simple: - First, passing two arrays of parameters values, a\n2-dimensional discrete parameter space is defined; - For each node of\nthe parameter space, the two parameters of interest are frozen. This\nway, a likelihood value ($-2\\mathrm{ln}\\,\\mathcal{L}$, actually)\nis computed, by either freezing (default) or fitting all nuisance\nparameters; - Finally, a 2-dimensional surface of\n$-2\\mathrm{ln}(\\mathcal{L})$ values is returned. Using that\nsurface, one can easily compute a surface of\n$TS = -2\\Delta\\mathrm{ln}(\\mathcal{L})$ and compute confidence\ncontours.\n\nLet\u2019s see it step by step.\n\nFirst of all, we can notice that this method is \u201cbackend-agnostic\u201d,\nmeaning that it can be run with MINUIT, sherpa or scipy as fitting\ntools. Here we will stick with MINUIT, which is the default choice:\n\nAs an example, we can compute the confidence contour for the `alpha`\nand `beta` parameters of the `dataset_hess`. Here we define the\nparameter space:\n\n\n"
]
},
{
Expand Down
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 8666e22

Please sign in to comment.