next up previous contents
Next: Other IDL notes Up: Lecture 1: Getting Started Previous: So, what is IDL?   Contents

Starting IDL.

To start IDL, type ``idl'' at the prompt in a terminal window. You should get a response like this:

{env-pc-jmarsham-new:jmarsham:164}% idl
IDL Version 5.5a (linux x86). (c) 2001, Research Systems, Inc.
Installation number: 16829.
Licensed for use by: The Environment Centre

IDL>

(There may be a warning message which you can ignore.) If you get that, you are ready to go. If not, then there is one thing you can check on. The file .cshrc in your home directory may need to contain the line:

# path to IDL
app setup idl

If it does not, edit .cshrc to add this line. Then either open a new terminal window or type the above line at the prompt in an terminal window that you already have open. IDL should then start if you type ``idl'' - if it doesn't, go and ask for help. (Or use

source .cshrc

or logout and login for the shell to ``look'' at the .cshrc file). Users of the Windows system can install the software from the network. An installer program and license file can be found in:

  \\env-apps-01\apps02\idl

Whilst we're on the subject of setting things up IDL only sees programs in the directory that you started it from unless you add a line such as,

setenv IDL_PATH "<IDL_DEFAULT>:+$HOME/IDL/Procedures"

to your .cshrc, which will allow IDL to find ``.pro'' files in any subdirectory of  username/IDL/Procedures/.

Adding,

alias whoidl '/usr/local/bin/lmutil lmstat -c 27000@see-lm-01 -S idl_lmgrd'

alias the complex command that let's you see who's using IDL to ``whoidl'' - useful when we run short of licences!

Lastly I find it really useful to edit IDL code in xemacs set to highlight the syntax in colour. Copying my setup should allow you to do this  jmarsham/.xemacs/init.el and  jmarsham/.xemacs/custom.el.

Lets assume now that IDL is working properly. Type ``idlinfo'' -- this tells you several things:

  1. IDL has a graphical programming tool called idlde. This is not covered in this course. You may find it useful for more complicated projects. I've never used it.

  2. IDL has some demonstrations built in which you can see by typing ``demo'' at the IDL prompt.

  3. The online manual may be started by typing ``?'' at the IDL prompt (or idlhelp at the unix prompt).

The last item is by far the most important. The on-line manual has details of every aspect of IDL. (If you don't like on-line manuals, there are manuals. There is also a book called IDL Programming Techniques by David Fanning. )

In general if you want to do something:

  1. assume it's written in IDL and guess what it's name should be and look it up in the help.
  2. If you can't find it ask around it may be there under an unlikely name!
  3. If there's an IDL routine that does almost what you want but not quite it may be written in IDL in
    /nfs/env-apps-01_apps01/rsi/idl_6.0/lib
    
    so you can copy it to a different procedure name and edit it (the simpler IDL routines are written in C though).

  4. If intrinsic IDL functions can't do it it may well be on the web try:
    http://www.dfanning.com/
    http://idlastro.gsfc.nasa.gov/homepage.html
    http://www.iac.ethz.ch/staff/dominik/idltools/idl_atmosphys.html
    
    etc.
  5. If not someone in the department may have done it, or know how to do it in IDL. There are IDL newsgroups etc on the web as well.
  6. Finally you may have to do it yourself! (Usually quickest for simple things).



Subsections
next up previous contents
Next: Other IDL notes Up: Lecture 1: Getting Started Previous: So, what is IDL?   Contents
John Marsham 2005-04-22