IDL Exercise 2

The purpose of this exercise is to set up your IDL environment and to write a file of IDL commands that can be executed with a command from the IDL command prompt.

The first step is to set up your IDL environment.
 

  1. Log onto your Unix account and open a Netscape browser. Connect to http://www.cis.rit.edu/class/simg211 (presumably you have done this, but the instruction is included for completeness.)
  2. This step assumes that you have not set up a directory to hold your exercise files. We will do that now.
  3. Use mkdir to create a directory named idl in your account
    Change to directory idl by using cd idl
    Use mkdir to make a directory named programs inside the idl directory

  4. Type idlde at the Unix prompt. This will start the IDL development environment.
  5. We will now set up your IDL environment so it knows the path to your /idl/programs directory.
  6. Under the Edit menu select "preferences". This will open a dialog box.

    Select the "Path" tab

    Select the Add button

    Type the full path to the programs directory in the window. It will be something like
    /nfs/cis/students/aaaaaa/idl/programs. This should be the path that you see when you type pwd while you are in the idl directory in Unix.

    Click the ok buttons and return to the IDL main window.

  7. Open an edit window by using File New or by clicking on the "New Page" icon on the toolbar or by typing CTRL-N. This will give you a page to type into in the main IDL window.
  8. Create your program by typing commans onto the page. An example of your first program might be
  9. PRINT,'Hello, this is my first IDL program.'
    A=3
    B=4.1
    HELP,A
    HELP,B
    C=4*A+3*B
    PRINT,'C=',C

  10. Use the File Save menu command to save the file  in the idl/programs directory. Give it a name that ends in .pro  For example, you might call it prog1.pro All IDL programs should end in .pro.
  11. At the IDL command prompt type @prog1 This should run the commands in your file and print the items that were requested in the program.
  12. Create a program file to investigate the effect of the arithmetic operators listed in the link operators.