Version 2 steps away from its 100% bespoke ancestry to incorporate software that was written to perform a specific and isolated task, this is in contrast to the LT PL code that was originally written to perform the job as part of a much larger program. The non-bespoke software is easily integrated into the PL due to the modular nature of code. A removed procedure is easily replaced with an external software library routine or program call. However some recoding is necessary to provided the variables required by the new code.
It should also be noted that the ING WFS have also started using SExtractor (see McMahon et al., 2001).
![]() | (5.25) |
) changes
by less 20% when the histogram is clipped such that all values fall within
3
.
The FITSIO library has been re-developed and re-written in C and is known as “CFITSIO”, allowing easier compilation and calling routines for C developers than the FORTRAN 77 wrappers. CFITSIO is optimized for maximum input/output performance achieving through-puts of the order of 10MB/s on current generation workstations. An important new feature only available in CFITSIO is the ability to read/write FITS files directly in computer memory, Pence stresses that this can greatly reduce the amount of time necessary for PL processing as the need to read/write temporary FITS files on magnetic disk is eliminated. The ability to read compressed FITS files directly (i.e., without uncompressing) is now implemented and with FITS files readily compressing by 1/3 this easily reduces storage requirements.
The decision to incorporate the CFITSIO package into the LT PL was taken at this point. While a substantial amount of code was removed from the individual pipes, and replaced with external subroutine calls, the transition was easily accomplished due to the structured nature of the PL code. It is possible to install only the CFITSIO code for the routines that will be used, however since both the CS and online PL have also made the transition to the new CFITSIO software the decision was made to install the whole package.
Currently under construction is the USNO-B (see Monet, 2000), it will include proper motions and star/galaxy classifications. This may be an upgrade option for the LT PL when completed.
The physical size of the catalogue is of the order of 8 Giga-bytes, it is constructed of 24 “cat” files written in binary, which contain the data, and 1 accelerator file written in plain text that outlines the regions covered by each cat file, thus allowing the correct zone to be rapidly accessed.
As a first attempt it is assumed that there is no rotation inherent in the file so that North is directly up and East points left, with pixel numbers increasing to the top and left of the image. Even though the pointing of the telescope may be off it is the only reference point available, therefore it must be used. The FITS keywords for RA and Dec are read and compared with the catalogue accelerator file. The correct cat file may then be accessed.
Firstly the RA and Dec of the telescope pointing are taken as the reference points and given the pixel values of the image centre, with the CCD pixel scale known the conversion of the catalogue sources to pixel values can also be easily made. The number of stellar sources in the fits file is then calculated, the top 10 brightest are chosen if there is a large number to minimise computing time. From the catalogue file the true star pattern may then be ascertained by calculating,
![]() | (5.26) |
This approach has met with limited success, the routine is initially, and most crucially, used on the standard star frames of the observations. This is because the locations of these stars is well documented and most accurately needed to generate photometric zeropoints. The test data primarily used the Landolt (1992) PG0918 field located at ~09h21m28s.30 +02o46'03''.58 (J2000) containing 4 stars which describes a square pattern on the sky with an additional star offset at both the top right and bottom left of this square. The procedure works for approximately half of the 29 standards observed, with 6 of the remaining showing significant skew or rotation which was not accounted for. Four of the files which did not map but do not show rotation are Z band images, notably only 3 Z band images were mapped. There appears no clear reason for this lack of reduction in the Z band.
This catalogue is required as the USN0 A2.0 catalogue only contains magnitudes in B and V, and the standard magnitude is required to generate accurate zeropoints.
A general formula for calculating the total flux within an aperture is:
![]() | (5.27) |
i,j is the weight for each pixel,
needed because the flux intensity is not constant across a given pixel. For aperture
photometry the weights are simple, 1 within the aperture and 0 outside it. The
variance (the square of the error) is then simply the sum of the variance of each pixel
![]() | (5.28) |
![]() | (5.29) |
![]() | (5.30) |
![]() | (5.31) |
![]() | (5.32) |
![]() | (5.33) |
![]() | (5.34) |
![]() | (5.35) |
To demonstrate this consider a mismatch between the PSFs, an estimate of the flux can be given by substituting the actual PSF for (Di,j - Si,j) in Equation (5.32), compare with Equation (5.23)):
![]() | (5.36) |
The flux produced by the optimal photometry routines, which is sufficient for differential photometry, must be corrected to the true flux level. This is termed a “profile correction” and carried out in the following way; Along with optimal photometry each object is additionally processed using aperture photometry. The aperture size used is 23 FWHM, which is empirically shown to produce the best signal-to-noise for aperture photometry by Naylor (1998a). The aperture signal-to-noise (S/N) of each object is calculated and those ten objects with the highest values selected. Those objects then have their optimal flux to aperture flux ratio calculated and averaged. This value is then used to correct all optimally calculated fluxes.
The algorithms necessary to perform optimal photometry have been coded in to routines by Naylor (1998a). These routines were initially incorporated into the LT PL. However during implementation of the PL it became apparent that several sections of the code were liable to problems (e.g., numerical overflows and underflows, memory allocation errors and unexpected input parameters). Over a serious of months and in collaboration with Tim Naylor, the code was refined to guard against these errors, the “official” code now incorporates these changes.
The original optimal photometry package was written to perform time-series photometry and heavily incorporated a programing environment known as ARK: The ARK is a collection of common user programs originally written by the Oxford High Energy Astrophysics Group and incorporated the data reduction system, for spectroscopic data, used by Alan (Smale), Robin (Corbet) and Koji (Mukai); hence the name ARK. To enable automation, and operation on the LT computer suite new code which dynamically extracts data from FITS files and removes all trace of the ARK format from all procedures was implemented. This involved completely re-writing the command level code and editing the routines which implement the optimal photometry algorithms.
This program is the only part of the LT PL not to be written in the C programming language and is instead written in FORTRAN 95. This decision was taken for a multitude of reasons. (i) The original code was written in FORTRAN 95 by Naylor, and those routines have been tested, a re-write in C would have involved substantial re-testing. It is however possible to call FORTRAN routines from a C program. (ii) The Solaris operating environment allows complete integration of FORTRAN 95 and C, to the point where the internal maths libraries etc. are the same routines-written in C with FORTRAN callable wrappers, this is invisible to the coder. The integration is not yet implemented in the PL. (iii) FORTRAN is faster for numerical work. The complete photometry package is of the order of 5000 lines of FORTRAN 95 code.
Version 2.0 attempts to counter for changing photometricity by adding a further correction. Once the standard airmass curve has been constructed and rogue points removed, still by hand at this stage, the residuals of the airmass curve about the least-squares-fit are plotted against the Modified Julian Date (MJD), a decimal number that uniquely identifies a period of time. If the photometricity of the night has remained constant the graph will display a straight, horizontal, line through zero. Any deviation from this shows a change in the nights photometric conditions. To first order the photometric conditions might change linearly from the start of the night to the end of the night. By fitting a least-squares-fit to this plot of (zeropoint versus airmass)-residuals against MJD an ordinate axis value can be interpolated from the MJD of an object. This ordinate axis result is a secondary zeropoint (in units of magnitude) and can be added to the primary zeropoint to correct for any change in photometricity before the magnitude is calculated.
While a linear change in photometric conditions can be countered in this manner a more diverse change is more difficult. Primarily a polynomic function is difficult to fit with so few points; keep in mind that the number of points will match the number of standards taken each night.