IDL> window,0 & plot,x,y ampserand used to separate commands on the same line
See online help for details on how to modify their default sizes, title bars, positions, etc.
You can create multiple plotting windows using IDL, and move between them easily. Here we use the optional keyword XTITLE to label the x axis - see online help for complete list of keywords IDL> plot,x,y,title='First plot',xtitle='X axis',ytitle='y axis label' IDL uses keywords to pass (often optional) information. Try to understand what the following does using online help. use IDL> ? fltarr to see what this line does. IDL> y=fltarr(50) semicolon marks a comment line. One can create arrays, 1-D or 2-D, easily as well.
After typing a few commands, check that the file has been created in the proper place ('My Documents\AY361\a圓61 users') Please use JOURNAL to record your sessions for future reference. When you exit IDL (or type 'journal' again with no filename), the reconding session will end.
Start the recording process by typing the following command. IDL can also save all your interactive session by using the JOURNAL command, and this will part of your tutorial today instead of filling out a separate worksheet. This information is also shown in the 'Variable Watch Window.' For more information on IDL data types, you can invoke IDL online help by typing a '?': try a search for 'data types.' You see that 'a' was declared as a float, while 'i' was declared as an integer. Unlike in more structured programming languages (e.g., C++, Fortran), one does not have to explicitly define variables in IDL rather, variables are defined implicitly through their use. This will set up your path and a few other things (for instance, you can browse the procedures of the Astronomy library in \My Documents\astron\contents). After opening this file in an IDL editor, you should be able to compile (using right mouse button or ctrl^F5) and to then run it (choose from right-button popup menu, or hit F5). To setup the environment properly, you need to compile then run the idl_startup.pro file mentioned previously. The idlde environment allows you to look at local variables, edit procedures/scripts, inspect previous commands, and issue new commands. When you begin idl under Windows 2000, you will see the idl development environment (idlde):
I have included links to other online IDL tutorials if you want to learn more also, there are lessons in the IDL reference books in the 8th floor Dennison Computer Room.Īfter logging in as user astroclass (windows, lsa domain), I recommend you start IDL by clicking on the file: My Document\AY361\a圓61 materials\idl_startup.pro (you should also be able to find IDL v5.2 under the Start menu). Please name these files as instructed so I can review them later as part of the grading. There is no separate Worksheet to fill out, but rather the tutorial instructs you to create a 'JOURNAL' file of your IDL session and also asks you to create postscript plots at a number of junctures. After this tutorial (and with frequent consulation of idl help '?'), you should be able to effectively use IDL to analyze and present the data taken during subsequent experiments. This tutorial is meant to take approximately 2 hours and expose you to the basic functionality of IDL.