fimg2tab -- Copies the image pixel values into a (binary/ascii) table extension.
fimg2tab fitsfile outfile cols rows (flipx=no) (flipy=no) (swapxy=no) (rootname=Col_) (coordcol=no) (tabletype=binary) (out_format=-)
Copies the image pixel values from the input FITS file into a (binary/ascii) Table extension of the output FITS file. The image pixel values to read are specified by the range of columns and rows. Only 1- and 2-dimensional images are currently supported. The maximum number of output table columns should not exceed 999. When using tabletype=BINARY vector=YES, images with 1000 or more columns can be written.
The output table structure depends on the value of the "vector" parameter. Let us consider an input image with dimensions NxM, N being the number of image columns and M being the number of image rows. (If flipx, flipy or swapxy are used, then these dimensions would be the dimensions of the image after flipping or swapping.) If vector=NO, the default, fimg2tab creates one table column for each image column. There will be N table columns and M rows. If vector=YES, fimg2tab creates a single table column which contains an entire row of the image. There will be one table column (an N-vector), and M rows.
Read the columns 1-10 and rows 1-100 from the FITS image file a.fits+2 and put the extracted fragment of the image to the binary table extension in FITS file b.fits.
fi> fimg2tab a.fits+2 b.fits 1-10 1-100