def wcs(self):
"""
WCS for the given image slice.
"""
shape = self.image.shape
delta = self.pixelsize / 3600.0 # [arcsec] -> [deg]
wcs_ = WCS(naxis=2)
wcs_.wcs.ctype = ["RA---"+self.projection, "DEC--"+self.projection]
wcs_.wcs.crval = np.array([self.ra0, self.dec0])
wcs_.wcs.crpix = np.array([shape[1], shape[0]]) / 2.0 + 1
wcs_.wcs.cdelt = np.array([delta, delta])
return wcs_
评论列表
文章目录