12 Simple Removal of Instrumental Effects

This recipe is a simple example of reducing CCD data. It uses the xreduce easy-to-use GUI (Graphical User Interface) to the CCDPACK package (see SUN/139[10]). xreduce makes the reduction of CCD observations very straightforward. Using xreduce you can follow various routes to reduce your data. However, most of them are fairly similar and involve the following steps:

(1)
set up the package (probably using both the General Options and CCD Characteristics windows; see Figure 12),
(2)
identify the various frames, and types of frames, which are to be processed (probably using one of the Manual Organization or Using FITS Headers windows),
(3)
specify how the data are to be de-biassed (which is done in the Setup and Run window; your choice will be restricted to options which are valid for the given data).

The recipe given here corresponds to one simple route through the data reduction. xreduce is described further in SUN/139, especially Section 4, How to reduce your data now. Some additional illustrated examples have appeared in the Starlink Bulletin[9].

If you have not already set up for working through the recipes then you should do so now. The procedure is described in Section 8.1. Then proceed as follows.

(1)
Move to the directory to which you have copied the example data. Then type:
  % ccdpack
  % xreduce &

The first command starts CCDPACK, the second starts the xreduce GUI. The ampersand (‘&’) runs xreduce as a detached process, so that you can continue to issue Unix commands from the terminal window.

The main xreduce window should appear, as shown in Figure 12. Extensive on-line help information is available from most of the xreduce windows, to the extent that it is virtually an ‘interactive cookbook’ in itself. Simply click on the Help menu in the top right of the window. Several options are available: for assistance on using the current window choose the On Window option. The help information is presented as hypertext displayed with a Web browser (Netscape by default).


pdfpict

Figure 12: Main window for the xreduce GUI


The underlying purpose of xreduce is to gather sufficient details of your data to define how they are to be reduced. Basically it needs to know: which of the CCDPACK options you plan to use, a few details about your CCD frames (such as the extents of any bias strips) and the names and directory specifications of each of your various types of data frames (bias frames, flat fields, target frames etc). In order to make specifying the details of the CCD frames easier xreduce has a list of commonly-used chips which you can choose from. If the instrument that you used is not included in this list then you can enter the requisite details manually.

(2)
Click on the Options menu (rightmost of the two options in the top left corner of the window: see Figure 12) and choose the Set detector… option. A window similar to Figure 13 should appear. This window lists the various CCD detectors known to xreduce. Click on the entry TEK4STANDARD.DAT (as shown) which was the detector used to acquire the example data.


pdfpict

Figure 13: CCD detectors known to xreduce


Figure 13 shows the window as it is created by default. A useful trick is to expand it horizontally so that the file names and descriptions are more easily visible. Some of the CCD descriptions end in ‘(setup)’ and others in ‘(table)’. xreduce knows more about the former than the latter. The option chosen here ends in ‘(setup)’, so full details are available.

Once you have selected the detector click on the OK button.

(3)
Next you need to set the configuration options. Click on the General Options button in the main window. For the example data all the defaults are acceptable, so simply click on the OK button.

Now click on the CCD Characteristics button in the main window. Again the defaults are acceptable, so click on OK.

(4)
You need to specify the types of files (bias frames, flat fields, target objects, etc) present in your data and the name and directory specification of each file of each type. You specify these details using the buttons in the Data Import section of the main window.

Click on the Manual Organization button and a window similar to Figure 14 should appear. The example data comprise only bias frames, flat fields and images of target objects, so click the three corresponding buttons in the list of Frame types present: in the top half of the window. Ensure that these three are the only data types for which the buttons are set.

The defaults can be accepted for the other options in the lower half of the window. Simply click the OK button.


pdfpict

Figure 14: xreduce window to specify the types of file present


(5)
A window similar to Figure 15 should appear. This window allows you to specify the individual files which are to be reduced. First specify the target object frames. Proceed as follows.
(a)
Click the TARGET button in the row towards the top left of the window.
(b)
In the Directories: box (on the left side of the window) double-click on the targets subdirectory. This directory should become the current directory and the two target frames should appear in the Files in directory: box.
(c)
Click on the Add all button and the files should appear in the Files selected: box (on the right side of the window).

Repeat the procedure for the flat field and bias frames by clicking on the FLAT and BIAS buttons (in the row towards the top left of the window) respectively and proceeding as before. The flat fields are in subdirectory flats and the bias frames in bias.


pdfpict

Figure 15: xreduce window to specify the files to be reduced


Once you have specified the files for the three types of frame click the OK button. A window should appear briefly showing the message:

Setting data descriptions, please wait

and you will be returned to the xreduce main window.

(6)
Now click the Setup and Run button. A window should appear briefly showing the message:

checking possible debiassing methods please wait

and then be replaced by a window similar to Figure 16. For the example data all the defaults can be accepted, so just click the OK button.


pdfpict

Figure 16: xreduce window to specify the reduction options


(7)
A window showing the message:

performing reduction scheduling please wait

should appear briefly and be replaced by one saying:

Reduction started. The output will be logged in file "xreduce.log".

Click on the OK button.

(8)
A further window showing the progress of the reductions appears. From this point the reductions proceed autonomously. You can either watch their progress by leaving the window running or close it by clicking the Exit button. You will be asked for confirmation and then be returned to the main window. Click on the Exit button (at the bottom of the window, towards the left) to close down xreduce: again you will be asked for confirmation.
(9)
Various files have been created during the reduction process. The new files in the top level data directory are:
CCDPACK.LOG CCDPACK log file
MASTER_BIAS.sdf master bias frame
MASTER_FLATNONE.sdf master flat field frame
xreduce.csh xreduce reduction script
xreduce.log xreduce log file

Some files have also been created in the targets subdirectory:

  ngc2336_r_1_db.sdf
  ngc2336_r_2_db.sdf

are the de-biassed target images and:

  ngc2336_r_1_db_fl.sdf
  ngc2336_r_2_db_fl.sdf

are the de-biassed, flat fielded images: the final product of the data reduction. They can be examined, for example, with GAIA. Type:

  % gaia  targets/ngc2336_r_2_db_fl.sdf &

After setting the Auto Cut level, Magnification and colour table (see the recipe in Section 10) the image should look something like Figure 17.


pdfpict

Figure 17: GAIA displaying a fully reduced image of NGC 2336. Note that the image no longer appears to be positioned asymmetrically (as it did in Figure 10) because the bias strips have been removed


(10)
Once you have examined all the files you should delete them prior to trying the next recipe. Return to the top level data directory and type:
  % delete_xreduce_files.csh

Note that script xreduce.csh is not deleted because it is interesting to compare it with the commands issued in the following recipe.