| rfits | dataio | rfits |
rfits -- convert image data in FITS files to individual IRAF images
rfits fits_file file_list iraf_file
"1-3,4-8"
will convert ALL the FITS extensions in files 1 through 8 on tape, but only FITS extensions 1 through 8 from a disk file or a single tape file. For the case of disk input, the same FITS extensions must be read from each input file. For the case of tape input the FITS extensions to be read from each file must be specified separately. For example the following string
"1-10[2-4],15-21[1-10]"
tells rfits to convert extensions 2 through 4 in tape files 1 through 10 and extensions 1 through 10 in tape files 15 through 21. Rfits will only convert extensions which contain image data. Other types of fits data such as tables will not be converted.
FITS data is read from the specified source; either disk or magnetic tape. The FITS header may optionally be printed on the standard output as either a full listing or a short description. The FITS long blocks option is supported.
At present non-standard FITS files (SIMPLE = F) and files containing group data are skipped and a warning message is issued. Image stored in the FITS standard extension IMAGE can be read. Other standard extensions such as TABLE and BINTABLE are currently ignored.
A warning message will be issued if the default user area allocated in memory is too small to hold all the FITS parameter cards being read in by RFITS. Since the default user area is 64000 characters and a single card image is 81 characters long, the normal user area will hold ~800 complete card images. RFITS will not permit partial cards to be written. The user can override the default user area length by setting the environment variable min_lenuserarea (see example below).
1. Convert all the image data on a mag tape to individual IRAF images. Allow rfits to select the output datatype and set blanks to zero.
cl> rfits mtb1600 "" images or alternatively cl> rfits mtb1600 * images
2. Convert FITS files on disk to IRAF images. In the first example case the files specified by fits* are written to images images0001, images0002, etc. In the second example the fits disk files listed one per line in the text file fitslist are written to the output images listed one per line in the file imlist. Note that by using 0 or "" for the file_list parameter the user has told rfits to read only the primary fits data unit.
cl> rfits fits* "" images or alternatively cl> rfits fits* 0 images cl> rfits @fitslist "" @imlist or alternatively cl> rfits @fitslist 0 @imlist
3. List the contents of a FITS tape on the standard output without creating any image files.
cl> rfits mtb1600 "" images ma-
4. Convert FITS files on tape directly to IRAF images without scaling.
cl> rfits mtb1600 "" images scal-
5. Convert the first three FITS files on tape to IRAF image converting FITS blank values to -1 in the process. Note that the user will not get what he or she expects if the output data type is ushort.
cl> rfits mta 1-3 images blank=-1
6. Read in a disk FITS file with a header roughly twice the usual IRAF length of 64000 characters.
cl> set min_lenuserarea = 128000 cl> rfits fitsimage "" image
7. Read a FITS tape which has 5 normal fits records (2880 bytes) to a tape record. Notice that no hidden rfits parameters are required to do this.
cl> rfits mta * images
8. Convert only the zeroth FITS extension in each of the first 100 files on a magnetic tape and try to restore the original IRAF image name in the process.
cl> rfits mta 1-100[0] images old+
9. Convert the second, third, and fourth FITS extensions in the first 100 files of a FITS tape and try to restore the original IRAF name in the process.
cl> rfits mta "1-100[2-4]" images old+
10. Convert the second, third, and fourth FITS extensions in each of a list of disk files and restore the original IRAF name in the process.
cl> rfits @fitslist "2-4" images old+
11. Convert the second, third, and fourth FITS extensions in the fifth mag tape file and and try to restore the original IRAF name in the process.
cl> rfits mta[5] "2-4" images old+
Blank pixels are counted and set to a user determined value, but they are not records in the output image header.
Rfits can read image data only. Other FITS data types such as ASCII and binary tables are skipped.
wfits, reblock, t2d, fits kernel