Using the Astropy function Rotation2D, I have been attempting to rotate an image array (in the form of a fits file) given an angle. My problem is that I do not understand how or where to properly use the inputs. In this case,the inputs would be:
- the input array, named im1, and
- the angle of rotation, which is 36 degrees.
Here is my code:
import astropy.wcs as wcs
from astropy.modeling.models import Rotation2D
from astropy.io import fits
hdu = fits.open("4imAF.fits")
im1 = hdu[0].data
SkyRotation = Rotation2D.rename('SkyRotation')
Now, from here, I don't know what I can. Something like SkyRotation(im1, '36') will not work, so perhaps I can be enlightened of the correct way to do this.