| rtextimage | dataio | rtextimage |
rtextimage -- convert a text file to an IRAF image
rtextimage input output
Text files are converted to IRAF images files with procedure rtextimage . The text file consists of an optional header optionally followed by the pixel values. If no pixel values are read the image is initialized to all zero pixel values. If pixel values a given they are read in FITS order, that is, the leftmost subscript varies most rapidly. The number of image dimensions and the length of each dimension must either be read from a FITS header or supplied by the user. Internally, rtextimage determines the format (integer or floating point) of the pixels in the text file by reading the first one and assuming all others are the same.
1. Read a file written by wtextimage from the magtape file "mta[1]" into the IRAF image "picture".
cl> rcard mta[1] | rtext out=picture
2. Read a series of text files with no headers preceding the pixels. The text files were previously read from tape with task rcardimage . The two dimensional images are 512 by 320 pixels, and will be named crab001, crab002, crab003, etc.
cl> rtext text.* crab header- dim=512,320
3. Read a file with a non-standard header. The header is 5 cardimages long.
cl> rcard mta[5] | rtext out=spect.1 head- nskip=5 dim=1024
Task rtextimage requires about 145 cp seconds to write a 512 square image (integer or real) from a text file.
The text file being read cannot have lines longer than SZ_LINE characters (see hlib$iraf.h).