8 Using different image formats

Little has been said so far about the image data format that PHOTOM programs will work with. The native format that these use is the Starlink NDF (see SUN/33). Files that contain an NDF are identified by the extension ‘.sdf’ and are accessed by PHOTOM programs when you just give the filename without an extension. So for instance if you have a file ‘image.sdf’ that contains an NDF then you just supply the response ‘image’ when prompted for an input image.

In addition to the NDF PHOTOM programs can also be made to use images in other formats, such as disk FITS, old-style FIGARO and IRAF, using the ‘on-the-fly’ conversion abilities of the NDF library. To make this work for you, you need to setup the CONVERT (SUN/55) package and then pass images to PHOTOM programs together with their file extensions. So if you wanted to work on the IRAF image ‘pix.imh’ you’d use a command sequence like:

  % convert
  % kappa
  % xmake xwindows -overlay -ovcolour green
  % display in=pix.imh device=xw
  % photom in=pix.imh device=xov
  ... enter interactive command loop ...

In this case the file extension “tells” PHOTOM and the KAPPA program DISPLAY that they have an IRAF image. You should look at the CONVERT document (SUN/55) to see the list of formats that can be processed.