Creating
Graphics
IGOR
Pro is first and foremost a publication quality scientific
and engineering graphics program. Each element of a graph
can be finely adjusted to meet your (or your journal's)
exacting requirements. For example, line thickness may
be specified as 1.35 Points -- not just 1 or 1.5. Not
only are many dash patterns provided, but you can also
customize them with a graphical dash pattern editor. Virtually
any graph you see in your favorite scientific or engineering
journal could have been made using Igor -- and many of
them have been.
Simultaneously,
Igor's graphs are exploratory tools of the first order.
Graph updating is extremely fast allowing you to smoothly
zoom in and out and pan in all directions even with millions
of data points. And unlike some competitors, Igor always
plots all of your data so you don't miss features that
others may skip. Igor's cursors provide live readouts
of your xy or image data and can be used to specify data
subsets for analysis. You can compose fancy text annotations
called tags that dynamically update as the data changes
or as you move a tag to a different data point. Graphs
automatically update to take full advantage of the available
space when you resize a graph window.
Igor's
2D graphs are exceedingly flexible. You can create graphs
with an unlimited number of traces, axes, contor plots,
images and annotations. You can embed graphs within other
graphs and can compose page layouts with multiple graphs,
tables, annotations and pictures.
Speaking
of flexible, Igor's image plots can use any data type
from unsigned byte to double precision complex (complex
data is automatically presented as magnitude.) Pixels
can even have uneven spacing as with a log axis or user
specified x or y values. Images can be true color or many
different forms of false color. You can even specify what
happens for out-of-range data.
You
can use Igor's powerful drawing tools to annotate your
graphs or page layouts with lines, arrows, rectangles,
Bezier curves and many other types. Multiple layers are
provided and all tools may be used programatically. Unique
to Igor is the ability to specify the coordinate system
for draw objects. For example, you might specify the coordinates
of a background shaded area to be in terms of a pair of
axes. This would allow you to zoom or otherwise adjust
the axis ranges but still have the shaded area remain
in the correct location relative to the data.
You
can use Igor's annotation editor to create precise and
sophisticated text annotations. Igor goes way beyond simple
sub- or superscripts with precise and flexible layout.
Annotations can be designed to automatically respond to
changes in font or size and can dynamically include data
values.
You
can create visually stunning 3D graphics using Igor's
Gizmo and Surface Plotter modules. Be sure to visit the
gallery as well as the 3D graphics web pages to see these
"cool" graphics.
Image
Processing
IGOR
Pro contains a full set of operations and functions for
scientific image analysis applications which make it an
ideal cross-platform tool for image acquisition, display
and processing.
Image
acquisition can be as simple as loading multi-dimensional
data from disk file or as complicated as using an XOP
to grab live video frames to disk. (See XOP Toolkit for
information on creating your own XOP.) In both cases the
images can be displayed on the screen for manual inspection
and analysis or they could be automatically analyzed without
user intervention. The processing and analysis stage depends
on the nature of the images and the information of interest.
The
main component of the image processing tools are the ImageXXX
operations which are supplemented by the image processing
procedure files. The latter are combined as the Image
Processing Package which you can load from Analysis menu.
In addition to the dedicated ImageXXX operations you can
also take advantage of general analysis functions such
as FFT and curve fitting in image processing applications.
Image
display can be as simple as placing an RGB image in a
graph window or as complicated as creating an overlay
of multiple images combined with contour lines and legend.
Being able to display images in false color or using a
non-linear level mapping is sometimes helpful when trying
to manually analyze images.
The
conventional approach to image processing involves the
following steps:
(1)
image transformations and color conversions where the
acquired image is converted into standard form in colorspace
and in range.
(2)
Image filtering (cleaning up the image to improve S/N
ratio) can be accomplished using localized filters or
mathematical transforms.
(3)
Threshold operation to convert the image from a gray-scale
to a binary form.
(4)
Morphological filtering usually follows the threshold
operations but some morphological operations can actually
precede the threshold step. Typical morphological filters
include: erosion/dilation, opening/closing, tophat and
watershed.
(5)
Particle analysis is the operation where the filtered
binary image is analyzed by quantifying various spatial
properties of different "particles" (i.e., spots
or regions) in the image. The spatial measurements include
location, area, perimeter and moments for calculating
a fitting ellipse.
Data
Analysis
"Data
analysis" derives meaning or significance from raw
data: it answers questions like "how much?",
"how high?", or "how often?". Since
Igor aims to serve a wide range of disciplines, it provides
many analysis capabilities to choose from. We present
them here in our somewhat arbitrary categories:
- Curve
Fitting
- Linear
and non-linear fits
-
- Built-in
and user-defined functions
- Multi-variate
fits involving unlimited independent variables
-
- Peak
Analysis
- Peak
and level-crossing detection
- Fitting
multiple overlapping peaks
- Baseline
removal
-
- Signal
Processing
- Multi-dimensional
mixed-radix FFT, wavelet, Hough transforms
- Integration
and differentiation of data
- Convolution
and correlation
- Smoothing
and filtering
-
- Statistics
- Descriptive
statistics such as mean, standard deviation and higher
central moments
- Statistical
Tests
- Probability
Distribution Functions, Cumulative Distribution Functions
and Inverse CDFs
- Histograms,
Sorting, Resampling, Correlations and Linear Regression
See
Also:
- Data
Manipulation
- Analysis
of Functions
Data
Manipulation and Math
IGOR
provides an extensive library of math and data manipulation
routines and IGOR's array-oriented arithmetic make complex
operations a snap.
IGOR
provides all the mathematical operators and functions
you would expect -- and then some. You can quickly find
the desired function or operation using IGOR's handy help
browser as illustrated to the right.
Many
of IGOR's algorithms are from Numerical Recipes and the
LAPACK numerical library.
Array
arithmetic is the most flexible and powerful part of Igor's
analysis capability. It allows you to write assignment
statements that work on an entire Array or on a subset
of an Array much as you would write an assignment to a
single variable in a standard programming language.
You
can access all of the most common operations via easy-to-use
dialogs. Later, as you learn from watching as the dialogs
synthesize commands, you can type directly on IGOR's command
line or write routines to perform specialized operations.
By
way of example, here are the command lines that create
the data and the image plot shown on the right:
Make/N=(150,150) data1 // create a 150x150 array
SetScale x,-1.5,1.5, data1 // set x and ...
SetScale y,-1.5,1.5, data1 // ... y scaling
data1= exp(-(x^2 + y^2)) // operation on entire array
NewImage data1 // display the results
ModifyImage data1 ctab= {*,*,Rainbow,0}
In
addition to array arithmetic, IGOR also provides a matrix
math facility that makes it easy to perform matrix manipulations
such as matrix multiply and dot product using a natural
syntax.
Here
are some of the data manipulation methods provided in
IGOR:
- Interpolation
- Igor
has a number of interpolation tools that are designed
for different applications. One dimensional data (vectors)
can be interpolated using linear, cubic spline and smoothing
spline methods. 2D (matrix) data can use bilinear, splines,
Kriging and Voroni while 3D (volume) data can be treated
with trilinear and barycentric methods.
- Integration
and Differentiation
- The
Differentiate and Integrate operations provide a number
of algorithms for operation on one-dimensional waveform
and XY data. These operations can either replace the
original data or create a new data set with the results.
The easiest way to use these operations is via dialogs
available from the Analysis menu. These handy dialogs
even provide for graphing the results.
- Sorting
- Sort
operation sorts one or more 1D numeric or text data
sets in ascending or descending order. Multiple sort
keys are supported (for cases where the first key has
identical values). MakeIndex and IndexSort are also
provided for extra flexibility.
- Extraction
- The
Extract operation makes it easy to extract subsets of
data that correspond to specific criteria. For example,
Extract/O source,dest,source>10 && source<20
creates
a new data set named dest containing values from soruce
that are between 10 and 20. You can also find the index
values where the expression is true so you can access
the subset in place.
- Smoothing
- Igor
has three built-in algorithms. Each one effectively
precomputes smoothing coefficients according to the
smoothing parameters, and then replaces each data wave
with the convolution of the wave with the coefficients.
The bulit-in methods are:
- Binomial
Smoothing: The Binomial smoothing operation is a
Gaussian filter. It is the sharpest filter that
will not cause ringing on a step or impulse.
- Savitzky-Golay
Smoothing: Savitzky-Golay smoothing uses a different
set of precomputed coefficients popular in the field
of chemistry. It is a type of Least Squares Polynomial
smoothing. The amount of smoothing is controlled
by two parameters: the polynomial order and the
number of points used to compute each smoothed output
value.
- Box
Smoothing: Box smoothing is similar to a moving
average, except that an equal number of points before
and after the smoothed value are averaged together
with the smoothed value.
In
addition to built-in smoothing, you can perform smoothing
(or any other finite impulse response type filter)
using your own coefficients with the SmoothCustom
operation. Each smooth type, including SmoothCustom,
can pick from several end-effect algorithms.
Analysis
of Functions
Igor
includes several operations that work on functions rather
than discrete data points. These operations include
Plotting
of functions
Making
a graph of a function in Igor is easy. For simple expressions,
use arithmetic expressions entered on the command line.
Igor's programming language allows arbitrarily complex
non-linear functions expressed as user-defined functions
that can be used to make a graph.
Differential
Equations
Numerically
solve ordinary differential equations, making possible
simulations of dynamic systems.
Optimization
Use
the Optimize operation to find minima and maxima of functions
expressed using Igor's built-in language. Optimize functions
of any number of dimensions, using a choice of methods
including simulated annealing.
Function
Roots
Use
the FindRoots operation to find roots of functions expressed
using Igor's built-in language. You can use Igor to find
N-dimensional roots of systems of equations.
The
FindRoots operation can also be used to find complex roots
of polynomials.
Integration
of Functions
Find
numeric integrals of continuous functions using a choice
of methods. By nesting integrations, you can integrate
an N-dimensional function.
Data
Exploration
Because
IGOR's 2D graphs are so fast, you can quickly explore
large data sets by zooming in and out on portions of a
graph. You can drag a marqee selection around an area
of interest and then click in the center to access a popup
menu to expand or contract about that area. Here is an
example:
And
here is the result after choosing expand:
Before
choosing the popup menu, you can adjust the selection
by dragging the marquee's handles. After zooming in on
a region of interest, you can pan around in all directions.
An
even zippier tool is provided as a bulit-in procedure
package that makes an copy of your graph with an expanded
view of your data that follows the cursor as you move
the mouse pointer over the original graph. You can experience
the quickness of this tool for yourself by downloading
the demo version of IGOR (anonymous download -- no registration
or forms to fill out) and then following these instructions:
- Start
IGOR and either:
- Load
and graph your own data or
- Load
any of the example experiments with graphs of large
data sets or
- Create
synthetic data by copying these lines...
Make/N=10000 data1;SetScale x,0,10e-3,"s",data1
data1= 2+2*cos(x*300)+10*exp(-(1e4*(x-3e-3))^2) + 1*exp(-(1e4*(x-6e-3))^2) + 0.3*exp(-(1e4*(x-6.2e-3))^2) + gnoise(0.03)
Display data1
...and
then executing them in IGOR. In IGOR, type CTRL-J
(Windows, cmd-J Mac) to bring the command window
forward, paste and then press return.
- With
the graph frontmost, from the menu bar, choose Graph->Packages->Graph
Magnifier.
- In
the resulting control panel, click Do It.
- Move
your mouse over the data in the original graph.
- When
finished exploring, click the Done button that was added
to your original graph.
Info
Box and Cursors
You
can put an information box on a graph by choosing Show
Info from the Graph menu while the graph is the target
window. An info box displays a precise readout of values
and also provides a convenient way to specify a region
of interest for operations such as curve fitting.
Here
is an example of the Info box and cursors on an XY plot:
And
the following example shows that cursors can also be placed
on image plots:
When
cursors are placed on image or waterfall plots, z and
delta-z values are added to the info box.
A
variety of cursor styles are provided. Cursors may be
attached to data points or may be free to roam throughout
the plot area.
You
can move cursors in several ways. In addition to the slider
control shown in the examples, you can use the mouse to
drag cursors to different points or different traces or
images. Each graph window can have its own info box and
cursors.
Programming
IGOR
Pro includes a powerful and full-featured structured programming
language that you can use for automation of data import,
file I/O, analysis, data acquisition, graphing, drawing,
printing, and just about anything you can think of. You
can add menus to the program and create control panels
containing buttons, checkboxes, popup menus, and other
controls to set parameters or display results.
IGOR
Pro aids you in your programming tasks with syntax coloring<
and a symbolic debugger that will help you efficiently
troubleshoot your code.
IGOR
Pro ships with many examples illustrating (among other
things) peak fitting, signal processing, data acquisition,
test automation, and graphing techniques.
- Programmability
- Complete
built-in structured programming language
- Over
180 built-in functions and 340 built-in operations
- Many
additional functions and operations supplied by XOPs
and WaveMetrics-authored user procedures
- Symbolic
debugger
- User-definable
math and string functions
- All
aspects of IGOR Pro can be programmed
- Controllable
by external scripting systems
- Syntax
coloring in procedures
- Integrated
help and documentation
- Search
across multiple program source files
Custom
Interfaces
You
can easily create custom interfaces to accomplish specialized
tasks. Igor´s dialogs and contextual menus make it easy
to construct a user interface to specialized analysis
code.
Available
Customizations
- Create
control panels and graphs with controls that implement
custom behavior using Igor´s built-in programming language.
- Add
your own menus or modify Igor´s menus.
- Create
custom help for other users.
- Write
"external operations" in C or C++ to add special
windows to Igor or to control or acquire data from instruments.
Examples
of custom interfaces are shipped with Igor. You can find
them in the File->Examples menu. Some major features
of Igor are implemented using a custom interface like
the ones you can build, among them the Image Processing
and Polar Graphs packages:
Notebooks
A
notebook is a window in which you can store text and graphics,
like a mini-word processor document.

Typical
uses for a notebook are:
- Keeping
a log of your work
- Generating
a report
- Examining
or editing a text file created by Igor or another program
- Documenting
an Igor experiment
A
notebook can also be used as a worksheet in which you
execute Igor commands and store text output from them.
There
are two types of notebooks:
- Plain
notebooks
- Formatted
notebooks
Formatted
notebooks can store text and graphics and are useful for
fancy reports. Plain notebooks can store text only. They
are good for examining data files and other text files
where line-wrapping and fancy formatting is not appropriate.
In
formatted notebooks, you can control document properties
such as margins, background color, headers and footers,
paragraph properties such as margins, tab stops, and alignment,
and character properties such as font, text size, and
text color. You can create "rulers" which encapsulate
styles and apply them to paragraphs. You can insert pictures
and dates.
A
formatted notebook can be exported as an Igor help file,
as a Rich Text Format file (which can be opened by most
word-processors), and as HTML.
Using
Igor's programming environment, you can write a procedure
that creates a notebook, inserts text and graphics, and
sets formatting.