a review of iraf and stellar photo me try data reduction

42
A Review of IRAF and Stellar Photometry Data Reduction Donna M Burton 0019420508 Complementary Studies B SCI4008

Upload: donnaburton4757

Post on 27-Apr-2015

608 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Review of IRAF and Stellar Photo Me Try Data Reduction

A Review of IRAF and Stellar Photometry Data Reduction

Donna M Burton0019420508

Complementary Studies BSCI4008

November 23 2008

Page 2: A Review of IRAF and Stellar Photo Me Try Data Reduction

ABSTRACT

IRAF, Image Reduction and Analysis Facility, is the most widely used software in data reduction and analysis in the astronomy community today. It is used extensively for photometry as well as many other fields of astronomical data analysis.

This paper considers a number of photometric tasks and how they are handled in IRAF.

1 | P a g e

Page 3: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

1) INTRODUCTION

It has been estimated that around 50 per cent of astronomer use IRAF - Image Reduction and Analysis Facility software regularly.1

“IRAF is the Image Reduction and Analysis Facility, a general purpose software system for the reduction and analysis of astronomical data. IRAF is written and supported by the IRAF programming group at the National Optical Astronomy Observatories (NOAO) in Tucson, Arizona. NOAO is operated by the Association of Universities for Research in Astronomy (AURA), Inc. under cooperative agreement with the National Science Foundation”2.

It is not a single application, but rather is a collection or library of programs called tasks that execute various functions. Associated with each task is a file of parameters whose values affect the execution of a task.

Photometry can be performed within IRAF in a variety of ways. The purpose of this paper is to review and consider some of these tasks and provide information with.

There are many extensive and theoretical works on the topics of Photometry, CCD data reductions and analysis and IRAF and some of these are listed in the reference section. This paper does not set out to be a how to for IRAF or photometry, but rather to provide a review of some of the tasks which are included in IRAF that can be used for photometric data reduction.

IRAF is an incredibly powerful tool. It does have a steep learning curve but it is certainly worthwhile putting in the effort to master it.

2) HISTORY OF IRAF

IRAF is considered to be the most utilized general purpose software system for the reduction and analysis of astronomical scientific data.

Initial design of the system began in 1981 at the Kitt Peak Observatory and following a number of years of development by the Northern Optical Astronomical Observatories (NOAO), the system was released publicly on a limited basis in February 1986 as version 2.2.

It is estimated that IRAF is currently being used by approximately 5000 users at 1500 sites around the world. IRAF is probably the most widely used on-site data reduction system in the astronomical community.

1 Tody, D. (1984) "The IRAF Data Reduction and Analysis System", Proc. SPIE Instrumentation in Astronomy VI, ed. D. L. Crawford, 627, 7332 http://iraf.noao.edu/

2 | P a g e

Page 4: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

It is without a doubt the most successful astronomical software system ever developed. Its development coincided with the development and proliferation of CCD’s in astronomy. The first release of IRAF was in February 1986. Prior to 1986, there were a few data reduction systems and a lot of home grown software packages few of which were supported or widely distributed.

The original release was on 9 track tapes and was sent to 50 sites which supported Unix and VMS.

Over the years it has been ported as needed to hardware platforms and operating systems as needed as technology has evolved.

3) INTRODUCTION TO IRAF

IRAF runs on most operating systems as it is a machine and device independent data analysis platform. It provides the user with a complete environment, independent of the host operating system architecture, for analyzing both general- and scientific data. I have been able, with varying levels of difficulty to install and run IRAF on Sun Solaris, Linux distributions including Ubuntu, Debian and Red Hat Enterprise systems as well on Mac OSX Tiger and Leopard. There is great documentation available on the iraf.net website as well as on macsingularity.org for Macintosh systems. I have also been able to install in Ubuntu on an XP machine using both VMWare and Microsoft Virtual Machine. It can also be run in Cygwin on Windows XP but I have not been able to get to work completely for myself.

Although it is certainly installed on machines at Mt Kent, Anglo-Australian Observatory and Australian National University machines at Siding Spring, the link I have is so slow so it made sense to be able to install it on my own machines. I did not attempt to compile it for 64 bit as I had read a number of issues relating to it not being 64 bit safe as yet.

I have included my documented steps for installing IRAF on Ubuntu as Appendix 1.

One issue that I have found is with operating system upgrades.

A major OS upgrade such as Mac OS Tiger to Leopard meant a rebuild of the system directories such as /dev and /include. This is where IRAF installs the fifo pipes for SAOimage or the vital /usr/include/iraf.h link. In most cases IRAF will continue to run because the local bin directory containing the 'cl' command is restored from a backup, but services like IRAF networking and image display failed. The solution was simply to rerun the install script after the upgrade.

IRAF is made up of four parts: the Command Language (CL) - the user interface to the system; the applications packages - the routines and algorithms that do the data analysis; the Virtual Operating System (VOS) - the foundation of higher level functions; the Host Interface System - the interface between IRAF's VOS and the host machine.

3 | P a g e

Page 5: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

Only the first two are directly apparent to the user in most cases. Usually you start IRAF with the cl command although you can also use xiraf, or imxiraf,. When you do so, you are invoking the command language in an xterm or xgterm window which thereafter serves as your command interface to IRAF.

The Command Language gives the user direct control over the data and the parameters involved in data analysis through an assortment of tasks that are logically organized into packages. Depending on the explicit instructions in your login.cl files, when you invoke IRAF you will see a listing of loaded packages.

IRAF comes with a graphics tool – XIMTOOL – but this runs on 8 bit colour and most modern machines use 24 bit colour so another graphical display program is commonly used.The ds9 program is an image viewer used by IRAF to display and allow for interaction with images. It allows for the examination and photometric measuring of images, and is what I use.

The program is capable of holding multiple images for display at once. It does this by using frames. Each frame contains a separate image.

There are many commands and functions in ds9 but they are too numerous to document for this paper. More information can be found at the website: http://hea-www.harvard.edu/RD/ds9/.

4) INTRODUCTION TO DATA REDUCTION

The process of data reduction is the means to recover the science data from images which, in their raw form, contain extraneous data related to imperfections in the optics of the telescope, flaws and sensitivity variations in the CCD, non-uniformities in filter transmissivity, debris in the optical train, vignetting of the optical beam, electronic signatures, and more. All of these effects add up to what is called an "instrumental signature" that is contained within the image, along with the science data.The basic steps in CCD image reduction are bias-level subtraction, zero-level subtraction, dark current subtraction, flat field division, and cleaning images of cosmic rays and bad pixels. If you have data in more than one filter, the bias subtraction and zero-level subtraction can be done on all the images in single passes, but flat fielding will require that the images be processes in individual filter groups.

These are the minimum steps that needed to separate the science data from the raw data. Once they are complete, it will be time to perform the photometric analyses required.

Undertaking these steps will systematically remove the instrumental signature from the raw data. It is essential to check your data after each reduction step to be sure that the processing was done correctly. You can probably assume that for all practical purposes IRAF is never wrong, however, it is a complex system and that can lead to user error. The practice of concatenating a letter onto the

4 | P a g e

Page 6: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

current root filename of your images at each processing step to prevent the overwriting images can save you a lot of effort when errors do occur.

After reading the raw images into IRAF with the rfits task, the ccd list command can provide useful information about each image. Assuming that the images have the root name 'ccd',

type

cl> ccdlist ccd* .

ccd0001.imh[1054,1024][long][dark][]:darkccd0002.imh[1054,1024][long][zero][]:biasccd0003.imh[1054,1024][long][flat][V]:skyflatccd0004.imh[1054,1024][long][object][V]:HIP90899

Each line displays image name, image size, image pixel type, CCD image type, subset ID, if one has been defined in this case V is the filter ID, processing flags, and title.

a) Bias-level subtraction

'Bias-level' refers to the number of counts recorded for each image pixel with zero exposure time and zero photons counted. It is attributable to the DC voltage maintained in the camera electronics to bias the semiconductor and keep the signal detected by the ADC from going negative. This base-level count in the recorded image pixel value is sometimes called a 'pedestal', since it represents a foundation of counts on top of which the science and other counts accumulate.

I usually take at least 10 bias frames from which a masterbias can then be made. These have "IMAGETYP = zero" in the headers, so ccdlist *.imh ccdtype=zero > zero.list will list them.

The IRAF task zerocombine will then perform the addition of individual bias frames. Appendix 2 includes the parameters for zerocombine. The IRAF help pages give the meaning of all the parameters.

After modifying the lpar file as required the process can then be run:

cl > zerocombine

Check the resulting image which is now an average of all the bias frames.

The averaging together of many bias frames allows for stochastic bias variations unrelated to chip structure to be smoothed out, and so errors associated with the bias-level correction can be minimized with respect to readnoise.

5 | P a g e

Page 7: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

b) Zero Level Subtraction

The next step is to the zero-level bias structure from all frames.

To subtract the zero-level bias structure from the rest of your data, type

cl > imarith @vdatalist - mbias z//@vdatalist

Now your images have the same name as before but with a leading 'z' (zbcap0001...), and they are fully bias-subtracted. If necessary the parameter file for imarith can be edited as previously done with the zerocombine task parameters.

c) Dark Current Subtraction

On telescopes such as the SSO 40” this is not necessary but often with smaller telescopes and CCD’s it is undertaken.

Dark Current is just the contribution to pixel count levels of thermal electrons from the chip silicon itself. The chip is cooled down to some empirically determined temperature that optimizes efficiency and minimizes thermal noise. On WFI, on the 40”, the cooling suffices to render the dark current negligible and so no correction is needed. Dark Frames are exposures taken with the shutter closed. If they have been bias subtracted and zero level corrected then any counts that are left are most likely due to due to dark current, bad pixels, cosmic rays, or a light leak.

d) Data Reduction – Flat Fields

Flat field correction is necessary for several reasons. By definition, flat fielding, is the response of the detector to a uniform source of illumination. Uniform illumination is usually accomplished by exposing the chip to the twilight sky, or by exposing on a dome screen illuminated by a tungsten lamp projector. If the sensitivity of each pixel was identical, and there were no other effects, the flat field would have a constant value.

However this is not the case: different pixels have different quantum efficiencies due to small structural variations in the CCD and filters or other elements in the instrument optical train including dust. The flat field measures the resultant pixel to pixel variations in sensitivity. Unlike the previous corrections, which were additive, the flat field correction is multiplicative For example, one pixel may have only 30% the QE of the median, so to correct one has to adjust the counts in that pixel by a factor of about 3. Therefore images must be divided by the normalized flat field.

e) Flat Field Correction

6 | P a g e

Page 8: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

Generally, a series of flat field exposures is taken through each filter to be used during your observations, taking care to keep the total chip illumination level as uniform as possible from exposure to exposure. The flat field frames will be combined by filter type into a master flat field for each filter, using the task imcombine. Appendix 3 lists sample parameters for imcombine.

It is relevant to note that the hidden parameter combine is set to 'median', rather than the 'average' value as it was in the zerocombine task. The rejection algorithm is also different is because the images to be combined are fundamentally different from bias images, and the desired results differ. With the bias’s minor statistical variations from image to image were expected however but overall it was expected that they would have very nearly the same mean and standard deviation, and sought only an average bias level.

On the other hand, flat fields are finite time exposures of a variable illumination source, and hence are more vulnerable to radiation events. They also serve a different purpose. The flats need to be combined on an 'equal footing' in order to obtain a statistically 'smoothed' template to use for correction of the system flat field response.

In order to combine images with rejection of pixels based on deviations from some average or median they must be scaled to a common level. The sc=mode phrase is what enables each image to be scaled by its mode before combining. The flats are then combined into a master flat whose pixels represent the median of the individual flat field image pixels.

The process is as follows:

Create a list for each filter containing the names of the individual flatfields for that filter.

Give the lists names like vflat.list, bflat.list, etc.: ccdlist zvccd* | grep flat | grep V > vflat.list.

Use imcombine to combine the filter images together:

cl > imcombine @vflat.list vflat comb=median sc=mode statsec=[x1:x2,y1:y2]

Statsec is the region of the chip needed to get median and mode statistics. When complete there will be images vflat, bflat etc that are the master flat field frames for the V images, B images, etc.

Next the statistics on the master frames need to be obtained :

cl> imstat vflat[x1:x2,y1:y2].

Here the region specified in the brackets is the trim section determined. The imstat task will print to the screen the mean, standard deviation etc. of the image. Record this information.

7 | P a g e

Page 9: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

Normalize the master flat and rename it appropriately :

cl > imarith vflat / meanvalue normvflat

The normvflat will then be divided into your object images to give flat field corrected images.

This process then needs to be repeated for each filter.

To execute:

cl > imarith @vobject.list / normvflat f//@vobject.list

The bias subtracted, zeroed, flat fielded V images are now named fzvccd0001.fits etc.

To check the flatness of the images:

type implot imagename followed by :c 400 500.

The result will be a plot of the average of 100 columns centered on column 450. The sky levels should be flat across the image; to within a percent or so if this has been done correctly.

f) Dealing with Bad Pixels

CCD chips can have a variety of defects, ranging from isolated bad pixels or bad columns, to whole areas of the chip that are for one reason or another not reliable. Cleaning an image of these defects is not necessarily a trivial task. The most convenient methods for cleaning an image of bad pixels overwrite the original images so care is needed.

The fixpix routine is in the proto package. You need a list of images to be cleaned and a bad pixel table. The table should have entries of the form ``xbegin xend ybegin yend''. If you have a bad column at column 99 and a single bad pixel at x=450, y=300, the table would look like this:

99 99 1 1024 450 300

Put the coordinates in a file "badpix", and the images to be processed in a list "pixlist", then edit the fixpix parameter file: (see Appendix 4 for fixpix parameters)

Then run the task:

cl > fixpix @pixlist badpix

8 | P a g e

Page 10: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

g) Dealing with Cosmic Rays

Cosmic rays strike the CCD during an exposure leaving a characteristic signature: one or a few very high count pixels. They are normally very different from images of astronomical sources which distribute light over a larger area of the chip due to diffraction by the telescope optics and atmospheric turbulence.

The task cosmicrays is found in noao/imred/ccdred. The parameters threshold and fluxratio in the parameter file need to be defined to set the criteria the task uses to identify and replace cosmic ray hits. The parameter file is listed in Appendix 5.

The value of threshold determines the minimum count reading needed for a pixel to be considered a cosmic ray hit. It is based on a multiple of the background standard deviation. The fluxratio parameter is the ratio of the flux of neighboring pixels to that of the target pixel.

Imstat is used to look at a region of sky on the image using the command:

imstat image0001[x1:x2,y1:y2] verbose+ to obtain the standard deviation.

5) PHOTOMETRY METHODOLOGY

a) Introduction

One of the most basic astronomical measurements involves determining the flux from an object, over a particular range in wavelength or passband, which is intercepted by the detector. The process of extracting flux measurements from images is called photometry. In this context, flux is the energy received per second per unit area per unit frequency (or wavelength) interval: in frequency units, in wavelength units.

Photometry is not trivial. There are two major challenges; firstly, compensating for the absorption of light by the atmosphere called extinction and secondly eliminating unwanted light from sources other than the object of interest.

b) Absolute Photometry

To do absolute photometry requires the absolute sensitivity of the detector in output units per flux unit; the absolute transmission of the dispersing element or filter ; the absolute transmission or reflection of every element in the telescope and unless observed with space based instruments the absolute transmission of the Earth's atmosphere

In reality it is considered almost impossible to obtain such an absolute calibration of a system.

9 | P a g e

Page 11: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

Changes in conditions due to dust accumulation, aging or deterioration of surface, etc. would have to be known at all times.

c) Differential Photometry

If a star of known characteristics nearly adjacent to the target object in position and time can be observed, then it is possible to assume that both the objects are affected similarly by the system and hence that the characteristics of the target object can be determined by their ratio or difference relative to the "comparison" star. In practice, nearly all filter photometry is differential although this is possible only because a few astronomers have developed a system of suitable comparison stars through absolute photometry. These are called standard stars.

Differential photometry works by making observations of the target object and at least one nearby comparison star in the same field. Of course, any observation of an object will include also "sky" in the vicinity of the object. It is necessary to make appropriate measurements to allow subtraction of the sky from the object measurements. The next step is to calculate the flux from the target object in units of the flux from the comparison star and using the known flux or magnitude of the comparison star and so get the flux or magnitude of the target object.

d) Standard Magnitude and Color Systems

In the visual region of the spectrum, astronomers use a logarithmic system of flux measurement called magnitudes.

The magnitude system has its roots in a system of describing star brightness’s that goes back to the astronomer Hipparchus 2200 years ago.

It is necessary to first distinguish between “absolute” and “apparent” magnitudes. Apparent magnitudes are simply a measure of how much light gets to the Earth from a celestial object, and are represented with a lower-case letter, such as m = 12. This is determined both by the object’s intrinsic luminosity, by how far away it is, and how much stuff may be in between us and it that could block some of the light. The “absolute” magnitude of an object, on the other hand, refers only to its intrinsic luminosity, and is usually represented with an upper-case letter, M = 8 , for example. This is difficult to determine since you need a reliable way to establish the object’s distance. The measurement of this line-of sight distance is the one of the biggest challenges that astronomers face.

10 | P a g e

Page 12: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

Magnitudes are a logarithmic scale. Two objects that differ in measured flux by a factor of 100 are defined as having 5 magnitudes difference. The fainter of the two objects is assigned the larger magnitude value. For example, an object of 18th magnitude is 100 times fainter than an object of 13th magnitude.

The apparent magnitude difference between 2 objects is then given by:

m1- m2 = -2.5 log10 f1/f2

where m1 and m2 the magnitudes, and f1 and f2 are the observed photon fluxes.For any given telescope, filter and detector system, the apparent brightness of an object, expressed in apparent magnitudes, is given by

m = -2.5 log 10 (fx) + m0

where the constant m0 - the zeropoint - is determined by measuring the flux for “standard” stars that serve as calibrators.

There are a number of magnitude systems related to the wavelength regions involved. In most cases colors, defined as a difference in magnitudes, are also used in the description of a stars characteristics. The standard system in the visible region of the spectrum is the Johnson-Cousins UBVRI system. Stellar characteristics are frequently plotted in terms of a color-magnitude diagram (V vs. B-V) or a color-color diagram (U-B vs. B-V).

6) IRAF TASKS FOR PHOTOMETRY

a) Introduction

Once the data has been reduced as described in the previous sections, analysis may finally be performed. The ultimate goal of most photometry data analysis is to acquire the magnitudes of the objects in the images. These magnitudes are basically the results of photometry, and can be used in various ways.

It is good practice to divide the images into object type. Every data set will have at least two types - the target stars and standard stars. Standard stars are selected stars that have very well known absolute magnitudes, and so are used in translating the instrumental magnitudes of the target objects into the absolute magnitude system.

Acquiring absolute object magnitudes requires several steps.

11 | P a g e

Page 13: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

b) For Quick Look Photometry

It is often useful to do quick-look photometry while taking data. The IRAF task imexamine is a very powerful way to do this. You can do sky-subtracted radial fits to stars, using parameters that you can set as desired, and IRAF will make initial estimates of the flux using radial integrals.

Imexamine is the most useful task when getting started with photometry. It allows allows you to do a lot of different measurements on an image on the fly. It is so quick you can check one image while taking the next and so make adjustments as necessary. It is also often sued to help with focus as it makes it easy to measure the FWHM. It is one of the more complex tasks, as it has a big number of command keystrokes and task parameters, grouped in psets.

It can be accessed from the cl prompt and any other package.

type imexamine filename for the image you want to look at.

The cursor will jump to the image on display in DS9, and the arrow will change to a blinking circle. This represents the annulus which will be used to measure the counts on a star and the average background around the star.

Imexamine will display information about the area under the cursor when you hit certain keys.

Here is a list of the key commands that will probably be most useful for you. You can get more details about the commands, as well as a full list of the Cursor Key Commands by entering help imexamine.

? Print help. This also will give you a listing of the Cursor Key Commands and descriptions of the outputs for 'a' and 'r'

a Prints useful information about the star under the cursor. First, the parameters will be listed in two rows, and then the values will be listed underneath in the same fashion.

c Displays a 2D graph for a column of data through the cursor position. d Loads a new image

d Loads a new image without having to quit imexamine. The cursor will move to the IRAF command window, and you will be prompted for a new image to display

e Displays a contour plot for the area beneath the cursor

l Displays a 2 graph for a horizontal line of data through the cursor position

12 | P a g e

Page 14: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

m Prints statistics about the area under the cursor (such as mean, median, mode, and standard deviation)

q Quit imexamine

r Displays a radial profile of the star under the cursor. IRAF will fit a Gaussian to the data points, which will also be plotted.

s Displays a surface plot for the area under the cursor.

X Prints the cursor’s coordinates

, Prints more information about a star under the cursor, including the Maximum Full Width Half Max (FWHM)

Another method is to load the image directly into the DS9 display, and the use imexamine. On the DS9 Web site it says:

"Due to the unique relationship between DS9 and IRAF, if you use the imexamine task, you can take advantage of a special feature of DS9. Instead of loading the image from IRAF with the display task, load the image directly into DS9. Then, from the cl prompt, invoke imexamine without a filename. IRAF will ask DS9 for the current filename and use it for analysis. This approach provides several advantages over previous methods. First, it will work with compound fits images such as mosaics, data cubes, and rgb images. Second, the image displays includes true image data and WCS information, not the approximated data from IRAF."3

c) Aperture Photometry

In aperture photometry, you need to define an aperture which is usually circular and fully encloses the source, and a second which is usually a ring outside the first that contains only sky.

Then you obtain the mean counts per pixel from the sky aperture, and subtracts that mean from each pixel in the source aperture, and then adds the remaining counts to find the total in the stellar image.

This method has the advantage of being relatively simple. A third annulus can be added so that in the case of a none crowded field, the sky measurement is not likely to be obtained by any light pollution from the source as the second annulus may be.

3 http://hea-www.harvard.edu/RD/ds9/

13 | P a g e

Page 15: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

However, there is disadvantage that becomes an issue due to the fact that star images are quite large on most ccd chips. They are certainly bigger than they appear on the display.

The point-spread function (PSF) has long tails, and a significant percentage of the light of a star can actually get deposited on the detector many arcseconds away from the center of the image.

Aperture photometry therefore is not really suitable for a crowded field. If you are using a crowded field or cluster you need to use PSF fitting, which can be done simultaneously for many stars in an image. If you are doing star cluster photometry, this is the route to take.

The procedure for aperture photometry is described in the User's Guide to Stellar CCD Photometry with IRAF.4

The Iraf digiphot package contains the apphot package with the Iraf tool phot to measure magnitudes of stars by means of aperture photometry: the pixel values are summed within a circular aperture centred on the star, and are then compared to the pixel values in an annulus representative of the sky brightness.

The photometric technique employed is fractional pixel integration. Point spread function fitting techniques are not used and no knowledge of the point spread function is required for the computation of magnitudes. 5

There are individual tasks creating and modifying object lists, computing accurate source centres and sky values for a list of objects, as well as performing photometry inside concentric circular or polygonal apertures

The phot task uses an input list of coordinates as locations around which aperture photometry is performed. The input list can be generated by other tasks; for example, the logging functions in imexamine, or the ‘regions’ generation in DS9 can be used to generate such a list interactively.

A critical part of aperture photometry is defining the sky values. For faint objects, the flux in even the object aperture may be dominated by background counts and so a correct computation of the background is critical. The parameter set used for controlling the sky-finding algorithm is fitskypars.

Running the task phot is easy, after all the various parameter sets have been tweaked as needed. Within the parameters for phot itself, simply provide a list of images (IMAGE), the name of a file containing x,y pairs (1 per line) giving object coordinates (COORDS), turn the interactive and verify modes off (INTERACTIVE, VERIFY) and the verbose mode on (VERBOSE), and

4 http://iraf.net/irafdocs/daophot2/

5 Davis, L. E., 1989, A User’s Guide to the APPHOT package, NOAO

14 | P a g e

Page 16: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

execute the task. A number of lines of photometry data, one per object per image, then should scroll by.

If the centroiding is not quite right, then you can get a large number of errors.

Phot also produces a ‘.mag’ file for each image which contains the detailed data on computed magnitudes, magnitude uncertainties as well as photometry errors.

The extraction of detailed data from the ‘.mag’ files is made much easier by the pdump task. This enables the extraction of various items from the output files, using boolean logic operators. The pdump help file is detailed with a number of examples.

In general terms, the interest is in extracting an instrumental magnitude, with an estimated uncertainty, for each object on each image. Most other data in the ‘.mag’ files only needs to be considered if there is a requirement to ascertain the optimal parameters for the phot task, or if necessary to check for unaccounted errors in the data.

Instrumental magnitudes can only be used to compute differential magnitudes, in which objects on the same image are compared to one another. Even this simple process is only formally correct if the objects are of exactly the same colour, otherwise colour-term corrections should be applied if very accurate differential magnitudes are required. Most often, it is desirable to reference the instrumental magnitudes to some standard, physically motivated, measurement.

d) Crowded Field Photometry and PSF Fitting

Stars on the image appear roughly as round disks of light. Changing the greyscale levels or displaying pixel values already reveals that the light of the star is centrally concentrated.

A radial profile or surface map immediately shows how the star's counts fall off with increasing distance to the star's centre: the Point Spread Function (PSF). The shape of the PSF is the result of a convolution of the true apparent diameter of the star which is usually much smaller than the pixel size, the seeing, the diffraction pattern of the optics, and the sampling by the CCD pixels. A more centrally concentrated PSF provides a higher sensitivity to detect faint stars and a greater ease to resolve closely-spaced stars.

Often the PSF is characterised by its Full Width at Half Maximum (FWHM). The central part of the PSF often resembles a two-dimensional Gaussian, in which case the FWHM can be readily interpreted in terms of the σ of that Gaussian. In practice, the PSF has a different shape, especially in the wings.

15 | P a g e

Page 17: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

e) Standard Star Photometry and DAOFIND

Standard stars are those that have accepted or defined magnitudes. They are used to calibrate and transform a set of photometric data onto a certain photometric system. The basic method for transforming a set of data onto a photometric system includes observation of the standards, distinguishing between standards and other field stars in each frame, measuring the flux from the standards and obtaining corresponding instrumental magnitudes, and finally, obtaining the terms in the transformation equations necessary for transforming these magnitudes to the accepted magnitudes.

Locating of standard stars in a given image frame can be done either in a point-and-click fashion, or, more preferably, in an automated fashion. The former requires that the you locate the standards in a given frame for example by using a finding chart, and subsequently documenting the standards' x and y positions in each frame. This is very tedious and error prone.

IRAF has a task that automates the process. The DAOFIND task is a sophisticated search algorithm that examines images for local density maxima and is predicated on user-defined parameters such as the typical FWHM of the standards, standard deviation of the background, the threshold for a detection above the background value, as well as, many other user-specified parameters. It is extremely important to note that under datapars, the fwhmpsf parameter asks for the FWHM of the PSF in scale units. If the FWHM value was found using a radial plot in IMEXAMINE, for instance, the values listed for the FWHM are in pixels, and not scale units.

A trap for the unwary – so you need to check the image header for each chip and update the parameters accordingly in DAOFIND because these values are used in locating stars. Finally, DAOFIND produces accurate, centered x and y coordinates for each detection which are critical to accurate photometry later on in the process.

7) CONCLUSIONS

IRAF is a powerful program of packages that can ensure that you obtain the best results from your data. It is difficult to learn but once learnt, it is quick to process the data through. The fact that it is platform independent and can run on PC’s as well as Macintosh means that you can do a lot of your data reduction away from where you collect your data.

Photometry is a broad field and I have covered it only in a cursory sense within this paper. IRAF has many more tools than I have covered that cover the range of tasks necessary for the serious photometric observer.

16 | P a g e

Page 18: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

The evolution of PYRAF command language has made a lot tasks more usually friendly, such as tab command and file name completion; a command history with the arrow keys; command line editing/movement with arrow keys; the fact that control-C works to kill IRAF tasks and perhaps most importantly for me at least scripting is much easier in python.

IRAF continues to be the major data analysis tool of choice for astronomers today and with the work continuing and the implementation of PYRAF it will continue to develop and be used by the next generation of observational astronomers.

17 | P a g e

Page 19: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

APPENDICESAppendix 1 Sample Installation Steps for Ubuntu Linux DistributionAppendix 2 Parameters for ZerocombineAppendix 3 Parameters for ImcombineAppendix 4 Parameters for fixpixAppendix 5 Parameters for CosmicraysAppendix 6 Parameters for PhotAppendix 7 Parameters for DAOFIND

18 | P a g e

Page 20: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

AppendiX 1

SAMPLE INSTALLATION STEPS FOR UBUNTU LINUX DISTRIBUTION

1) Install the prerequisitesa. First install the tcsh or csh shell:

sudo apt-get install tcsh

b. Install the 32-bit termcap-compat, because the enhanced CL needs it. If it is not in the relative repositories, so you'll need to download it and its dependencies and install them.

2) Create the IRAF usera. Use System>Administration>Users and Groups to create an account with username "iraf", real name "IRAF User", home directory "/iraf/iraf/local", shell "/bin/tcsh", and a secure password. Give the account administration privileges for the duration of the installation, so that you can use "sudo" from the IRAF account.

b. Open a new terminal, create the base IRAF directory and assign ownership to the IRAF maintenance user:

sudo mkdir /irafsudo chown -R iraf:iraf /irafEverything else should now be done from the IRAF User account, unless specified otherwise. This can be simply done by switching user from a terminal

su iraf

or by switching into a virtual terminal with Ctrl+Alt+F2 and logging in as the IRAF user.

3) Create the directory structureCreate the default folder structure and recursively assign ownership to the IRAF user:mkdir /irafmkdir /iraf/iraf/localmkdir /iraf/irafbinmkdir /iraf/irafbin/bin.linuxmkdir /iraf/irafbin/noao.bin.linuxmkdir /iraf/x11irafmkdir /iraf/extern

19 | P a g e

Page 21: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

4) Download and extract the packagesI used the latest packages, because they come with the enhanced command line, ecl and have combined downloading and extracting them into a single script.

#download and extract the source

cd /iraf/irafwget http://iraf.net/ftp/iraf/V214/as.pcix.gen.gztar -zxf as.pcix.gen.gzrm as.pcix.gen.gz #move the redhat binaries to the linux directory

cd /iraf/iraf/unix/bin.redhat/mv * ../bin.linux/ #download and extract the redhat IRAF binaries

cd /iraf/irafbin/bin.linuxwget http://iraf.net/ftp/iraf/V214/ib.rhux.x86.gztar -zxpf ib.rhux.x86.gzrm ib.rhux.x86.gz #download and extract the redhat NOAO binaries

cd /iraf/irafbin/noao.bin.linuxwget http://iraf.net/ftp/iraf/V214/nb.rhux.x86.gztar -zxpf nb.rhux.x86.gzrm nb.rhux.x86.gz

5) Install the packagesa. Initialise the environment for installation

setenv iraf /iraf/iraf/cd $iraf/unix/hlibsource irafuser.csh

b. Test the install script

./install -n

c. Check through the installer and be sure that everything works. The defaults are usually fine except that you'll probably want to disable the tape drive and networking.

20 | P a g e

Page 22: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

d. Now change to root to run for the real install

sudo ./install

6) Install X11IRAFa. XGTerm is essential for using IRAF's graphical plotting features. It is a part of the X11IRAF package, which also includes other useful things like images servers and ximtool.

b. First you'll need to install the right version of the ncurses library.

#on 32-bit i386

sudo apt-get install libncurses4

c. Download the Red Hat binaries for X11IRAF and extract them, then run the installer.

#download and extract x11iraf

cd /iraf/x11iraf/tar -zxf x11iraf-v1.3.1-bin.redhat.tar.gzrm x11iraf-v1.3.1-bin.redhat.tar.gz

#move redhat binaries to linux directory

mv lib.redhat lib.linuxmv bin.redhat bin.linux

#run the install script as root

sudo ./install

d. Follow through the install script, accepting all the default options except for the app-defaults directory, which should be "/etc/X11/app-defaults".

7) Install DS9DS9 is important for viewing and manipulating images, but you should download the latest version from http://hea-www.harvard.edu/RD/ds9/

Then copy it to /usr/local/bin.

wget http://hea-www.harvard.edu/saord/download/ds9/linux/ds9.linux.4.12.tar.gztar -zxf ds9.linux.4.12.tar.gzrm ds9.linux.4.12.tar.gz  

21 | P a g e

Page 23: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

#copy to the local bin directory

sudo mv ds9 /usr/local/bin/

8) Log into IRAFa. Any user on the machine can now use IRAF. Before using IRAF for the first time, you must run mkiraf in your personal iraf directory:

mkdir ~/irafcd ~/irafmkiraf

b. Select "xgterm" as your IRAF shell when prompted.

c. To use IRAF, run xgterm, and from there

cd ~/irafds9&ecl

22 | P a g e

Page 24: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

APPENDIX 2

Parameters for ZeroCombine

cl > epar zerocombine

input = ``@zero.list'' List of zero level images to combine(output = "mbias") Output zero level name(combine = "average") Type of combine operation(reject = "minmax") Type of rejection(ccdtype = "zero") CCD image type to combine(process = no) Process images before combining?(delete = no) Delete input images after combining?(clobber = no) Clobber existing output image?(scale = "none") Image scaling(statsec = "") Image section for computing statistics(nlow = 0) minmax: Number of low pixels to reject(nhigh = 1) minmax: Number of high pixels to reject(nkeep = 1) Minimum to keep (pos) or maximum to reject (neg(mclip = yes) Use median in sigma clipping algorithms?(lsigma = 3.) Lower sigma clipping factor(hsigma = 3.) Upper sigma clipping factor(rdnoise = "7.3") ccdclip: CCD readout noise (electrons)(gain = "5.1") ccdclip: CCD gain (electrons/DN)(snoise = "0.") ccdclip: Sensitivity noise (fraction)(pclip = -0.5) pclip: Percentile clipping parameter(blank = 0.) Value if there are no pixels(mode = "ql")

23 | P a g e

Page 25: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

APPENDIX 3

THE PARAMETERS FOR IRAF TASK IMCOMBINE

cl > lpar imcombine input = @flat.list List of images to combine output = mflat List of output images (plfile = "") List of output pixel list files (optional) (sigma = "") List of sigma images (optional) (logfile = "STDOUT") Log file (combine = "median") Type of combine operation (reject = "avsigclip") Type of rejection(project = no) Project highest dimension of input images? (outtype = "real") Output image pixel datatype(offsets = "none") Input image offsets (masktype = "none") Mask type(maskvalue = 0.) Mask value(blank = 0.) Value if there are no pixels(scale = "mode") Image scaling (zero = "none") Image zero point offset (weight = "none") Image weights(statsec = "[x1:x2,y1:y2]") Image section for computing statistics (expname = "") Image header exposure time keyword (lthreshold = INDEF) Lower threshold(hthreshold = INDEF) Upper threshold (nlow = 1) minmax: Number of low pixels to reject (nhigh = 1) minmax: Number of high pixels to reject (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg(mclip = yes) Use median in sigma clipping algorithms?(lsigma = 3.) Lower sigma clipping factor(hsigma = 3.) Upper sigma clipping factor(rdnoise = "7.3") ccdclip: CCD readout noise (electrons) (gain = "5.1") ccdclip: CCD gain (electrons/DN)(snoise = "0.") ccdclip: Sensitivity noise (fraction)(sigscale = 0.1) Tolerance for sigma clipping scaling correction(pclip = -0.5) pclip: Percentile clipping parameter(grow = 0) Radius (pixels) for 1D neighbor rejection (mode = "ql")

24 | P a g e

Page 26: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

APPENDIX 4

Parameters for fixpix

cl > epar fixpix

images = @pixlist List of images to be processedmasks = badpix List of bad pixel masks(linterp = "INDEF") Mask values for line interpolation(cinterp = "INDEF") Mask values for column interpolation(verbose = no) Verbose output?(pixels = no) List pixels?(mode = "ql")

25 | P a g e

Page 27: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

APPENDIX 5

Parameters for Cosmicrays

cl > epar cosmicrays

input = @rayfile List of images in which to detect cosmic rays output = @goodfile List of cosmic ray replaced output images (optianswer = Review parameters for a particular image? (badpix = "") List of bad pixel files (optional)(ccdtype = "") CCD image type to select (optional)(threshold = 25.) Detection threshold above mean(fluxratio = 2.) Flux ratio threshold (in percent) (npasses = 5) Number of detection passes (window = "5") Size of detection window(interactive = yes) Examine parameters interactively?(train = no) Use training objects?(objects = "") Cursor list of training objects(savefile = "") File to save train object(mode = "ql")

26 | P a g e

Page 28: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

APPENDIX 6

Parameters for PHOT

Image = hip90899.fits Input image(datapar= “”) Data dependent parameters(centerp= “”) Centering parameters(fitskyp= “”) Sky fitting parameters(photpar=””) Photometry parameters(coords = “” ) Coordinate listskyfile = Sky file(output =default) Results file(plotfil=””) File of plot metacode(graphic=stdgraph) Graphics device(display=stdimage) Display device(command=””) Image cursor: [x y wcs] key [cmd](cursor =””) Graphics cursor: [x y wcs] key [cmd](radplot=no) Plot the radial profiles(interac=yes) Mode of use(verify =yes) Verify critical parameters in non interactive mode(verbose=no) Print messages in non interactive mode(mode=ql)

27 | P a g e

Page 29: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

APPENDIX 7

Parameters for DAOFIND

image = @v_ccd.stds Input image(s)output = default Output coordinate file(s) (starmap= ) Output density enhancement image(s)(skymap = ) Output sky image(s)(datapar= ) Data dependent parameters(findpar= ) Object detection parameters(boundar= nearest) Boundary extension (constant|nearest|reflect|wrap)(constan= 0.) Constant for boundary extension(interac= no) Interactive mode ?(icomman= ) Image cursor: [x y wcs] key [cmd](gcomman= ) Graphics cursor: [x y wcs] key [cmd](wcsout = )_.wcsout) The output coordinate system (logical,tv,physical)(cache = )_.cache) Cache the image pixels ?(verify = )_.verify) Verify critical daofind parameters ?(update = )_.update) Update critical daofind parameters ?(verbose= )_.verbose) Print daofind messages ?(graphic= )_.graphics) Graphics device(display= )_.display) Display device(mode =ql)

28 | P a g e

Page 30: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

a) ReferencesBarnes, J., 1993, A Beginner’s Guide to Using IRAF, NOAO

Berry, R. & Burnell, J., 2000, The Handbook of Astronomical Image Processing, Willmann-Bell INC, Virginia USA

Budding @, & Demircan, O., 2007, Introductory to Astronomical Photometry, Cambridge University Press, Cambridge UK

Churchill, C. W., 1995, Introduction to Echelle Data Reduction Using the Image Reduction analysis Facility, University California Lick Observatory Technical Report No 74

Davis, L. E., 1994, A Reference Guide to the IRAF/DSOPHOT package, NOAO

Davis, L. E., 1989, A User’s Guide to the APPHOT package, NOAO

Davis, L.E., 1987, Specifications for the Aperture Photometry Package, NOAO

Golay, M.,1974, Introduction to Astronomical Photometry, D Reidel Publishing, Dordrecht, Holland

Howell,S.B. (ed..), 1991, Astronomical CCS Observing and Reduction Techniques, ASP Conference Series, Vol 23

Kitvhin, C. R., 2003, Astrophysical Techniques, Taylor and Francis Group. Florida USA

Landolt, Arlo U., 1994, UBVRI Photometric Standard Stars in the Magnitude Range 11.5 < V <16.0 Around the Celestial Equator, The Astronomical Journal, Vol. 104 Num. 1. July 1994. Louisiana State University Observatory, Baton Rouge, Louisiana.

Massy, P. & Davis, L. E., 1992, A Users Guide to Stellar CCD Photometry with IRAF, NOAO

Massy, P., 1997, A Users Guide to CCD Reductions with IRAF, NOAO

Pullen, A. J., 2003, The Zen of IRAF

Romanishin, W., 2002, An Introduction to Astronomical Photometry Using CCD’s. University of Oklahoma

29 | P a g e

Page 31: A Review of IRAF and Stellar Photo Me Try Data Reduction

Complementary Studies B SCI 4408 Donna Burton 001942058

Shames, P.M.B. & Tody, D., 1986, A User’s Introduction to the IRAF Command Language, Version 2.3, STSI, NOAO

Tody, D. ,1984, The IRAF Data Reduction and Analysis System, Proc. SPIE Instrumentation in Astronomy VI, ed. D. L. Crawford, 627, 733

Warner, B. D., 2006, A Practical Guide to Lightcurve Photometry and Analysis, Springer, New York

Wells, L. A., 1994, Photometry Using IRAF, NOAO

Wells, L. A., Cleaning Images of Bad Pixels and Cosmic Rays Using Iraf, NOAN

http://iraf.noao.edu/

http://hea-www.harvard.edu/RD/ds9/

http://sofa.astro.utoledo.edu/SOFA/photometry.html

30 | P a g e