| bin2iraf | ctio | bin2iraf |
bin2iraf -- Convert binary files into IRAF images
bin2iraf files images nlines ncols
This task takes a list of binary files and converts them into IRAF images. The image title will be set to the name of the corresponding input file. The output image data type is chosen automaticaly by the task depending on the file data type. It will be short for file types ubyte , ushort , and short ; int for file type int ; and long for file type long . The task can optinally swap bytes when reading each input line from a file.
1.- Convert a binary file containing unsigned bytes, into a 32 by 8 IRAF image, without byte swapping. List the image header afterwards:
ct> bin2iraf file.bin image.imh 32 8 data_type=ubyte swap=none
ct> imheader image long+
image[32,8][short]: file.bin
No bad pixels, no histogram, min=unknown, max=unknown
Line storage mode, physdim [32,8], length of user area 1 s.u.
Created Mon 17:03:23 05-Nov-90, Last modified Mon 17:03:24 05-Nov-90
Pixel file 'ctiol2!/ul21/iraf/iraf/imageaa.pix' [ok]
2.- Convert two binary files containing integers, into two 32 by 32 IRAF
images, swapping data every two bytes:
ct> bin2iraf file1.bin,file2.bin image1,image2 \ >>> 32 32 data_type=int swap=swap23.- Convert a binary file containing bytes, into a 512 by 320 IRAF image, skipping the first 128 bytes, and without byte swapping:
ct> bin2iraf file.bin image.imh 512 320 nskip=128 data_type=ubyte swap=none
The number of bytes to skip at the beginning of the files MUST be an integral multiple of SZB_CHAR (the size of an SPP character in bytes). SZB_CHAR is a machine dependent number defined in hlib$mach.h, normally equal to two bytes.