some simple functions in iraf and how to flatten...

24
Some simple functions in IRAF and how to flatten frames

Upload: lamnhu

Post on 12-Sep-2018

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

Some simple functions in IRAF and how to flatten frames

Page 2: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

On the work stations in the computer lab we will set up the standard Image Reduction and Analysis Facility (IRAF) for each user by having each user type these commands in a Terminal window. (Here <cr> is a carriage return.) cd <cr> mkdir iraf <cr> cd iraf <cr> mkiraf <cr> Here you are prompted for a terminal type. You must type in the letters xgterm <cr>

Page 3: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

We will want to edit one line of a file called login.cl which will now exist in your iraf subdirectory. The line should read set stdimage = imt2048 Once you save the new version of login.cl with an editor, you start up IRAF by typing the command runiraf <cr> This will pop up an xg-terminal window and after some delay an image display window (DS9/SAOImage). IRAF commands are entered at the > prompt in the xgterm window.

Page 4: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

Typing the ? At the IRAF prompt will give a list of packages that exist at that level of the system. If you type Ø  noao Ø  imred Ø  ccdred

You will be at the right place to flatten some frames. To back up one level the command is Ø  bye

Page 5: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

A number of useful linux commands work from the IRAF prompt such as pwd (print name of working directory) cd (change directory) If you’ve created an astr320 subdirectory and put data files into a subdirectory of that called jan6, you can set your default directory within iraf by typing the following at this point in the xgterm window at the > prompt. Ø  cd .. Ø  cd astr320 Ø  cd jan6

Page 6: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

You could see all the files in that directory by typing Ø  dir

Try displaying one of the FITS files like this: Ø  display ccd127 1

This should display the image ccd127.fits. The header information of that file can be displayed doing this: Ø  imhead ccd127 l+ The last two characters are a lower case L and a plus sign.

Page 7: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at
Page 8: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

Note the parameters OBJECT, UTSTART, FILTER, EXPTIME (exposure time), and AIRMASS. You could make a text file containing the values of these parameters For all the FITS files in the directory by doing this. The output will be put into a text file called a.log Ø  hselect *.fits $I,object,utstart,filter,exptime,airmass yes > a.log Such a log file may have been provided with the data files that you have in the directory. This is very useful for knowing which file(s) you are working on.

Page 9: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

A CCD chip contains one to several million picture elements (pixels). They have different sensitivity. To “flatten” your data frames involves: 1)  creating a master bias frame (using exposures of zero seconds) 2) creating a skyflat or a domeflat frame for each filter you observed with 3) applying the master bias frame and the appropriate flat frame to all the data frames, filter by filter

Page 10: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

Say you took 10 exposures of zero seconds before observing for the night, and these are files ccd037.fits through ccd046.fits. One creates a little text file (named, for example, zlist, containing these names). This is done in a Terminal window with an editor. ccd037.fits ccd038.fits ccd039.fits ccd040.fits ccd042.fits ccd043.fits ccd044.fits ccd045.fits ccd046.fits

Page 11: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

Two parameters relevant to the CCD camera used at the Las Campanas 1-m telescope in 2012 are the gain ( = 2.5 electrons per analog to digital unit) and the read noise of 6.5 electrons. We will need these soon enough. But first we must turn off some functionality in a program called ccdproc. After starting up IRAF Ø  noao Ø  imred Ø  ccdred Ø  epar ccdproc

Page 12: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

epar and the name of some program allows you to inspect and change parameters. We want to set all but one of the yes/no switches from fixpix to scancor to “no”. This we do with the up/down arrow keys and by typing “no” a lot. When you’re done changing these parameters in ccdproc, you exit by typing :q

Page 13: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

> :q

Page 14: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

Now we want to use the IRAF program zerocombine to combine the bias frames. We will create a file called Zero.fits by average-ing the 10 files specified in the file zlist. The FITS header parameter ccdtype for these images is set to the word zero.

Page 15: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

Note that we have set the read noise to 6.5 and the gain to 2.5 electrons/ADU.

> :go

Page 16: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

Next we want to create a V-band domeflat frame and a B-band domeflat frame. These images were obtained by shining a light on a bit white screen in the inside of the dome during the daytime with the dome closed. Say there is a file dv that contains the V-band domeflat images: ccd0023.fits ccd0024.fits ccd0025.fits ccd0026.fits ccd0027.fits ccd0028.fits ccd0029.fits

Page 17: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

At this point we do want to subtract the master bias frame from the domeflat images, so we have to set couple switches in ccdproc. We set zerocor to yes and set the name of the master bias frame to Zero > epar ccdproc

Page 18: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

> :q

Page 19: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

Next we use the program flatcombine.

> :go will produce V-band flat file domeflat_v.fits

Page 20: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

We can investigate many things with the iraf program imexam. Individual options are: l make a plot that give a horizontal cut c make a plot that gives a vertical cut r radial profile of a star e 2-D contour of a star s 3-D looking contour of star/galaxy

Page 21: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

Plots made with imexam using the “c” option (above) and the “l” option (below). The file is the V-band domeflat file make from 7 images taken on 6 Jan 2012.

Page 22: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

Of course, we want to make a file containing the list of B-band domeflat images (db) and produce a B-band domeflat called something like domeflat_b.fits. Finally we are ready to flatten the V-band data frames and the B-band data frames. Say we have made a list of V-band data files and called it vlist. Then we would use ccdproc as shown on the following slide. We have set images to @vlist, flatcor to yes and flat to domeflat_v

Page 23: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at
Page 24: Some simple functions in IRAF and how to flatten framespeople.physics.tamu.edu/krisciunas/flatten.pdf · Typing the ? At the IRAF prompt will give a list of packages that exist at

We need to create a skyflat or domeflat file for each of the filters we observed in (for which we are going to do subsequent analysis). So now we would something like blist and domeflat_b to process the B-band images. It is a good idea to keep a completely unprocessed set of files you are working on, as one can mess up the trimming, bias correction, and flattening.