We'll take a small simulated image and rotate it. The image is called Model.fits. In this case we'll just make a second copy of Model.fits to get imag 2 and then we'll make up a TRS file that does the rotation about the center pixel in the image (X,Y=100,100) and also a REFLECTION about the Y axis.
We'll make our images for the command line: % cp Model.fits img1.fits % cp Model.fits img2.fits Here is our TRS file: 100.0 100.0 Y 1.0 +15.0 -100 -100 xofirt yofirst reflect fscal theta xolast yolast Since we want to convert img2, the name of our TRS file have to be: TRS.img2-XY2XY-img1 # to make thetransformation % clip_imshift_trs.sh img1.fits img2.fits NEW.fitsThe result of our experiment is shown below.
![]() |
Our input image, Model.fits (img1.fits) is transformed using a TRS file:
Here is our TRS file: 100.0 100.0 Y 1.0 +15.0 -100 -100 xofirt yofirst reflect fscal theta xolast yolast % clip_imshift_trs.sh img1.fits img2.fits NEW.fitsThe oriniganl image (Model.fits) is on the left, and the transformed image (NEW.fits) is on the right.Our field has clearly been flipped about the Y axis. We also see our desired 15 degres rotation. However, unlike our example 1 case, we note that out positive theta value now rotates the field in the clockwise (CW) direction. This is due to the our introduction of the reflection. |