POLPACK is a package of applications for mapping the linear or circular polarization of
extended astronomical objects, either in a single waveband, or in multiple wavebands
(spectropolarimetry). Data from both single and dual beam polarimeters can be
processed^{1}.

POLPACK processes data in *NDF* format. This is the standard data format used by most Starlink
software, and is described fully in SUN/33. However, other astronomical data formats may also be
processed using transparent on-the-fly data conversion facilities provided by the NDF subroutine
library, and the CONVERT package. The use of these facilities is described in section 5.1, and more
fully in SUN/55.

The facilities provided by POLPACK include:

- alignment of images on the sky.
- extraction of $O$ and $E$ images from individual frames of dual-beam data.
- sky subtraction.
- calculation of Stokes parameters.
- binning of Stokes parameters.
- creation of catalogues of polarization vectors.
- graphical display of vector maps.

POLPACK does not provide facilities for performing instrumental corrections such as flat-fielding,
de-biassing, *etc*. Such corrections should be applied to the data before using POLPACK, so that
POLPACK can assume that pixel values are proportional to the combined intensity of sky and object.
Further comments on these corrections can be found in section 5.2.

Slightly different facilities are available when using single-beam or dual-beam data, as described in the following
sections^{2}.

- Data from polarimeters or spectropolarimeters containing the following optical
components can be processed:
- (1)
- A fixed analyser and a rotating half-wave plate.
- (2)
- Multiple fixed analysers.
- (3)
- A single rotating analyser.

- Only linear polarization can be measured.
- Different target exposures can be rotated with respect to one another. That is, the linear mapping between corresponding positions in any two target exposures can include rotation, as well as magnification and a shift of origin (shear is not allowed).
- The transmission and efficiency of non-perfect analysers can be taken into account, if known values for these quantities are available.
- Estimates of the variance in the observed intensity images can be made if necessary. This is
useful if your data does not have usable variance information associated with it. Variances on
the reduced quantities (Stokes vectors, polarization vectors,
*etc.*) can then be calculated on the basis of these estimated input variances. - The observed intensity images must all have the same normalization. That is, the “exposure times” are all assumed to be equal.

- It is assumed that the polarimeter or spectropolarimeter contains a fixed analyser and a rotating half or quarter wave-plate which is stepped in units of 45° .
- Both linear and circular polarization can be measured.
- Different target exposures must not be rotated with respect to one another. That is, the linear mapping between corresponding positions in any two target exposures can only include magnification and a shift of origin (rotation and shear are not allowed).
- The analyser is assumed to be perfect (
*i.e.*the transmission and efficiency of the analyser are both assumed to be $1.0$). - Variances can only be calculated for the reduced quantities (Stokes vectors, polarization
vectors,
*etc.*) if the observed intensity images have usable variances associates with them (*i.e.*these input variances cannot be estimated for dual-beam data). - Corrections can be applied when calculating the Stokes vectors which take account of any differences in the exposure times between raw frames, and any difference in the sensitivity of the two channels of the dual-beam polarimeter. They rely on redundancy in the supplied data, and require a specific set of analyser positions to be used (described in section 2.3.1) when obtaining the data.

^{1}At the moment, circular polarization can only be measured when using dual-beam data.

^{2}It is hoped to rationalize the differences between these two modes in future releases.