### 1 Introduction

CCDPACK is a package of programs for reducing CCD-like data. They allow you to debias, remove dark current, pre-flash, flatfield, register, resample, normalize and combine your data.

Using CCDPACK it is possible to automatically reduce CCD data (as far as the flatfielding stage). This uses a scheduling system that only requires knowledge of the frame types (bias, flatfield etc.) and important CCD geometric features. Using this information it can decide how to reduce your data and may then run the necessary programs. The frame types and detector characteristics can be obtained from FITS headers, for certain telescopes/CCDs, so your job could be reduced to identifying the telescope/detector used and the frames you want reducing.

The automated reduction system can be controlled from an X based GUI (Graphical User Interface) that has been specifically designed to help novice and/or occasional users of CCD data (although it is expected to appeal to the more experienced as well). The necessary ease of use is achieved by limiting what could potentially be a large range of options to those of immediate concern, by providing a selection of known detectors and by having a context sensitive help system. It also aims to be complete by allowing you to define the necessary geometric characteristics of your data interactively (if they cannot be obtained elsewhere). For those who prefer it an equivalent command-line interface is also available.

The core of CCDPACK is a suite of programs that have been designed to help in processing large amounts of data. Consequently all CCDPACK routines process lists of data (these can be identified using wildcards, *,?,[a-z],{X,Y,Z}, or from lists contained in text files) and also record the progress of a reduction using an integral log system.

As well as performing the usual instrumental corrections you can also do defect removal (using keyword descriptions stored in a text file) and generate and propagate data errors (these are derived from a knowledge of the detector noise and the Poissonian nature of the detected electron count). Debiassing can be performed using only the bias strips as well as using bias frames (these are combined to reduce noise levels). Calibration data can be combined using many different techniques (mean, median, trimmed mean etc.), so that you can pick a method that makes most efficient use of your data.

Data registration (the determination of geometric transformations that map the same positions in each of your data frames) is primarily based on the linear transformation (this allows offsets, scalings, rotation and shear), although more general transformations can be used.

General linear transforms can be easily determined using an interactive procedure for displaying and selecting image features. Alternatively if your datasets are just shifted (offset) with respect to each other, then you may be able to register them by using a series of commands which locate all the objects in all the frames, determine the object-object correspondence and then derive the transforms. A graphical application is also provided (for offset frames) that allows you to select the objects to be used by identifying image pairs that overlap and have some objects in common. Other facilities are provided for using external information about alignment of images; these may be of particular use for mosaic cameras, or when pointing information is available in FITS headers of the data products being reduced.

Data resampling uses World Coordinate System information stored within the data, which removes the need to remember the appropriate transformations. As well as a wide selection of general purpose combination methods such as median estimators, the more specialized ‘drizzling’ algorithm is also available.

Normalisation and combination (often also called mosaicing) are done in a single step, which is designed to deal with very large datasets. This uses robust methods for determining scale and/or zero point corrections.

To help when processing images from a multiple-CCD mosaic camera, or a CCD with readout from multiple amplifiers, this version of CCDPACK introduces the concept of a Set of data-files: this makes it easy to match corresponding data and calibration frames for reduction tasks, and to keep track of known alignments during registration.