18 Convert to a New Data Format

Script changetype.csh converts one or more input files to a new data format. The formats available include: NDF, FITS and IRAF OIF: see SUN/55[7] for a full list. The actual format conversion is carried out by KAPPA application ndfcopy and most of the rest of the script is concerned with checking that the file names are valid and generating suitable input and output names. You give the script a list of one or more input files and the output file type required.


To convert a single file to the GIF image display format type:
  % changetype.csh ngc2336_r_2.sdf gif

File ngc2336_r_2.gif will be generated. It can be displayed with, for example, the xv utility. (If you do display the image with xv it will appear mostly black because the dynamic range is dominated by a few very bright pixels. Use the histogram equalisation option to show more details.)

As a second, and perhaps more useful, example, to convert all the NDF files in the directory to FITS type:
  % changetype.csh ’*.sdf’ fit