IMage analysis program

The program IM provides analysis capability for images and spectroscopic data acquired using STM and AFM instruments. The program consists of a collection of FORTRAN routines written by R. Feenstra over a the period of 1985 - present. Source code is located in the image directory of the stm_data project disk. The program accepts commands from the keyboard, with the command format allowing abbreviations of 2 or 3 characters. Commands options are indicated with a slash (/) following the command name. The user is prompted by the program for arguments to the commands.

The IM program is run in one of two modes: accepting commands from the keyboard (as described above), or with the commands placed into an ASCII file and this file is then passed to the program for execution. For example, the following command stream will input a file (we'll assume it's an image), perform automatic processing of the image, and display the result:

in		;input file
25may97.3
au		;automatic processing
di		;display the image
qu		;quit the program
The same set of commands could be placed in the file, e.g. 25may3.im, and executed by the command:
im < 25may3.im
This latter "batch" mode of execution is particularly useful for long and complex command streams. Also, this mode should always be used when defining command sequences for figures that will be incorporated into publications, since the command file then serves as a record of all the processing which was performed on the data. Commands issued within the IM program apply to specific types of data arrays which are fixed by the program:

First, there is the "data array", which is an array of real numbers that are read into the program during an initial INput statement. Most of the IM commands perform functions on this data array. The size and dimensions of this array are arbitrary, although if it is bigger than 512x512 the SEGment command must be used following the INput command. Locations within the data array are generally specified by giving their column values (x-locations) and row values (y-locations). The origin (0,0) location of the data array is in the lower left-hand corner when viewing the array as an image.

Second, there is the "image array", which is an array of 8-bit values with fixed size 512x512. This image array is is constructed from the data array using the GRey command. The 8-bit pixels have values between 0 and 255; the 0 value is reserved for indicating unused regions around an image, so the valid pixel values range from 1 to 255. Pixel locations within the image array are generally referred to by their (x,y) locations, with the origin (0,0) at the lower left-hand corner of the image.

In addition to these two main types of arrays, there are various other auxiliary storage arrays whose use and function are described in conjunction with the commands which use them. Also, manipulations involving roughness analysis sometimes use complex (real and imaginary) data arrays.

Summary of Commands by Function:

Abbreviations for commands are shown in UPPER CASE.