Provided by: libcfitsio-bin_3.430-3_amd64
imcopy - copies FITS images.
imcopy inputImage outputImage[compress]
Copy an input image to an output image, optionally compressing or uncompressing the image in the process. If the [compress] qualifier is appended to the output file name then the input image will be compressed using the tile-compressed format. In this format, the image is divided into rectangular tiles and each tile of pixels is compressed and stored in a variable-length row of a binary table. If the [compress] qualifier is omitted, and the input image is in tile-compressed format, then the output image will be uncompressed. If an extension name or number is appended to the input file name, enclosed in square brackets, then only that single extension will be copied to the output file. Otherwise, every extension in the input file will be processed in turn and copied to the output file. The full syntax of the compression qualifier is: [compress ALGORITHM TDIM1,TDIM2,...; NOISE_BITS] where the allowed ALGORITHM values are Rice, GZIP, PLIO, and TDIMn is the size of the compression tile in each dimension, and NOISE_BITS = 1, 2, 3, or 4 and controls the amount of noise suppression when compressing floating point images. Note that it may be necessary to enclose the file names in single quote characters on the Unix command line.
1) imcopy image.fit 'cimage.fit[compress]' This compresses the input image using the default parameters, i.e., using the Rice compression algorithm and using row by row tiles. 2) imcopy cimage.fit image2.fit This uncompress the image created in the first example. image2.fit should be identical to image.fit if the image has an integer datatype. There will be small differences in the pixel values if it is a floating point image. 3) imcopy image.fit 'cimage.fit[compress GZIP 100,100;4]' This compresses the input image using the following parameters: GZIP compression algorithm; 100 X 100 pixel compression tiles; noise_bits = 4 (only used with floating point images)