NAME

fimg2tab -- Copies the image pixel values into a (binary/ascii) table extension.


USAGE

         fimg2tab fitsfile outfile cols rows (flipx=no) (flipy=no) 
             (swapxy=no) (rootname=Col_) (coordcol=no)
             (tabletype=binary) (out_format=-)

DESCRIPTION

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.


PARAMETERS

fitsfile [string]
The name, including extension and extension number in square brackets (e.g., a.fits[2] or a.fits+2), of the FITS image to be accessed.

outfile [string]
The name (e.g., b.fits) of the FITS file into which the output table should be created.

cols [string]
The range of the columns in the FITS image to read, e.g. '1-100'.

rows [string]
The range of the rows in the FITS image to read, e.g. '55-120'.

(flipx=no) [boolean]
The option (yes/no) to reverse the order of columns.

(flipy=no) [boolean]
The option (yes/no) to reverse the order of rows.

(swapxy=no) [boolean]
The option (yes/no) to make columns by rows and rows by columns.

(vector=no) [boolean]
The option (yes/no) to make a single column with vector dimensions instead of multiple columns. A value "yes" means single vector column, and "no" means multiple columns. vector=yes is not allowed if tabletype=ASCII.

(rootname="Col_") [string]
The base name of the columns, e.g. 'Col_'.

(coordcol=no) [boolean]
This option is ignored.

(tabletype="BINARY") [string]
The type (binary/ascii) of an output table extension.

(out_format="-") [string]
This option is ignored.


EXAMPLE

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


BUGS

CATEGORY

Mar99 ftools.fimage