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 Oct 3, 2024
1 parent d5dca11 commit e4ba23c
Show file tree
Hide file tree
Showing 476 changed files with 1,122 additions and 992 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/api/gammapy.irf.EffectiveAreaTable2D.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 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 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.
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.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,32 @@
plt.grid(which="both")

# %%
# Spectral correction
# Corrections to templates can be applied by multiplication with a normalized spectral model,
# Example of extrapolation
# ------------------------
# The following shows how to implement extrapolation of a template spectral model:

energy = [0.5, 1, 3, 10, 20] * u.TeV
values = [40, 30, 20, 10, 1] * u.Unit("TeV-1 s-1 cm-2")
template_noextrapolate = TemplateSpectralModel(
energy=energy,
values=values,
interp_kwargs={"extrapolate": False},
)
template_extrapolate = TemplateSpectralModel(
energy=energy, values=values, interp_kwargs={"extrapolate": True}
)
energy_bounds = [0.2, 80] * u.TeV
template_extrapolate.plot(energy_bounds, label="Extrapolated", alpha=0.4, color="blue")
template_noextrapolate.plot(
energy_bounds, label="Not extrapolated", ls="--", color="black"
)
plt.legend()


# %%
# Spectral corrections to templates can be applied by multiplication with a normalized spectral model,
# for example `gammapy.modeling.models.PowerLawNormSpectralModel`.
# This operation create a new `gammapy.modeling.models.CompoundSpectralModel`
# This operation creates a new `gammapy.modeling.models.CompoundSpectralModel`

new_model = template * PowerLawNormSpectralModel(norm=2, tilt=0)

Expand Down
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.
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@
#
# To load the isotropic diffuse model with Gammapy, use the
# `~gammapy.modeling.models.TemplateSpectralModel`. We are using
# `'fill_value': 'extrapolate'` to extrapolate the model above 500 GeV:
# `'extrapolate': True` to extrapolate the model above 500 GeV:
#

filename = "$GAMMAPY_DATA/fermi_3fhl/iso_P8R2_SOURCE_V6_v06.txt"

diffuse_iso = create_fermi_isotropic_diffuse_model(
filename=filename, interp_kwargs={"fill_value": None}
filename=filename, interp_kwargs={"extrapolate": True}
)


Expand Down
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.
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/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.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Isotropic diffuse background\n\nTo load the isotropic diffuse model with Gammapy, use the\n`~gammapy.modeling.models.TemplateSpectralModel`. We are using\n`'fill_value': 'extrapolate'` to extrapolate the model above 500 GeV:\n\n\n"
"## Isotropic diffuse background\n\nTo load the isotropic diffuse model with Gammapy, use the\n`~gammapy.modeling.models.TemplateSpectralModel`. We are using\n`'extrapolate': True` to extrapolate the model above 500 GeV:\n\n\n"
]
},
{
Expand All @@ -256,7 +256,7 @@
},
"outputs": [],
"source": [
"filename = \"$GAMMAPY_DATA/fermi_3fhl/iso_P8R2_SOURCE_V6_v06.txt\"\n\ndiffuse_iso = create_fermi_isotropic_diffuse_model(\n filename=filename, interp_kwargs={\"fill_value\": None}\n)"
"filename = \"$GAMMAPY_DATA/fermi_3fhl/iso_P8R2_SOURCE_V6_v06.txt\"\n\ndiffuse_iso = create_fermi_isotropic_diffuse_model(\n filename=filename, interp_kwargs={\"extrapolate\": True}\n)"
]
},
{
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/ac76b976c8eed3f5e3889db8bc14cf8e/makers.zip
Binary file not shown.
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.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,25 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Spectral correction\nCorrections to templates can be applied by multiplication with a normalized spectral model,\nfor example `gammapy.modeling.models.PowerLawNormSpectralModel`.\nThis operation create a new `gammapy.modeling.models.CompoundSpectralModel`\n\n"
"## Example of extrapolation\nThe following shows how to implement extrapolation of a template spectral model:\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"energy = [0.5, 1, 3, 10, 20] * u.TeV\nvalues = [40, 30, 20, 10, 1] * u.Unit(\"TeV-1 s-1 cm-2\")\ntemplate_noextrapolate = TemplateSpectralModel(\n energy=energy,\n values=values,\n interp_kwargs={\"extrapolate\": False},\n)\ntemplate_extrapolate = TemplateSpectralModel(\n energy=energy, values=values, interp_kwargs={\"extrapolate\": True}\n)\nenergy_bounds = [0.2, 80] * u.TeV\ntemplate_extrapolate.plot(energy_bounds, label=\"Extrapolated\", alpha=0.4, color=\"blue\")\ntemplate_noextrapolate.plot(\n energy_bounds, label=\"Not extrapolated\", ls=\"--\", color=\"black\"\n)\nplt.legend()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Spectral corrections to templates can be applied by multiplication with a normalized spectral model,\nfor example `gammapy.modeling.models.PowerLawNormSpectralModel`.\nThis operation creates a new `gammapy.modeling.models.CompoundSpectralModel`\n\n"
]
},
{
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/_downloads/f859fe731238e2fbe18ae0bd172f1eb8/fermi_lat.zip
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_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.
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_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.
2 changes: 1 addition & 1 deletion docs/dev/_modules/gammapy/irf/effective_area.html
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ <h1>Source code for gammapy.irf.effective_area</h1><div class="highlight"><pre>
<span class="sd"> ----------</span>
<span class="sd"> ax : `~matplotlib.axes.Axes`, optional</span>
<span class="sd"> Matplotlib axes. Default is None.</span>
<span class="sd"> offset : `~astropy.coordinates.Angle`, optional</span>
<span class="sd"> offset : list of `~astropy.coordinates.Angle`, optional</span>
<span class="sd"> Offset. Default is None.</span>
<span class="sd"> kwargs : dict</span>
<span class="sd"> Forwarded to plt.plot().</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/_modules/gammapy/modeling/models/cube.html
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,7 @@ <h1>Source code for gammapy.modeling.models.cube</h1><div class="highlight"><pre
<span class="k">def</span> <span class="nf">create_fermi_isotropic_diffuse_model</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Read Fermi isotropic diffuse model.</span>

<span class="sd"> See `LAT Background models &lt;https://fermi.gsfc.nasa.gov/ssc/data/access/lat/BackgroundModels.html&gt;`__ # noqa: E501</span>
<span class="sd"> See `LAT Background models &lt;https://fermi.gsfc.nasa.gov/ssc/data/access/lat/BackgroundModels.html&gt;`__.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
Expand Down
11 changes: 5 additions & 6 deletions docs/dev/_modules/gammapy/modeling/models/spectral.html
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@
<h1>Source code for gammapy.modeling.models.spectral</h1><div class="highlight"><pre>
<span></span><span class="c1"># Licensed under a 3-clause BSD style license - see LICENSE.rst</span>
<span class="sd">&quot;&quot;&quot;Spectral models for Gammapy.&quot;&quot;&quot;</span>

<span class="kn">import</span> <span class="nn">logging</span>
<span class="kn">import</span> <span class="nn">operator</span>
<span class="kn">import</span> <span class="nn">os</span>
Expand Down Expand Up @@ -2079,7 +2080,6 @@ <h1>Source code for gammapy.modeling.models.spectral</h1><div class="highlight">
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">norm</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">reference</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">lambda_</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">alpha</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span>
<span class="p">):</span>

<span class="k">if</span> <span class="n">index</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
<span class="s2">&quot;The default index value changed from 1.5 to 0 since v1.2&quot;</span><span class="p">,</span>
Expand Down Expand Up @@ -2429,7 +2429,6 @@ <h1>Source code for gammapy.modeling.models.spectral</h1><div class="highlight">
<span class="n">beta</span> <span class="o">=</span> <span class="n">Parameter</span><span class="p">(</span><span class="s2">&quot;beta&quot;</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">norm</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">reference</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">alpha</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">beta</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>

<span class="k">if</span> <span class="n">alpha</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
<span class="s2">&quot;The default alpha value changed from 2 to 0 since v1.2&quot;</span><span class="p">,</span>
Expand Down Expand Up @@ -2488,10 +2487,10 @@ <h1>Source code for gammapy.modeling.models.spectral</h1><div class="highlight">
<span class="sd"> values : `~numpy.ndarray`</span>
<span class="sd"> Array with the values of the model at energies ``energy``.</span>
<span class="sd"> interp_kwargs : dict</span>
<span class="sd"> Interpolation keyword arguments passed to `scipy.interpolate.RegularGridInterpolator`.</span>
<span class="sd"> By default all values outside the interpolation range are set to zero.</span>
<span class="sd"> If you want to apply linear extrapolation you can pass `interp_kwargs={&#39;fill_value&#39;:</span>
<span class="sd"> &#39;extrapolate&#39;, &#39;kind&#39;: &#39;linear&#39;}`. If you want to choose the interpolation</span>
<span class="sd"> Interpolation option passed to `~gammapy.utils.interpolation.ScaledRegularGridInterpolator`.</span>
<span class="sd"> By default, all values outside the interpolation range are set to NaN.</span>
<span class="sd"> If you want to apply linear extrapolation you can pass `interp_kwargs={&#39;extrapolate&#39;:</span>
<span class="sd"> True, &#39;method&#39;: &#39;linear&#39;}`. If you want to choose the interpolation</span>
<span class="sd"> scaling applied to values, you can use `interp_kwargs={&quot;values_scale&quot;: &quot;log&quot;}`.</span>
<span class="sd"> meta : dict, optional</span>
<span class="sd"> Meta information, meta[&#39;filename&#39;] will be used for serialisation.</span>
Expand Down
4 changes: 3 additions & 1 deletion docs/dev/_modules/gammapy/utils/interpolation.html
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@
<h1>Source code for gammapy.utils.interpolation</h1><div class="highlight"><pre>
<span></span><span class="c1"># Licensed under a 3-clause BSD style license - see LICENSE.rst</span>
<span class="sd">&quot;&quot;&quot;Interpolation utilities.&quot;&quot;&quot;</span>

<span class="kn">import</span> <span class="nn">html</span>
<span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">compress</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
Expand Down Expand Up @@ -604,8 +605,9 @@ <h1>Source code for gammapy.utils.interpolation</h1><div class="highlight"><pre>
<span class="n">values_scaled</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">scale</span><span class="p">(</span><span class="n">values</span><span class="p">)</span>
<span class="n">points_scaled</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_scale_points</span><span class="p">(</span><span class="n">points</span><span class="o">=</span><span class="n">points</span><span class="p">)</span>

<span class="n">kwargs</span><span class="o">.</span><span class="n">setdefault</span><span class="p">(</span><span class="s2">&quot;bounds_error&quot;</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>

<span class="k">if</span> <span class="n">extrapolate</span><span class="p">:</span>
<span class="n">kwargs</span><span class="o">.</span><span class="n">setdefault</span><span class="p">(</span><span class="s2">&quot;bounds_error&quot;</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
<span class="n">kwargs</span><span class="o">.</span><span class="n">setdefault</span><span class="p">(</span><span class="s2">&quot;fill_value&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>

<span class="n">method</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;method&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
Expand Down
Loading

0 comments on commit e4ba23c

Please sign in to comment.