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.
Input/Output, Plotting Data and Displaying
- DIsplay - display an image on the monitor
- GEt - get I(V) curve from multiple I(V) data set
- INput - input data from a file into data array
- LIst - list contents of data array
- Modify/h - modifies contents of header values
- OUt - outputs data array or image to file
- PLot - generates line plot (graph) of data array
- Plot Multiple - generates multiple graphs per page
- PRint - prints out graph or image
- Segment - for large data sets, specifies which part to input
- SLice - generates current image from multiple I(V) data set
- XV - displays image on the monitor
Cutting, Scaling, Rearranging
- CReep - performs creep correction
- CUT - cuts region from data array
- DouBle - doubles numbers of rows of data array
- HAlf - halves number of rows of data array
- LImit - discards data containing limit markers
- MIrror - performs mirror reflection of data array
- MOdify/z - modifies data values
- MOdify/x - modifies x-calibration value
- SeLect - selects odd or even rows
- SHift - shifts successive rows or right or left
- SQuare - squares each data value
- XY - interchanges rows and columns of data array
Background Subtraction and Smoothing
- BAck - background subtraction
- CURvature - another type of background subtraction
- SMooth - line-by-line background subtraction
- SPLine - spline fits to determine background
- SPline Derivative - spline fit including 1st derivative term
Averaging and Deglitching
- AVerage/b - puts data into bins
- AVerage/r - running average of data array
- AVerage/x - averages image array by convolution
- AVerage/i - running average of image array
- GLitch - glitch removal on image array
- GLitch/d - glitch removal on data array
- MOdify/p - similar to GLitch/d
Fourier Transform and Filtering
- Correct Distortion - straightens out corrugation rows
- TRansform - fourier transform and filtering
Normalization of Spectroscopy
- BRoaden - broadening of data (used for I/V)
- HYsterisis - corrects hysterisis between scan up and back
- NOrmalize - substracts background and scales data
- RAtio - computes ratio of stored data arrays
- SUm - sums multiple data arrays
- WOrk function - computes work function
- ZEro - substracts zero level from data
- ZNormalize - scale data with exponential function
Roughness Analysis
Fits and Convolutions
- COnvolute - various types of convolution
- FIt - various types of fits
Rendering Images
- BLock - select block of image
- CRoss-section - cross-sectional line cut
- DRift - drift correction to image
- GRey or TOp - constructs image from data array
- GRid - marks grid of points on image
- HIstogram - performs histogram equalization
- MArk - marks line on image
- PAste - pastes multiple images together
- PErspective - 3-dimensional rendering of image
- ROtate - rotate and scale image
- SPot - mark specific spots on an image
- STatistics - plot histogram of grey-scale values
- Surface Normal - output values of surface normal