There are several IDL programs on file at Stony Brook. Several of these programs have been written locally to reduce the data collected. The programs cover a large range of functions, but all can be useful in the reduction of data. The help screens of all these programs are listed in Appendix II. IDL can run from either the astronomy mainframe, or from the PC. On the PC, IDL is located on the C: drive.
If the images being used were taken using the Lynxx the observer can use either IRAF or IDL to reduce the data. If IRAF is preferred there is an IDL routine CCD2FIT formatted image into a FITS format that is readable by IRAF. The auto2fit program is currently limited to approximately twenty-seven images, although it is being corrected.
If IDL is preferred, the CCD12BIT routine will reformat the .ccd images into an image that IDL can read as an array. The AUTOCCD routine will reformat a given list of .ccd images and convert it into an image cube that IDL can read. The CCD12BIT routine requires an image as the input, the directory where the image is located and a name for the output. This routine only works for one image. The AUTOCCD routine requires an image list as the input, the directory where the images are held and the name of the resulting image cube as the output.
Now that the images have been reformatted for use by IDL they can be displayed. IDL has several commands to view images; TV, TVSCL and BYTSCL. The TV command writes the image array to the display without scaling it. The TVSCL command scales the image by a specified factor and displays the scaled version. The BYTSCL command allows one to scale the individual pixels using minimum and maximum operators for improved color contrast.
Before reduction of data can take place the calibration images must be dealt with properly. There is a routine available that helps with this process, MEDIAN. The MEDIAN routine takes the input image cube and finds the median value for each pixel position throughout the image cube. This new image, with every pixel value a median of all of the input frames, is the output. The main purpose for using this process of the removal of spurious high and low points that effectively reduces noise and therefore, the uncertainty.
Both biases and dark frames can be medianed easily using this routine. Flat fields are slightly more complicated. The flat field frames for a specific filter should be medianed together after which the medianed bias and dark frames should be removed. Flat fields must also be normalized. This is accomplished by weighing the medianed frames to the average value. To do this, set the scale to 1 when running the procedure. When this has been done for all filters, the reduction is almost complete.
The data frames must be reduced now. This involves subtracting the medianed bias and dark frames. They are subtracted because the CCD chip accumulates a thermally induced time dependent charge and operates with some background level of charge. The dark frame must be of the same time as the image since it is time dependent. The data frames should then be divided by the normalized flat field. This step smooths brightness gradients in the image caused by variations in the chip.
If the images being used are from the Lynxx and the user wishes to use IRAF for reduction, the images can be rewritten into FITS format by the CCD2FITS procedure. Data reduction can be done in either IDL or IRAF.
There is an automatic reduction procedure called AUTORED2. This is currently programmed for Lynxx images. The program requires the operator to arrange the images in a certain order. Then the number of each type of image is input following the prompts from the computer, and the program removes the bias, darks and flats from the image cube. The flats used are premade, meaning that they were already medianed and weighted. The output is an image cube containing the corrected images.
There are two aperture photometry procedures. One is named APPHO, and the other is APPHOT. APPHO calculates the flux within a circle of a radius determined by the user. The error associated with the flux is also in the output. This is not really the flux from the star, but the counts in that area. To find the background, the cursor should be placed over a background position on the image. The two values can be subtracted to give the counts in the circle that belong to the star. This still is not the flux, but it gives an accurate measure of the counts from the star. To increase the accuracy of this process, it is advisable to take several measurements from the background and the star, and subtract the averages.
APPHOT is similar to APPHO, but has a minor adjustment that makes it easier to use. This program uses a centroid to center on the star, and calculates the flux in a circle around the star. In addition, a second circle of 1.5 times the stellar aperture is drawn. This measures the background around the star and subtracts it from the inner aperture. The output is the counts from the star with the background already subtracted and the associated error. Future versions of this code will allow the operator to decide the size of the second aperture.
If the subject that is being studied is a periodic phenomenon, there are a few period finding programs. One of the programs, SHORTSTRING, works by taking an initial guess of the period, then the program detects periods that fit the points. From these periods, the one with the shortest path connecting all of the data points is the period returned. The operator may wish to plot the period array against the path array to help determine the true period since this procedure will always return a shortest path. A second period finding program also exists. This program, PERIODOGRAM, uses Fourier analysis to search for a period. The data points are fit to different sine curves. The probability of each curve being the best fit to the data points is then calculated. This program is based on Horne and Baliunas(1986).
To gain a better signal-to-noise ratio (S/N), two frames can be added. There is a program called SA, short for shift and add. This program takes two input images and asks for a star to center on in the first image. It then asks for the same star in the second image. The offset between the two images is calculated and the images are shifted. The pixel values for the two overlaid images are added for the output image. This procedure is important when working with faint sources. There are several variations of this program.
If a true color image is desired from series of blue, green, and red images, the procedure MAKE_GIF can overlay the images and create a color bar so that the resultant image appears to have the true colors.
Another IDL procedure that can be useful, is the MULTICHART program. This program will read the guide star catalogue and plot out a field based on the input parameters of coordinates and field size. This is very helpful when searching for faint targets. Charts are created for the corresponding field of view and limiting magnitude for each telescope.