WCSTools programs

Rotate FITS and IRAF Images

imrot is a utility for rotating and/or reflecting FITS or IRAF images. Images can be rotated only in multiples of 90 degrees. The image may be output with a different data type than that in which it is input, and IRAF files may be written out as FITS files. If the -o flag is not used, the output file name is made from the input file name by adding the angle by which it is rotated in degrees, followed by an m if the image is reflected. If there is no rotation or reflection, or if the -o flag is used, the input file is overwritten.

Command Line Arguments

Name of FITS or IRAF image file. This must be present.
-b pixel bits
Set output pixel size in bits using FITS options (16: 2-byte integer, 32: 4-byte integer, -16: 2-byte unsigned integer, -32: 4-byte floating point, -64: 8-byte floating point
Write output image to current working directory
Write FITS image from IRAF input image
Reflect image left-right before rotating it
Overwrite input file instead of writing a new file.
-r angle in degrees
Rotate image counterclockwise this many degrees. 0, 90, 180, and 270 are the options.
print more information about process


1. Rotate an IRAF image 90 degrees after reflecting it and write a FITS image.
imrot -l -f -r 90 test.imh
produces file test90m.fit.

2. Convert a 32-bit/pixel IRAF image to a 16-bit/pixel FITS image.
imrot -f -b 16 test.imh
produces file test.fit.

Last updated 17 September 2003 by Doug Mink