'Uneven coordinates in astropy Cutout2D image plot

I am using astropy to download and plot images from the SDSS database. Also I am using the Cutout2D function to cut a 10x10 arcsec square around the object I am interested. This is the code:

from astropy.coordinates import SkyCoord
from astroquery.sdss import SDSS
from astropy.wcs import WCS
from astropy import units as u
from astropy.nddata import Cutout2D
import matplotlib.pyplot as plt
import numpy as np

# Coordinates from Skycoord name search
objCoord = SkyCoord(ra=263.7552*u.degree, dec=57.052374*u.degree)

# Get SDSS images
xObj = SDSS.query_region(objCoord, spectro=True)
imgObj = SDSS.get_images(matches=xObj)
image_i = imgObj[0][0]
data_i = image_i.data

# Get image coordinates
wcs = WCS(image_i.header)

# Cut the Field of view 10.0 x 10.0 arcsec
FoV = np.array([10.0, 10.0])
FoV_dimen = u.Quantity((FoV[0], FoV[1]), u.arcsec)
cutout = Cutout2D(data_i, objCoord, FoV_dimen, wcs=wcs)
wcs_cut = cutout.wcs

# Plot the image
fig = plt.figure()
ax = fig.add_subplot(111, projection=wcs_cut)
imgRegion = ax.imshow(cutout.data, origin='lower', vmin=-0.64, vmax=0.45)
ax.scatter(objCoord.ra, objCoord.dec , s=150, linewidths=0.35,  edgecolors='black', transform=ax.get_transform('world'), label='SHOC579')

# Format the image axis
ra, dec = ax.coords[0], ax.coords[1]
ra.set_axislabel('Right ascension')
dec.set_axislabel('Declination')
ra.set_ticks(spacing=1 * u.arcsec, color='white', exclude_overlapping=True)
dec.set_ticks(spacing=1  * u.arcsec, color='white', exclude_overlapping=True)
ra.grid(color='red', alpha=0.5, linestyle='solid')
dec.grid(color='black', alpha=0.5, linestyle='solid')
ax.legend()
plt.show()

It generates this image:

enter image description here

Despite the fact both image axis have been cut with the same length and the axis grid has the same 1" (1 arcsec) resolution the right ascention covers almost twice the angle expected.

However when you look at the SDSS skyserver image also with 1" (1 arcsec) grid :

enter image description here

The right ascention grid is the one which looks actually closer (around 6 arcsecond diameter for the object)

Is there something I am missing?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source