5.10 The Off-line Pipe-line: Version 3

5.10.1 World Co-ordinate System Tools

The World Co-ordinate System Tools (WCSTools) (see Mink19981999) package was developed by Doug Mink at the Smithsonian Astrophysical Observatory, with significant code from:
  • Bill Cotton of The National Radio Astronomy Observatory (projection)
  • Mark Calabretta of Commonwealth Scientific and Industrial Research Organisation (projection)
  • Pat Wallace of Cambridge University (coordinate conversion)
  • Elwood Downey of the University of Iowa (WCS fitting procedure)

WCSTools is a software suite consisting of both of command line programs and C language utility programs and subroutines. The software has a direct interface with, amongst others, the USNO A2.0 catalogue (see Section 5.9.3), and can also interfaces directly with FITS files, enabling the direct implant of a computed WCS to the image frame. The actual algorithm used to “pattern match” the catalogue to the image has not been explicitly released by Mink, however from the information needed to be supplied its form can be inferred to be similar to that used in version 2. The necessary information are (i) the pixel location of detected stars, (ii) the stars’ associated brightness (iii) the CCD pixel scale and (iv) the telescope pointing (extracted from the FITS header). The list of stars is to be presented in order of descending brightness.

Whilst the algorithm used is not available the process is; first a nominal WCS is identified from the FITS header, the appropriate files of the USNO A2.0 are then searched for all stars within range of the world canvas. Each reference star in the catalogue is then fitted with each image star and an offset computed using the nominal WCS. Every reference star position in the image is then checked for an image star within the specified pixel tolerance. The offset with the most matches is deemed to be the best fits (Mink2000). The fitting process is carried out using a multi-dimensional minimisation algorithm, see below.

Down Hill Simplex Method
The down-hill simplex technique, developed by Nelder and Mead (1965) (see also Press et al.1992, whence much of the following description is taken), is a multidimensional minimization method that requires only object function evaluations and not derivatives.

A simplex is the geometrical figure which in N-dimensions consists of N+1 vertices, if any vertex of the simplex is taken as the origin then the other N vertices define vector directions that span the N-dimensional vector space, through which the search takes place. For the problem of fitting a WCS the simplex is a triangle. The simplex must be non-degenerate, meaning it encloses a finite area, to ensure convergence and the vertices must be non-collinear to ensure true N-dimensionality.


Possible outcomes for a step in the downhill simplex method
Figure 5.6: Possible outcomes for a step in the downhill simplex method, the simplex at the beginning is shown at the top. Extracted from Press et al. (1992).

The initial simplex defines the starting point, the function to be minimised is then calculated at each point of the simplex and ranked. The point with the highest value is moved in one of four predetermined ways (see Figure 5.6); (a) the vertex is reflected its base conserving area, (b) the vertex is reflected through its base and additionally expanded, (c) the vertex is contracted towards its base or (d) there is a contraction along all dimensions towards the low point. Firstly a reflection is tried (a) if the likelihood of this point is better than the best point then also try an expansion (b). If the reflected point is worse than the second-highest then look for an intermediate lower point, i.e., try a one dimensional contraction (c). If the high point remains unchanged by this then try a multidimensional contraction (d). In this way the simplex “oozes” towards the function’s minimum hence its popular name, the amoeba algorithm.

The amoeba algorithm is not resilient against local minima, but the initial guess supplied will be the LT pointing which will be accurate enough to overcome this problem.

5.10.2 Airmass curve creation

As has been shown in Section 2.5 a straight line graph is expected from a plot of zeropoint versus airmass. However a problem occurs if points diverge greatly from this line. In manual reduction the rogue points can be checked manually against the observations that created them, the reason for their divergence ascertained and should the observation be in question the removal of the point can be scientifically justified. This process can not be followed during automated reduction.

However a way must be found to remove any rogue points from the airmass curves generated by the PL. This dilemma has been explored in many ways;

  • all points ns from the line could be removed, this however discards points without scientific reason.
  • Remove each point one at a time and refit the line, until the best fit has been generated. There are two major problems with method;
    • it is highly iterative and therefore a method which takes a lot of time to perform. Each point must removed and refitted until convergence, then a different starting point must be picked and the whole process restarted.
    • The point removal has no sound scientific justification.

The way in which the PL constructs airmass curves is detailed below. Firstly the zeropoint mode value is calculated. The mode is a more robust estimator of the nightly zeropoint than e.g., the mean or median as it is less likely to be weighted by rogue points. This is achieved using

mode =  3× median - 2 × mean,
(5.37)
as suggested by Da Costa (1992) as the mean and median require a smaller number of pixels to be accurate. The mode is then compared with the zeropoint expectation value (zpx). The zpx is a pre-calculated constant known to the program. There will be a zpx for each filter, it is the zeropoint that occurs in perfect conditions for a particular filter, a value independent of magnitude. Its value was set by collecting airmass curve data from members of the ARI that they believed to be obtained during good weather. The zeropoint at an airmass of 1.0, when the telescope is pointing straight up, is then calculated and the average found, this value becomes the zpx.
An airmass curve showing the tolerance limits and ZPX of the pipe-line
Figure 5.7: The dotted lines show the tolerance band generated by the PL, all points outside this band are removed from the fit.

A “tolerance band” is then generated around the zpx in a twofold manner. Primarily the Issac Newton Group, the site of the LT, has over many years recorded the extinction per magnitude expected over wide range of wavelengths (see La Palma Isaac Newton Group1995). From this a cone may be generated around the zpx widening towards greater airmass. Since the zeropoint should not increase with extinction the top half of the cone is removed to leave a triangular tolerance band, see Figure 5.7. Secondly, since the values used to formulate this tolerance band are rigidly set a lenience value allows for less than perfect results. If points fall outside the tolerance band then they are removed. A line may then be generated using the remaining points within the tolerance band. The line is generated using a least-squares-fit which minimises the residuals of the points about the line.

5.10.3 Modular Updates

WCSTools Upgrade
The initial version of WCSTools used in the PL was V2.9.0, the most current update is V3.0.0. This is the fourth update of this software since its initial use in the PL this partly reflects the rapidly changing FITS structure surrounding the WCS structure. Several coding corrections (e.g., variable initialisations etc.) have been e-mailed to author and are now included in the code.
CFITSIO Upgrade
CFITSIOV2.0 (Pence1999a,b) incorporates several new features that improve the operational ability of the PL. The throughput has increased to 20MB/s. The FITS standard has implemented a year 2000 compliant FITS “DATE” keyword format (e.g., YYYY-MM-DDThh:mm:ss) which the LT must comply with to be efficient, CFITSIO V2.0 supports this. FORTRAN-callable interface routines are now available which means the FITS reading routines written in V1.0 and V2.0 are now completely redundant and have been removed.
SExtractor Upgrade
Whilst the SExtractor software library has not become available the SExtractor program continually has new versions released, the current version is V2.2.2 (2001). Whilst many of the changes in the new versions are almost imperceptible with the “bugs” only being noticed by astronomers trying to bend SExtractor to their own purposes, each new version is stated to be more stable and faster than the previous. The PL has had its SExtractor sections upgraded to the current version.

Due to the modular nature of the PL neither the CFITSIO or SExtractor upgrades have required recoding. The future-proof nature of the PL infrastructure has been indicated.