Basic setup for using IDL.
You can start using IDL right away by just typing idl at a terminal prompt, but
to get it to work right you have to have a few setup files first.
The first is an idlenv file containing your idl environment variables
and the path to an idl startup script that will be read and executed
each time you start an idl session. The syntax for setting
environment variables is different for different shells.
It's easiest to make this a hidden file called .idlenv in your home
directory.
If you're using bash, then your .idlenv file should look like the
following: (change "yourname" to your actual login name in the
directory paths below)
IDL_DIR=/usr/local/rsi/idl;
export IDL_DIR
IDL_PATH=\+$IDL_DIR/lib:+~yourname/idl/lib:+/usr/local/rsi/external/lib;
export IDL_PATH
IDL_STARTUP=/home/yourname/idl/idlstartup;
export IDL_STARTUP
If you're using tcsh, here's the equivalent .idlenv file:
setenv IDL_DIR
/usr/local/rsi/idl
setenv IDL_PATH
\+$IDL_DIR/lib:+~yourname/idl/lib:+/usr/local/rsi/external/lib:
setenv IDL_STARTUP
/home/yourname/idl/idlstartup
The .idlenv sets the following stuff up:
- The IDL_DIR variable sets the location of the current licensed
version of IDL
- The IDL_PATH variable sets the path of directories that are
searched for IDL scripts when you issue a command. There are IDL
built-in routines in $IDL_DIR/lib, and there's a very useful library of
astronomical IDL routines (including such things as FITS file readers,
coordinate precession routines, etc.) maintained at GSFC which I've put
into /usr/local/rsi/external/lib. You can put your own IDL
scripts into /home/yourname/idl/lib or in a subdirectory of that.
- The IDL_STARTUP gives the pathname to a file that gets executed
each time an IDL session starts.
To make sure that your .idlenv file gets read every time you start up a
new window, put the following line in your .bashrc or .tcshrc file:
source
~/.idlenv
Here's a useful
idlstartup file that makes color tables work properly on our systems
with 24-bit graphics. Put the following lines in a file and save
it in /home/yourname/idl/idlstartup which will be executed at the
beginning of each IDL session:
device, true_color = 24
device, decomposed = 0
device, retain = 2
Now, with your .idlenv and
idlstartup files, everything should be set up to run IDL.
To access the IDL online help, just type ? from an IDL prompt.
ATV is
a program that I wrote for viewing astronomical images in IDL.
It's installed in the external library, so if your IDL path is set as
above, you can just type atv
at the IDL prompt to try it out.