Schedules an automated CCDPACK reduction


This routine accepts a list of input images and uses the information in their CCDPACK extensions to schedule a reduction. The schedule is produced as a command script which may be executed immediately or retained for execution using the standard CCDPACK facilities (CCDFORK).

The reduction schedule produced covers the following stages of data reduction (in this order):

production of a master bias
removal of the bias contribution
production of a master dark
removal of dark count contribution
production of a master pre-flash
removal of pre-flash contribution
production of master flatfields (one for each filter type)
correction of data for flatfield response

The stages which are preformed for each image depend on the type of image (TARGET, FLAT, BIAS, DARK etc.) and any processing which has already taken place. For instance if calibration masters of any type already exist then they will be used in preference to the production of any new masters. If all the TARGET frames have already been flatfielded then no further processing will be performed, if no BIAS frames of any type exist then debiassing will be performed using bias strip interpolation or by subtracting a single constant etc. Reductions which have failed (due to a lack of resources) can be "picked up" and restarted from the position at which they failed (by a re-invocation of this routine). Facilities for controlling the use of disk space are also available.

Before you can use this routine you must make sure that all the necessary information is entered into the image extensions. You can do this using the routines IMPORT or CCDSETUP and PRESENT or any combination of these which give the desired effect.


schedule in script stype debias=? execute=? interp=? spacesave=?


The extension which added to the names of any images processed by CALCOR when performing dark count correction. This makes the keyword:


form the names of the images output from CALCOR. [-dk]

The form of debiassing that should be used. This is an integer which represents one of the following:
produce a master and offset to bias strips (master bias is zeroed)
produce a master and do not offset to strips (in this case the master bias is not zeroed)
use interpolation between bias strip(s)
subtract a constant as bias.

Using the information about the frame types which are available and the presence or not of bias strips etc. a list of the possible debiassing options is shown, before this parameter is accessed. Any of the above methods can be selected regardless of this advice, but the reduction may then fail unless action is taken (such as adapting the output script).

If the interpolation option is selected then the method is determined by the INTERP parameter.

The extension which added to the names of any images processed by DEBIAS. This makes the keyword:


form the names of the images output from DEBIAS. [-db]

Whether to execute the output command script immediately or not. If the option to execute is chosen then a background process is started which performs the actual execution. Do not execute the procedure using this method if your system supports a queuing system which should be used instead (if you expect the reduction to take some time). This option does not work for ICL scripts at this time. [FALSE]
If the reduction is started immediately then the output will be redirected to this file. [SCHEDULE.LOG]
The extension which added to the names of any images processed by CALCOR when performing pre-flash correction. This makes the keyword:


form the names of the images output from CALCOR. [-dk]

The extension which added to the names of any images processed by FLATCOR. This makes the keyword:


form the names of the images output from FLATCOR. [-flt]

A list of the names of the images which contain the data to be reduced. All images must already have the correct "frame type" information (extension item FTYPE) entered into their CCDPACK extensions. Together with any other relevant information (such as filter type, position of the bias strips, useful area etc., see IMPORT and/or PRESENT).

The image names should be separated by commas and may include wildcards.


This parameter allows input frames of type TARGET to be also used as flatfields. This is designed for use when no real flatfields exist. IR data is often calibrated in this way, and less commonly optical data. In both these cases it is asummed that the objects are moved on the sky sufficiently, between exposures, so that taking the median of a stack of frames results in the rejection of any object data (leaving the equivalent of a map of a blank piece of sky).

TARGET frames will only be used to create flatfields, if no flatfields (of the correct colour) are present in the input list. [FALSE]


If the interpolation method is chosen using the DEBIAS parameter then this parameter controls how the interpolation should be performed. The possible returns are:
fit a constant for each row/column
fit a single value for whole image
fit a line to each row/column
fit a plane to whole image

The possible options given the input information about the presence of bias strips are shown before the value of this parameter is accessed.

Name of the CCDPACK logfile. If a null (!) value is given for this parameter then no logfile will be written, regardless of the value of the LOGTO parameter.

If the logging system has been initialised using CCDSETUP, then the value specified there will be used. Otherwise, the default is "CCDPACK.LOG". [CCDPACK.LOG]

Every CCDPACK application has the ability to log its output for future reference as well as for display on the terminal. This parameter controls this process, and may be set to any unique abbreviation of the following:
  • TERMINAL – Send output to the terminal only

  • LOGFILE – Send output to the logfile only (see the LOGFILE parameter)

  • BOTH – Send output to both the terminal and the logfile

  • NEITHER – Produce no output at all If the logging system has been initialised using CCDSETUP then the value specified there will be used. Otherwise, the default is "BOTH". [BOTH]

The name which will be given to a master bias image if one is created. [MASTER_BIAS]
The name which will be given to a master dark image if one is created. [MASTER_DARK]
The name which will be given to a master flash image if one is created. [MASTER_FLASH]
The prefix of the name which will be given to any master flat images which are created. The filter name will be appended to this. [MASTER_FLAT]
The name of the output file which will contain the CCDPACK commands which need to be executed to perform the reduction. The nature of this script is controlled by the STYPE parameter. The default name is dynamically set to be SCHEDULE with a type set by the choice of STYPE. The extension of the script name should always be the same as STYPE. [schedule."stype"]
This parameter controls if any disk space management should be used or not. It can take one of the values, "NONE", "SOME" or "LOTS".
indicates that no images should be deleted.
indicates that all intermediate images should be deleted. This occurs after they are processed.
indicates that all processed images should be deleted. In this case all intermediary images and the original images are deleted when processed.

Intermediary images are deleted by the CCDPACK applications when they are finished processing then. So for instance in the case of FLATCOR each image is deleted in turn, so the additional disk space required is one image. Using "SOME" preserves the original images. Calibration masters are never deleted. [NONE]

The type of CCDPACK command procedure to be produced. This should be one of "CSH" or "ICL". Once a type has been chosen the output script (parameter SCRIPT) can only be executed using the selected interpreter. Note that if you choose ICL then the resultant script cannot be executed immediately, you must activate this yourself. [CSH]


schedule ccdreduce csh debias=1
This example processes all the images in the current directory producing a script file called ccdreduce.csh which is suitable for executing from the C-shell. The debiassing method chosen is to use a zeroed master bias which is offset to the bias strip data level.
schedule ccdreduce csh debias=1 execute=true
As above except that the script ccdreduce.csh is forked into a background process and executed. The output from this job will be found in the file schedule.log.
schedule tryinterp debias=3 interp=3
In this example the debiassing is performed using interpolation between the bias strips.
schedule spacesave=lots
In this example the command script will be written so that all intermediary images (those produced by the various applications) and the original raw images, will be deleted as and when they are processed.
schedule ’data*’ irflats debias=4
In this example the frames ‘data*’ are scheduled for reduction. The debiassing method is subtraction of a constant (this should be set by PRESENT) and a flatfield is produced by median stacking all the data frames.

See also

Scheduling a reduction”.