Coordinate frame `fk5` not handled properly in `SpatialModel.evaluate_geom()`
Dear all,

I have trouble using SkyDiffuseMap from a 2D fits map

```

mod = Map.read("FakeModelMap_CrabGauss_XY83.63_22.01_SigmaXY0.00_0.00.fits")
print(sum(sum(mod.data)))

```
output  : 
0.9999999588496848

-----------------------------------------------------
```

spatial_model = SkyDiffuseMap(mod,norm=1)
print(spatial_model.evaluate(22.5 * u.deg,83 * u.deg,1 * u.Unit('cm-2 s-1')))

```

output  : 
[0.] 1 / sr
---------------------------------------------------


If I use this model as imput of a skymodel for a MapDataset then the npred is always zero from this model.
The BackgroundModel gives good npred values.

Did I do something wrong ?


Cheers,
Cyril.





diff --git a/gammapy/maps/geom.py b/gammapy/maps/geom.py
index 44553fbba..05715ee68 100644
--- a/gammapy/maps/geom.py
+++ b/gammapy/maps/geom.py
@@ -168,9 +168,9 @@ def get_shape(param):
 
 
 def coordsys_to_frame(coordsys):
-    if coordsys in ["CEL", "C"]:
+    if coordsys in ["CEL", "C", "fk5", "fk4", "icrs"]:
         return "icrs"
-    elif coordsys in ["GAL", "G"]:
+    elif coordsys in ["GAL", "G", "galactic"]:
         return "galactic"
     else:
         raise ValueError(f"Unrecognized coordinate system: {coordsys!r}")
@@ -186,21 +186,12 @@ def skycoord_to_lonlat(skycoord, coordsys=None):
         Longitude in degrees.
     lat : `~numpy.ndarray`
         Latitude in degrees.
-    frame : str
-        Name of coordinate frame.
     """
-    if coordsys in ["CEL", "C"]:
-        skycoord = skycoord.transform_to("icrs")
-    elif coordsys in ["GAL", "G"]:
-        skycoord = skycoord.transform_to("galactic")
-
-    frame = skycoord.frame.name
-    if frame in ["icrs", "fk5"]:
-        return skycoord.ra.deg, skycoord.dec.deg, frame
-    elif frame in ["galactic"]:
-        return skycoord.l.deg, skycoord.b.deg, frame
-    else:
-        raise ValueError(f"Unrecognized SkyCoord frame: {frame!r}")
+    if coordsys:
+        frame = coordsys_to_frame(coordsys)
+        skycoord = skycoord.transform_to(frame)
+
+    return skycoord.data.lon.deg, skycoord.data.lat.deg, skycoord.frame
 
 
 def lonlat_to_skycoord(lon, lat, coordsys):
diff --git a/gammapy/modeling/models/cube.py b/gammapy/modeling/models/cube.py
index 692829463..e4350da75 100644
--- a/gammapy/modeling/models/cube.py
+++ b/gammapy/modeling/models/cube.py
@@ -29,8 +29,7 @@ class SkyModelBase(Model):
         return self.evaluate(lon, lat, energy)
 
     def evaluate_geom(self, geom):
-        coordsys = "CEL" if self.frame in ["icrs", "fk5"] else "GAL"
-        coords = geom.get_coord(coordsys=coordsys)
+        coords = geom.get_coord(coordsys=self.frame)
         return self(coords.lon, coords.lat, coords["energy"])
 
 
diff --git a/gammapy/modeling/models/spatial.py b/gammapy/modeling/models/spatial.py
index 64dce90c7..3a0070cd7 100644
--- a/gammapy/modeling/models/spatial.py
+++ b/gammapy/modeling/models/spatial.py
@@ -49,9 +49,7 @@ class SpatialModel(Model):
 
     def evaluate_geom(self, geom):
         """Evaluate model on `~gammapy.maps.Geom`."""
-        # TODO: change to uniform coordinate frame names
-        coordsys = "CEL" if self.frame in ["icrs", "fk5"] else "GAL"
-        coords = geom.get_coord(coordsys=coordsys)
+        coords = geom.get_coord(coordsys=self.frame)
         return self(coords.lon, coords.lat)
 
     def to_dict(self):
diff --git a/gammapy/modeling/models/tests/test_spatial.py b/gammapy/modeling/models/tests/test_spatial.py
index c8c33a4de..af7ebe9c9 100644
--- a/gammapy/modeling/models/tests/test_spatial.py
+++ b/gammapy/modeling/models/tests/test_spatial.py
@@ -2,6 +2,7 @@
 import numpy as np
 from numpy.testing import assert_allclose
 import astropy.units as u
+from astropy.wcs import WCS
 from gammapy.maps import Map, WcsGeom
 from gammapy.modeling.models import (
     ConstantSpatialModel,
@@ -216,8 +217,29 @@ def test_sky_diffuse_map_normalize():
     assert_allclose(integral.value, 1, rtol=1e-4)
 
 
-def test_evaluate_fk5():
+def test_evaluate_on_fk5_map():
+    # Check if spatial model can be evaluated on a map with FK5 frame
+    # Regression test for GH-2402
+    header = {}
+    header["CDELT1"] = 1.0
+    header["CDELT2"] = 1.0
+    header["CTYPE1"] = "RA---TAN"
+    header["CTYPE2"] = "DEC--TAN"
+    header["RADESYS"] = "FK5"
+    header["CRVAL1"] = 0
+    header["CRVAL2"] = 0
+    header["CRPIX1"] = 5
+    header["CRPIX2"] = 5
+
+    wcs = WCS(header)
+    geom = WcsGeom(wcs, npix=(10, 10))
+    model = GaussianSpatialModel("0 deg", "0 deg", "1 deg")
+    data = model.evaluate_geom(geom)
+    assert data.sum() > 0
+
+
+def test_evaluate_fk5_model():
     geom = WcsGeom.create(width=(5, 5), binsz=0.1, coordsys="CEL")
     model = GaussianSpatialModel("0 deg", "0 deg", "0.1 deg", frame="fk5")
     data = model.evaluate_geom(geom)
-    assert data.value[12, 12] > 0
+    assert data.sum() > 0
\ No newline at end of file
diff --git a/gammapy/scripts/config/docs.yaml b/gammapy/scripts/config/docs.yaml
index d3d5381c4..37be883a0 100644
--- a/gammapy/scripts/config/docs.yaml
+++ b/gammapy/scripts/config/docs.yaml
@@ -23,7 +23,7 @@ observations:
         - filter_type: sky_circle
           # also angle_box, par_box, par_value, ids, all
           # filter_type "sky_circle"
-          frame: icrs          # also equatorial, galactic, fk5
+          frame: icrs          #  or galactic
           lon: 83.633 deg
           lat: 22.014 deg
           radius: 1 deg
@@ -59,7 +59,7 @@ reduction:
         # on region in spectrum extraction
         region:
             center: [83.633 deg, 22.014 deg]
-            frame: icrs        # also equatorial, galactic, fk5
+            frame: icrs        # or galactic
             radius: 0.1 deg
         # spatial geometry ofr 2d maps
         binsz: 0.02             # map pixel size in degrees
diff --git a/gammapy/scripts/config/schema.yaml b/gammapy/scripts/config/schema.yaml
index d0d5c9825..e67104370 100644
--- a/gammapy/scripts/config/schema.yaml
+++ b/gammapy/scripts/config/schema.yaml
@@ -53,7 +53,7 @@ properties:
                                    ids,
                                    all]
                         frame:
-                            enum: [galactic, equatorial, icrs, fk5]
+                            enum: [galactic, icrs]
                         lon: {type: number}
                         lat: {type: number}
                         radius: {type: number}
@@ -191,7 +191,7 @@ definitions:
                         maxItems: 2
                     radius: {type: number}
                     frame:
-                        enum: [galactic, equatorial, icrs, fk5]
+                        enum: [galactic, icrs]
             binsz: {type: number}
             coordsys:
                 type: string
['gammapy/modeling/models/spatial.py', 'gammapy/scripts/config/docs.yaml', 'gammapy/scripts/config/schema.yaml', 'gammapy/modeling/models/cube.py', 'gammapy/modeling/models/tests/test_spatial.py', 'gammapy/maps/geom.py']