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 Nov 12, 2024
1 parent 4822d7c commit 266a700
Show file tree
Hide file tree
Showing 1,092 changed files with 2,113 additions and 1,936 deletions.
Binary file not shown.
Binary file modified docs/dev/.doctrees/api/gammapy.estimators.FluxMetaData.doctree
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 modified docs/dev/.doctrees/tutorials/analysis-1d/ebl.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 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 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/estimators.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.
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/06ba2363ac6d8e23d2098c691bbc6e58/priors.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
)

plt.figure(figsize=(8, 6))
plt.subplots_adjust(bottom=0.2, left=0.2)
lc_1d.plot(marker="o")
plt.show()

Expand Down Expand Up @@ -116,7 +117,8 @@
print(relative_variability_significance)

######################################################################
# The variability amplitude as presented in `Heidt & Wagner, 1996 <https://ui.adsabs.harvard.edu/abs/1996A%26A...305...42H/abstract>`__ is:
# The variability amplitude as presented in
# `Heidt & Wagner, 1996 <https://ui.adsabs.harvard.edu/abs/1996A%26A...305...42H/abstract>`__ is:

variability_amplitude = np.sqrt((f_max - f_min) ** 2 - 2 * f_mean_err**2)

Expand All @@ -143,9 +145,9 @@
# Fractional excess variance, point-to-point fractional variance and doubling/halving time
# -----------------------------------------------------------------------------------------
# The fractional excess variance, as presented by
# `Vaughan et al., 2003 <https://ui.adsabs.harvard.edu/abs/2003MNRAS.345.1271V/abstract>`__, is a simple but effective
# method to assess the significance of a time variability feature in an object, for example an AGN flare.
# It is important to note that it requires Gaussian errors to be applicable.
# `Vaughan et al., 2003 <https://ui.adsabs.harvard.edu/abs/2003MNRAS.345.1271V/abstract>`__, is
# a simple but effective method to assess the significance of a time variability feature in an object,
# for example an AGN flare. It is important to note that it requires Gaussian errors to be applicable.
# The excess variance computation is implemented in `~gammapy.estimators.utils`.

fvar_table = compute_lightcurve_fvar(lc_1d)
Expand Down Expand Up @@ -176,7 +178,8 @@
# (`Scargle et al., 2013 <https://ui.adsabs.harvard.edu/abs/2013ApJ...764..167S/abstract>`__).
# A good and simple-to-use implementation of the algorithm is found in
# `astropy.stats.bayesian_blocks`.
# This implementation uses Gaussian statistics, as opposed to the `first introductory paper <https://iopscience.iop.org/article/10.1086/306064>`__
# This implementation uses Gaussian statistics, as opposed to the
# `first introductory paper <https://iopscience.iop.org/article/10.1086/306064>`__
# which is based on Poissonian statistics.
#
# By passing the flux and error on the flux as ``measures`` to the method we can obtain the list of optimal bin edges
Expand All @@ -190,27 +193,36 @@

######################################################################
# The result giving a significance estimation for variability in the lightcurve is the number of *change points*,
# i.e. the number of internal bin edges: if at least one change point is identified by the algorithm, there is significant variability.
# i.e. the number of internal bin edges: if at least one change point is identified by the algorithm,
# there is significant variability.

ncp = len(bayesian_edges) - 2
print(ncp)

######################################################################
# We can rebin the lightcurve to compute the one expected with bayesian edges
# First, we adjust the first and last bins of the bayesian_edges to coincide
# We can rebin the lightcurve to compute the one expected with bayesian edges.
# First, we adjust the first and last bins of the ``bayesian_edges`` to coincide
# with the original light curve start and end points.

# create a new axis
######################################################################
# Create a new axis:

axis_original = lc_1d.geom.axes["time"]
bayesian_edges[0] = axis_original.time_edges[0].value
bayesian_edges[-1] = axis_original.time_edges[-1].value
edges = Time(bayesian_edges, format="mjd", scale=axis_original.reference_time.scale)
axis_new = TimeMapAxis.from_time_edges(edges[:-1], edges[1:])

# rebin the lightcurve
######################################################################
# Rebin the lightcurve:

resample = lc_1d.resample_axis(axis_new)

# plot the new lightcurve on top of the old one
######################################################################
# Plot the new lightcurve on top of the old one:

plt.figure(figsize=(8, 6))
plt.subplots_adjust(bottom=0.2, left=0.2)
ax = lc_1d.plot(label="original")
resample.plot(ax=ax, marker="s", label="rebinned")
plt.legend()
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/_downloads/1370bd9099a95d65461f2a665bb9decd/catalog.zip
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.
Binary file not shown.
Binary file modified docs/dev/_downloads/21c6356dca773bb211972068bdd8edac/irfs.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/_downloads/277e8d586c77a3ac9f6ad21ecdfc3485/detect.zip
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/_downloads/3887251ea091cf5a495cbd0984520eec/hawc.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified docs/dev/_downloads/3edea76cb3aefe6dfce230edb07b24e2/models.zip
Binary file not shown.
Binary file modified docs/dev/_downloads/408398be7d2e8fce69b0c175dfb7db6c/hess.zip
Binary file not shown.
Binary file modified docs/dev/_downloads/42884adaf5dec1438e6da837d7acfad0/cta.zip
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.
Binary file not shown.
Binary file modified docs/dev/_downloads/4722787c7fa105f0833ba203665f472d/maps.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
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 @@ -40,7 +40,7 @@
},
"outputs": [],
"source": [
"lc_1d = FluxPoints.read(\n \"$GAMMAPY_DATA/estimators/pks2155_hess_lc/pks2155_hess_lc.fits\", format=\"lightcurve\"\n)\n\nplt.figure(figsize=(8, 6))\nlc_1d.plot(marker=\"o\")\nplt.show()"
"lc_1d = FluxPoints.read(\n \"$GAMMAPY_DATA/estimators/pks2155_hess_lc/pks2155_hess_lc.fits\", format=\"lightcurve\"\n)\n\nplt.figure(figsize=(8, 6))\nplt.subplots_adjust(bottom=0.2, left=0.2)\nlc_1d.plot(marker=\"o\")\nplt.show()"
]
},
{
Expand Down Expand Up @@ -83,7 +83,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The variability amplitude as presented in [Heidt & Wagner, 1996](https://ui.adsabs.harvard.edu/abs/1996A%26A...305...42H/abstract)_ is:\n\n"
"The variability amplitude as presented in\n[Heidt & Wagner, 1996](https://ui.adsabs.harvard.edu/abs/1996A%26A...305...42H/abstract)_ is:\n\n"
]
},
{
Expand All @@ -101,7 +101,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Fractional excess variance, point-to-point fractional variance and doubling/halving time\nThe fractional excess variance, as presented by\n[Vaughan et al., 2003](https://ui.adsabs.harvard.edu/abs/2003MNRAS.345.1271V/abstract)_, is a simple but effective\nmethod to assess the significance of a time variability feature in an object, for example an AGN flare.\nIt is important to note that it requires Gaussian errors to be applicable.\nThe excess variance computation is implemented in `~gammapy.estimators.utils`.\n\n"
"## Fractional excess variance, point-to-point fractional variance and doubling/halving time\nThe fractional excess variance, as presented by\n[Vaughan et al., 2003](https://ui.adsabs.harvard.edu/abs/2003MNRAS.345.1271V/abstract)_, is\na simple but effective method to assess the significance of a time variability feature in an object,\nfor example an AGN flare. It is important to note that it requires Gaussian errors to be applicable.\nThe excess variance computation is implemented in `~gammapy.estimators.utils`.\n\n"
]
},
{
Expand Down Expand Up @@ -155,7 +155,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Bayesian blocks\nThe presence of temporal variability in a lightcurve can be assessed by using bayesian blocks\n([Scargle et al., 2013](https://ui.adsabs.harvard.edu/abs/2013ApJ...764..167S/abstract)_).\nA good and simple-to-use implementation of the algorithm is found in\n`astropy.stats.bayesian_blocks`.\nThis implementation uses Gaussian statistics, as opposed to the [first introductory paper](https://iopscience.iop.org/article/10.1086/306064)_\nwhich is based on Poissonian statistics.\n\nBy passing the flux and error on the flux as ``measures`` to the method we can obtain the list of optimal bin edges\ndefined by the bayesian blocks algorithm.\n\n"
"## Bayesian blocks\nThe presence of temporal variability in a lightcurve can be assessed by using bayesian blocks\n([Scargle et al., 2013](https://ui.adsabs.harvard.edu/abs/2013ApJ...764..167S/abstract)_).\nA good and simple-to-use implementation of the algorithm is found in\n`astropy.stats.bayesian_blocks`.\nThis implementation uses Gaussian statistics, as opposed to the\n[first introductory paper](https://iopscience.iop.org/article/10.1086/306064)_\nwhich is based on Poissonian statistics.\n\nBy passing the flux and error on the flux as ``measures`` to the method we can obtain the list of optimal bin edges\ndefined by the bayesian blocks algorithm.\n\n"
]
},
{
Expand All @@ -173,7 +173,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The result giving a significance estimation for variability in the lightcurve is the number of *change points*,\ni.e. the number of internal bin edges: if at least one change point is identified by the algorithm, there is significant variability.\n\n"
"The result giving a significance estimation for variability in the lightcurve is the number of *change points*,\ni.e. the number of internal bin edges: if at least one change point is identified by the algorithm,\nthere is significant variability.\n\n"
]
},
{
Expand All @@ -191,7 +191,50 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We can rebin the lightcurve to compute the one expected with bayesian edges\nFirst, we adjust the first and last bins of the bayesian_edges to coincide\nwith the original light curve start and end points.\n\n"
"We can rebin the lightcurve to compute the one expected with bayesian edges.\nFirst, we adjust the first and last bins of the ``bayesian_edges`` to coincide\nwith the original light curve start and end points.\n\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Create a new axis:\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"axis_original = lc_1d.geom.axes[\"time\"]\nbayesian_edges[0] = axis_original.time_edges[0].value\nbayesian_edges[-1] = axis_original.time_edges[-1].value\nedges = Time(bayesian_edges, format=\"mjd\", scale=axis_original.reference_time.scale)\naxis_new = TimeMapAxis.from_time_edges(edges[:-1], edges[1:])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Rebin the lightcurve:\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"resample = lc_1d.resample_axis(axis_new)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Plot the new lightcurve on top of the old one:\n\n"
]
},
{
Expand All @@ -202,7 +245,7 @@
},
"outputs": [],
"source": [
"# create a new axis\naxis_original = lc_1d.geom.axes[\"time\"]\nbayesian_edges[0] = axis_original.time_edges[0].value\nbayesian_edges[-1] = axis_original.time_edges[-1].value\nedges = Time(bayesian_edges, format=\"mjd\", scale=axis_original.reference_time.scale)\naxis_new = TimeMapAxis.from_time_edges(edges[:-1], edges[1:])\n\n# rebin the lightcurve\nresample = lc_1d.resample_axis(axis_new)\n\n# plot the new lightcurve on top of the old one\nax = lc_1d.plot(label=\"original\")\nresample.plot(ax=ax, marker=\"s\", label=\"rebinned\")\nplt.legend()"
"plt.figure(figsize=(8, 6))\nplt.subplots_adjust(bottom=0.2, left=0.2)\nax = lc_1d.plot(label=\"original\")\nresample.plot(ax=ax, marker=\"s\", label=\"rebinned\")\nplt.legend()"
]
}
],
Expand Down
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 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 modified docs/dev/_downloads/920df746e67257657f5d44e868b95ff9/fitting.zip
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.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
# Check setup
# -----------
from gammapy.utils.check import check_tutorials_setup

check_tutorials_setup()


Expand Down Expand Up @@ -98,7 +99,6 @@
#



catalog = SourceCatalog4FGL()
print("Number of sources :", len(catalog.table))

Expand Down Expand Up @@ -397,6 +397,8 @@
display(lightcurve.to_table(format="lightcurve", sed_type="flux"))

# %%
plt.figure(figsize=(8, 6))
plt.subplots_adjust(bottom=0.2, left=0.2)
lightcurve.plot()
plt.show()

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## A note on statistics\n\nDifferent statistic are available for the FluxPointDataset :\n* chi2 : estimate from chi2 statistics.\n* profile : estimate from interpolation of the likelihood profile.\n* distrib : estimate from probability distributions,\n assuming that flux points correspond to asymmetric gaussians\n and upper limits complementary error functions.\nDefault is `chi2`, in that case upper limits are ignored and the mean of asymetrics error is used.\nSo it is recommended to use `profile` if `stat_scan` is available on flux points.\nThe `distrib` case provides an approximation if the `profile` is not available\nwhich allows to take into accounts upper limit and asymetrics error.\n\nIn the example below we can see that the `profile` case matches exactly the result\nfrom the joint analysis of the ON/OFF datasets using `wstat` (as labelled).\n\n"
"## A note on statistics\n\nDifferent statistic are available for the `~gammapy.datasets.FluxPointsDataset` :\n\n- chi2 : estimate from chi2 statistics.\n- profile : estimate from interpolation of the likelihood profile.\n- distrib : estimate from probability distributions,\n assuming that flux points correspond to asymmetric gaussians\n and upper limits complementary error functions.\n\nDefault is `chi2`, in that case upper limits are ignored and the mean of asymetrics error is used.\nSo it is recommended to use `profile` if `stat_scan` is available on flux points.\nThe `distrib` case provides an approximation if the `profile` is not available\nwhich allows to take into accounts upper limit and asymetrics error.\n\nIn the example below we can see that the `profile` case matches exactly the result\nfrom the joint analysis of the ON/OFF datasets using `wstat` (as labelled).\n\n"
]
},
{
Expand All @@ -482,6 +482,13 @@
"def plot_stat(fp_dataset):\n fig, ax = plt.subplots()\n\n plot_kwargs = {\n \"energy_bounds\": [0.1, 30] * u.TeV,\n \"sed_type\": \"e2dnde\",\n \"ax\": ax,\n }\n\n fp_dataset.data.plot(energy_power=2, ax=ax)\n model_best_joint.spectral_model.plot(\n color=\"b\", lw=0.5, **plot_kwargs, label=\"wstat\"\n )\n\n stat_types = [\"chi2\", \"profile\", \"distrib\"]\n colors = [\"red\", \"g\", \"c\"]\n lss = [\"--\", \":\", \"--\"]\n\n for ks, stat in enumerate(stat_types):\n fp_dataset.stat_type = stat\n\n fit = Fit()\n fit.run([fp_dataset])\n\n fp_dataset.models[0].spectral_model.plot(\n color=colors[ks], ls=lss[ks], **plot_kwargs, label=stat\n )\n fp_dataset.models[0].spectral_model.plot_error(\n facecolor=colors[ks], **plot_kwargs\n )\n plt.legend()\n\n\nplot_stat(flux_points_dataset)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In order to avoid discrepancies due to the treatment of upper limits\nwe can utilise the `~gammapy.estimators.utils.resample_energy_edges`\nfor defining energy bins in which the minimum number of `sqrt_ts` is 2.\nIn that case all the statistics definitions give equivalent results.\n\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -490,7 +497,7 @@
},
"outputs": [],
"source": [
"# In order to avoid discrepancies due to the treatment of upper limits\n# we can utilise the `~gammapy.estimators.utils.resample_energy_edges`\n# for defining energy bins in which the minimum number of `sqrt_ts` is 2.\n# In that case all the statistics definitions give equivalent results.\n#\n\nenergy_edges = resample_energy_edges(dataset_stacked, conditions={\"sqrt_ts_min\": 2})\n\nfpe_no_ul = FluxPointsEstimator(\n energy_edges=energy_edges, source=\"crab\", selection_optional=\"all\"\n)\nflux_points_no_ul = fpe_no_ul.run(datasets=datasets)\nflux_points_dataset_no_ul = FluxPointsDataset(\n data=flux_points_no_ul,\n models=model_best_joint.copy(),\n)\n\nplot_stat(flux_points_dataset_no_ul)"
"energy_edges = resample_energy_edges(dataset_stacked, conditions={\"sqrt_ts_min\": 2})\n\nfpe_no_ul = FluxPointsEstimator(\n energy_edges=energy_edges, source=\"crab\", selection_optional=\"all\"\n)\nflux_points_no_ul = fpe_no_ul.run(datasets=datasets)\nflux_points_dataset_no_ul = FluxPointsDataset(\n data=flux_points_no_ul,\n models=model_best_joint.copy(),\n)\n\nplot_stat(flux_points_dataset_no_ul)"
]
},
{
Expand Down
Binary file modified docs/dev/_downloads/ac76b976c8eed3f5e3889db8bc14cf8e/makers.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"outputs": [],
"source": [
"from gammapy.utils.check import check_tutorials_setup\ncheck_tutorials_setup()"
"from gammapy.utils.check import check_tutorials_setup\n\ncheck_tutorials_setup()"
]
},
{
Expand Down Expand Up @@ -591,7 +591,7 @@
},
"outputs": [],
"source": [
"lightcurve.plot()\nplt.show()"
"plt.figure(figsize=(8, 6))\nplt.subplots_adjust(bottom=0.2, left=0.2)\nlightcurve.plot()\nplt.show()"
]
},
{
Expand Down
Binary file not shown.
Binary file modified docs/dev/_downloads/ba616a9da5fd4ea6727cee926df2b69e/ebl.zip
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 modified docs/dev/_downloads/c6bad13b7bd034ce07497e4d5025d5d2/edisp-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.
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 @@ -499,12 +499,14 @@
# A note on statistics
# --------------------
#
# Different statistic are available for the FluxPointDataset :
# * chi2 : estimate from chi2 statistics.
# * profile : estimate from interpolation of the likelihood profile.
# * distrib : estimate from probability distributions,
# Different statistic are available for the `~gammapy.datasets.FluxPointsDataset` :
#
# - chi2 : estimate from chi2 statistics.
# - profile : estimate from interpolation of the likelihood profile.
# - distrib : estimate from probability distributions,
# assuming that flux points correspond to asymmetric gaussians
# and upper limits complementary error functions.
#
# Default is `chi2`, in that case upper limits are ignored and the mean of asymetrics error is used.
# So it is recommended to use `profile` if `stat_scan` is available on flux points.
# The `distrib` case provides an approximation if the `profile` is not available
Expand Down Expand Up @@ -550,7 +552,7 @@ def plot_stat(fp_dataset):
plot_stat(flux_points_dataset)

######################################################################

#
# In order to avoid discrepancies due to the treatment of upper limits
# we can utilise the `~gammapy.estimators.utils.resample_energy_edges`
# for defining energy bins in which the minimum number of `sqrt_ts` is 2.
Expand Down
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 modified docs/dev/_images/plot_spiral_arms.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_catalog_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_light_curve_simulation_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_light_curve_simulation_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_light_curve_simulation_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_plot_constant_temporal_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_plot_constant_temporal_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_plot_linear_temporal_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_plot_linear_temporal_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_plot_powerlaw_temporal_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_plot_powerlaw_temporal_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_plot_sine_temporal_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_plot_sine_temporal_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_priors_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_priors_004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_simulate_3d_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_simulate_3d_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_simulate_3d_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_spectral_analysis_008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_spectral_analysis_rad_max_005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_variability_estimation_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_variability_estimation_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dev/_images/sphx_glr_variability_estimation_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/dev/_modules/gammapy/analysis/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<link rel="search" title="Search" href="../../../search.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<meta name="docsearch:version" content="1.3.dev1388+g7690890e7" />
<meta name="docsearch:version" content="1.3.dev1400+g0e41da044" />
<meta name="docbuild:last-update" content="12 Nov 2024"/>
</head>

Expand Down
2 changes: 1 addition & 1 deletion docs/dev/_modules/gammapy/analysis/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<link rel="search" title="Search" href="../../../search.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<meta name="docsearch:version" content="1.3.dev1388+g7690890e7" />
<meta name="docsearch:version" content="1.3.dev1400+g0e41da044" />
<meta name="docbuild:last-update" content="12 Nov 2024"/>
</head>

Expand Down
2 changes: 1 addition & 1 deletion docs/dev/_modules/gammapy/astro/darkmatter/profiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<link rel="search" title="Search" href="../../../../search.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<meta name="docsearch:version" content="1.3.dev1388+g7690890e7" />
<meta name="docsearch:version" content="1.3.dev1400+g0e41da044" />
<meta name="docbuild:last-update" content="12 Nov 2024"/>
</head>

Expand Down
2 changes: 1 addition & 1 deletion docs/dev/_modules/gammapy/astro/darkmatter/spectra.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<link rel="search" title="Search" href="../../../../search.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<meta name="docsearch:version" content="1.3.dev1388+g7690890e7" />
<meta name="docsearch:version" content="1.3.dev1400+g0e41da044" />
<meta name="docbuild:last-update" content="12 Nov 2024"/>
</head>

Expand Down
2 changes: 1 addition & 1 deletion docs/dev/_modules/gammapy/astro/darkmatter/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<link rel="search" title="Search" href="../../../../search.html" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="en"/>
<meta name="docsearch:version" content="1.3.dev1388+g7690890e7" />
<meta name="docsearch:version" content="1.3.dev1400+g0e41da044" />
<meta name="docbuild:last-update" content="12 Nov 2024"/>
</head>

Expand Down
Loading

0 comments on commit 266a700

Please sign in to comment.