code uniformisation
@@ -43,6 +43,12 @@ this model is not correctly normalized. However, this approximation is perfectly
common case of models with modest dimensions: indeed, the error introduced by normalizing on the plane
rather than on the sphere is below 0.1\% for Gaussians with radii smaller than ~ 5 deg.
"""
+
+# %%
+# Example plot
+# ------------
+# Here is an example plot of the model:
+
import numpy as np
from astropy.coordinates import Angle
from gammapy.maps import WcsGeom
@@ -53,7 +59,6 @@ from gammapy.modeling.models import (
Models,
)
-
phi = Angle("30 deg")
model = GaussianSpatialModel(
lon_0="2 deg", lat_0="2 deg", sigma="1 deg", e=0.7, phi=phi, frame="galactic",
@@ -69,7 +74,6 @@ region = model.to_region().to_pixel(ax.wcs)
artist = region.as_artist(facecolor="none", edgecolor="red")
ax.add_artist(artist)
-
transform = ax.get_transform("galactic")
ax.scatter(2, 2, transform=transform, s=20, edgecolor="red", facecolor="red")
ax.text(1.5, 1.85, r"$(l_0, b_0)$", transform=transform, ha="center")
