-- Image Conversions Using IMPORT/EXPORT

Image Conversions Using IMPORT/EXPORT

New tasks for converting between various external data formats and IRAF images have been written. These tasks are scheduled to appear in the V2.11 release of IRAF, but they are available now for early testing as the external package imcnv. The new tasks are the following:

	import  -  Convert some other format to an IRAF image
	export  -  Convert IRAF images to some other format
Features of these tasks include:

import:

export:

The help pages contain many examples but one that may be most useful to astronomers is converting IRAF images for use in publications. In the simplest case this can be done using a command such as:

	im> export dev$pix example eps outbands="zscale(i1)"
The image will be rendered with the same intensity scaling as one would get from the display task using the default parameters. The EPS file produced may be be included directly in any document (e.g., LaTeX) that supports inclusion of Encapsulated Postscript figures.

A more complex example would be if you wanted to include in your paper two adjacent images (e.g., the infrared and optical image of the same field with stars marked on the frame). To do this, with a small gap between the images:

	im> export im1,im2 tmp iraf outb="zscale(i1)//repl(255,10)//zscale(i2)"
	im> tvmark tmp coords
	....interactively mark the objects you wish
	....save the result to an image named "new"
	im> export new fig1 eps 
The file "fig1.eps" then has the images side-by-side with the objects marked.

Images may also be combined to form color output, for instance, if you have three images taken through B, V, and R filters and would like to combine them into a color rasterfile:

	im> export Rim,Vim,Bim colorim ras outbands="i1,i2,i3"
When converting foreign formats for use within IRAF the import task, by default, will sense the size and format of each image to be converted. Colormapped images will automatically be converted to grayscale but there are always ways to separate the colors into separate image bands; RGB formats will generate a 3-D image. Users can extend the database of known formats individually, and scripts can easily be written to propagate, e.g., the header information from a VICAR format image.

A User's Guide is planned to more fully explain how these tasks may be used. Interested users may contact Mike Fitzpatrick (fitz@noao.edu) for information on package availability, questions, or suggestions for new formats to support.

Mike Fitzpatrick


This document was translated by ms2html v1.8 on 21Jan95.