next up previous 256
Next: Using the CCDPACK programs to reduce data
Up: Using the automated processing facilities directly
Previous: Scheduling a reduction

Scheduling from a script

If you expect to regularly process large amounts of data from a particular detector (so that using automated reduction is especially attractive), it is fairly straight forward to write a script that will do the reductions.

If you have an import control table (check the Set detector... item in the Options menu of the XREDUCE program to see what CCDPACK has already) then you would just need a script that contained something like:

\fbox{Example 1}
#!/bin/csh
#
#   Initialize ccdpack
#
ccdpack
#
#   Clear any existing global parameters.
#
ccdclear reset accept
#
#   Do the general configuration.
#
ccdsetup logto=terminal genvar=false mask=defects.ard reset accept
#
#   Import the FITS headers into CCDPACK.
#
import in='*' table=$CCDPACK_DIR/WHTFLAT.DAT reset accept
#
#   Schedule and run the reduction.
#
schedule in='*' execute=true debias=1 spacesave=some reset accept
exit
assuming that only the frames to be processed are in the current directory. A copy of this file is available as $CCDPACK_DIR/ccdpack_ex1.csh

If you do not have an import control table then you will need to adopt some method of differentiating your data into its various frame types. Section [*] has some ideas about this. Assuming you have adopted a simple naming scheme then a reduction script might be like:

\fbox{Example 2}
#!/bin/csh
#
#   Initialize ccdpack
#
ccdpack
#
#   Clear any existing global parameters.
#
ccdclear reset accept
#
#   Restore the general and CCD configuration.
#
ccdsetup restore=true restorefile=CCDPACK_SETUP.DAT reset accept
#
#   Present the data to CCDPACK (note different filters).
#
present target='DATAV*' bias='BIAS*' flat='FFV*' onefilter=true \
        filter=V reset accept
present target='DATAR*' flat='FFR*' onefilter=true filter=R \
        reset accept
#
#   Schedule and run the reduction.
#
schedule in='"DATA*,BIAS*,FF*"' execute=true debias=1 spacesave=some \
         reset accept
exit
The file CCDPACK_SETUP.DAT is a CCDSETUP restoration file and has been created by running CCDSETUP and saving its configuration. A copy of this file is available as
$CCDPACK_DIR/ccdpack_ex2.csh



next up previous 256
Next: Using the CCDPACK programs to reduce data
Up: Using the automated processing facilities directly
Previous: Scheduling a reduction

CCDPACK
Starlink User Note 139
Peter W. Draper, Mark Taylor, Alasdair Allan
1 February 2006
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council