Practical Advice for Exercise 1 1) Some basic unix commands to know are mkdir [directory name] (make a directory) cd [directory name] (change directory) ls (list the files in a directory) cp [infile] [outfile] copy infile to outfile 2) At some point you may need to use a text editor. You can't use things like Word on unix text files! Word files have all kinds of hidden information, whereas text files store only the ascii characters. GEDIT is probably the easiest approach. To use it, just say gedit [filename] and a window will open with the contents of the file displayed. You can simply type into that window, and then when you hit the Save button, the contents of the window is saved to that filename. There are a variety of clever things you can do inside gedit, but the most basic is simply typing. 3) You'll need to set up IRAF in your directory. To do this, issue the command "mkiraf" (for "make IRAF"). The "terminal type" should be "xgterm" (for "X-graphics-terminal"). This should create a file called "login.cl". This login file contains a lot of choices of features that can be varied - you can read it and use it but don't mess with it unless you know what you're doing. 4) To generate an xgterm window, type "xgterm &" in any kind of window - then a new window should appear. You should invoke IRAF in the new window, by typing the command "cl" in that window. This will work properly only if you are in the directory where the "login.cl" file is located. The & at the end of any command will execute the command in background mode and give you a prompt back, instead of just leaving the window hanging. 5) When IRAF gets going, you'll see a prompt "cl>", and a list of IRAF subdirectories and commands (the subdirectories are the ones with a "." at the end). If you type a subdirectory name, you'll get a list of additional commands/subdirectories that have been loaded, and the prompt will change. You can regenerate the list of commands by typing "?". You won't be needing these features for a while. 6) The four commands we'll be using for this exercise are imarith imcombine imstat imshift We will go over these commands in class. You can list the parameters of any command by typing "lpar [command]" (for "list parameters"). Those parameters that are listed at the top without parentheses are required each time you invoke the command - those with parens are not required, and you can often use the default values of these parameters. If you want to change a parameter, you can do "epar [command]" which puts you into an editor (vi in my case - the editor used is one of the things controlled by the login.cl file). You can then edit the default values, and ":wq" out to get back to the IRAF command line. It's worth checking out the list of parameters and their defaults just to see what's going on under the hood of these commands. 7) "cd" and "ls" are IRAF commands that work just the same way they do in unix. You'll need to cd to the directory where the image files are located to work on them. If you want to issue other unix commands from inside IRAF, you can do that by preceding the command with "!" (e.g. "!vi [filename]" will activate the editor from within IRAF). 8) If you need more information on any IRAF command, you can do "help [command]" within IRAF. That'll tell you more than you would ever want to know, including a precise description of all the input parameters, and exactly what the command does. 9) Note that you can often abbreviate IRAF commands by the initial letters - use "imcomb" instead of "imcombine" etc. If you use too few letters, it'll tell you that you've issued an ambiguous command. 10) Some useful features of IRAF include the "e" command, which gives you back the previous command, or "e [com]" which gives you back the most recent command that started "com" in this case. Also, you can use wildcards in the names of image files (that is "*.fits" means all files that end ".fits"). * is the wildcard for any number of characters, whereas ? is the wildcard for a single character. Another useful feature is the use of lists of images - if you make a textfile that contains a list of image files (one image file per line), you can use "@[filename]" instead of the whole list of images, where [filename] is the name of the file containing the list of images. This is very useful, esp in conjunction with the IRAF "files" command, which you can explore for yourself. 11) Dealing with the difference between the backspace and delete keys is a pain - it works differently within IRAF than it does from most UNIX systems.