Sat 01 Jul 2017 12:54:49 PM UTC, original submission:
When doing rotation about pixel coordinate (0,0) by an angle theta, until now Warp would use the following wrong equation (which is correct for rotation of the coordinates, not rotation of the point):
When rotating the point (not the coordinates), the negative sign changes. However, this was not noticed! The reason was that in the standard aligned images, the first axis (RA) of the WCS points to the left, not the right. So the rotation would actually occur not around image coordinate (0,0), but image coordinate (X,0), where X is the length of the image along the first axis.
This lead us to incorrectly associate rotation in the WCS axis directions (only when the RA and image X axis are in opposite directions).
The problem became clear when trying rotation on an image where the RA and X axis were in the same direction.
So the rotation matrix above is now corrected and like all the other warpings, rotation is also around the image coordinate (0,0). I am almost finished correcting it and will close this bug when it is complete.
|