|
IDL TUTORIAL |
|
This tutorial for the Interactive Data Language (IDL) was developed for
graduate students in an introductory course on astronomical techniques
at the University of Virginia. It consists of a
guide to the basic
functions of IDL and a
set of exercises, both oriented toward
2-dimensional image processing:
- My
Guide to IDL for Astronomers provides background information on
IDL and an overview of many of the commands used in the exercises.
- The
exercises illustrate the interactive computational environment of
IDL and cover some of the basic IDL commands, utilities, and
procedures, including: the use of scalars, vectors, and arrays;
plotting; making graphics hardcopies; data I/O; 2-D image displays;
and simple image processing and photometry techniques. Sample
data sets are provided.
The tutorial is intended to be self-guiding. It is not specific to
the UVa IDL installation. Although the data sets are mostly astronomical,
the exercises should be useful to the general audience of potential
IDL users. With one exception, answers to the exercises are not
provided, but simple trial and error should quickly reveal the correct
methods.
Using the exercises
You will need a reference list of standard IDL commands to consult as
you go through the exercises. Most convenient is the printed "IDL
HandiGuide" (click
here
for the v5.4 version). Most thorough is the "IDL Reference Guide"
(printed or PDF version). Available during any IDL session is the IDL
HyperHelp system, which you invoke by typing
?
as the first element of a line.
All of these exercises could be completed using intrinsic IDL
routines and the Exelis-supplied User's Library. However, in some
instances the built-ins can be awkward, and I have assumed
you have access to routines from the IDL Astronomy User's Library
(AstUseLib) and the MOUSSE routines from the UIT project. These are
pre-installed on the UVa Astronomy Department server.
Other users can obtain a gzipped UNIX tar file of the Astronomy User's
Library from the AstUseLib
Homepage.
Selected MOUSSE routines are available individually or
in the form of a tar file in the
minimousse directory.
To execute the MOUSSE routines, you will also need a special "startup"
file named
mousse_startup.pro, which will be executed at the beginning of
your IDL session if you point the UNIX environment variable
$IDL_STARTUP to it.
In order to access any such external software during your IDL session,
all you need to do is to place the individual *.pro program files in
your IDL path. The programs will be automatically compiled when you
request them.
Other tips
- Help on any intrinsic IDL routine is available
through your browser during an IDL session if you
type ?[name].
- Remember that the source code for any IDL program except the RSI intrinsic
routines is available for you to inspect at any time. To compile
a program and simultaneously list it to your terminal, type
.run -t [name].
- To see only the informational header of
non-intrinsic routines, use the MOUSSE command man,'[name].
- Most non-intrinsic
routines are coded such that if you simply type the name of the
routine without parameters, it will return a list of the expected
parameters.
- For parameter lists of intrinsic routines, give the help,/rou command.
- Further information on
getting help is available in the
Guide to IDL.
- In the exercises, most commands are given in CAPITAL letters, so
they will stand out, but since IDL is case-insensitive, you needn't
follow this convention (except for file names).
The exercises were developed for Unix/Linux/MAC OS-X workstations.
Most should work well in Microsoft Windows,
though there may be occasional hangups with displays and such.
Please let me know of errors or difficulties you encounter with
the tutorial.
Tutorial:
Useful Links:
Translations of this page:
Last modified December 2020 by Robert W. O'Connell
All contents of this Tutorial are copyright © 2000-2020
by Robert W. O'Connell.
All rights reserved.
Source URL:
https://rwoconne.github.io/rwoclass/astr511/IDLexercises/index.html