Unformatted text preview:

Astronomy 480 - IRAF Tutorial and Exercise IIntroduction to IRAFImages Used/net/projects/Astro_480/exercises/exercise1/bias_ave_050206.fits.gzphotos.tar.gztest-f1.fits.gztest-f2.fits.gzStarting IRAFThis is an exercise that should help acquaint you with the basics of IRAF. The first step is to get IRAF running properly, with appropriate auxiliary windows. 1.cd to your IRAF home directory.2.Start a new window by typing xgterm & at the Linux prompt on your machine. 3.Start up an DS9 window by typing ds9 & in the xgterm window.4.Now start up IRAF by typing cl –ecl (the flag means “enhanced cl”).Hint: It is important that you initiate IRAF like this, from within an xgterm window. If you find at some stage that a stream of unintelligible garbage is spewing at your IRAF session, you probably started IRAF from a regular xterm/KDE shell window. Also, be sure you start IRAF from the directory that contains the IRAF initialization file, login.cl. READ THE PRECEDING SENTENCE AGAIN! The xgterm is set up to interpret graphical information, and to open up a graphical (i.e. plot) window as appropriate.This will give you the IRAF prompt ecl>. In this, as in forthcoming exercises, the commands (shown with a different font) after the prompt (either % or ecl>) are meant to be typed by the user; the # -sign or ; -sign indicates a comment. You can pass commands on to the Linux operating system by prefacing them with a “!”, for example try this ecl> !more login.cl which will run the Linux process “more” on the file called login.cl. You can move down by hitting the spacebar, just as in Linux. Notice that there are a number of initialization parameters that take effect when you start up IRAF. IRAF’s heritage is complicated, and much of the syntax was initially like an antique operating system called VMS. There are many instances, however, when the intrinsic IRAF command is identical to the Linux one. For example ecl>!ls and ecl>ls have the same effect, but you should think of the former as being passed up to the Linux operating system while the second is being carried out within IRAF. File Transfer for this Exercise In order to speed transfer over a network and minimize disk space, image files are often stored in a compressed format, that preserves all the information but reduces the file size. From within IRAF, let’s move your test images into a working directory and uncompress them. A typical suffix for compressed files is .gz.3/21/08 IRAF1.odt 1Inflexible!NOTE: The directory dedicated to your quarter is indicated as spring-?? throughout this exercise. Substitute your year for the ??, as in spring-07, spring-08, spring-09, etc.Since images proliferate rapidly, it’s important to use the directory structure to help with organization and bookkeeping. There are a number of ways to do the same thing within Linux as well as IRAF. An example of how to copy files follows (in case your Linux expertise is a bit rusty).#Assuming you are in IRAF and do not have an exercise directory created: ecl>!mkdir exercise1 #create a directory for this exercise within your course directory ecl>cd exercise1 # this works as an IRAF command, too # copy compressed images to the current directory ecl>!cp /net/projects/Astro_480/exercises/exercise1/*.gz . ecl>!gunzip *.gz #uncompress the image files with the “gunzip” utility ecl>ls –l > after_gunzip #remember how you do this for future exercises! ecl>page after_gunzip #is the listing of the uncompressed files there?Now there should be some images called photo1.fits, photo2.fits and photo3.fits in your exercise directory. If they aren’t there, copy the file photos.tar.gz over from /net/projects/Astro_480/exercises/exercise1/ and extract them.Image HeadersThe next step is to familiarize yourself a bit with some of the basic operations of IRAF. Tasks with similar or related functionality are grouped together in “packages”. Tasks, and sometimes packages, have parameter files that control their operation. Your login.cl file determines which packages are loaded when IRAF starts. Others must be invoked by loading them as needed. Hint: If you type a favorite IRAF task that it does not “recognize,” the package is probably not loaded!The image data files we will be using contain both “header” information and digital data. The header information in FITS format files is stored as ASCII characters at the top of the file. You can actually peek at the header of a FITS file in Linux using the “head” command, but it’s not recommended. IRAF has a suite of tools to look at and edit header information. Try this to get started: ecl>package # show what packages are currently loadedecl>phelp images # help for the package "images"ecl>phelp imheader # help for task "imheader"; is the proper package loaded?phelp in IRAF acts like “more” in Linux: <space bar> # go to next page of help b # go back one page ? # view options q # quit the help for this task2LPAR (list parameters)Tasks in IRAF usually use parameters that modify the actions taken. These parameters are stored in parameter files in your uparm directory (a subdirectory off your IRAF home directory). To list the values of the parameters you use the utility lpar. It’s common to modify the values of these parameters when running IRAF. In order to revert to the default parameter set, you use the task unlearn. To list the settings of the set of parameters for the task imheader, you would type ecl>lpar imheader # list task parameters - task namesHint: Parameters need only enough characters specified to be identifiable, so tryecl>lpar imheaecl>lpar imh # this is not unique, more than one task name starts this wayecl>lpar imheader # note query and hidden parameters - query parameters are listed #first with hidden parameters following in parenthesesecl>unlearn imhead # unlearn parameters - go back to defaultsecl>imhead *.fits # short header listing - what does it tell you?ecl>imhead *.fits > shortheads # redirection works! Useful!ecl>page shortheads # the “page” task is the IRAF equivalent of “more” in Linux., as in #“phelp” above.ecl>lpar imhead # this lists the parameters of the task “imhead”… How do you change #them? ecl>epar


View Full Document

UW ASTR 480 - IRAF

Download IRAF
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view IRAF and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view IRAF 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?