Elixir Home CFHT Home Elixir Systems Overview SkyProbe Seeing Real Time Postrun Processing Imstats Pipeline Detrend Creation Fringe Creation Ptolemy I & II Photometry Calibration Distribution Component Reference Data Detrend Image Archive Zero Point History Filter Calibration Coefficients Camera Run IDs Skyprobe Archive Elixir Components Detrend Database Image Database Photometry Database Configuration System Data Abstractions FITS Table Databases Elixir Reports Fringe Corrections Scattered Light CFHT SAC Report 05.2001 CFHT SAC Report 10.2000 User's Guides General Elixir Support SkyProbe Support Elixir Display (edisp) Real Time System Elixir Backup System Elixir Image Reduction Elixir Lessons Ohana User's Guides
Subtle Flat-field Effects in Wide-Field Mosaic Cameras

Introduction

Wide-field mosaic cameras present extra challenges to the astronomer when it comes time to reduce a collection of data. The large amount of data from such cameras presents the first hurdle. When a single image takes 200MB, as is the case with the CFH12K, an observer with a large number of images may be overwhelmed by the large amounts of disk space required. Another barrier comes from the wide field itself: the size of the field makes the image succeptible to effects which are not noticable on small scale fields, or which are more easily calibrated.

In the context of astronomical data, the different development rates of key technologies has important implications for the ability of the small research group to handle a typical dataset. The number of pixels in a detector, the speed of a CPU, and the typical bytes per dollar for RAM are all closely related to the density of features in a chip, and tend to double with about the same period of roughly 18 months. However, disk volume lags somewht (?? months), disk I/O lags substantially (NN months), and offline storage such as tape lags even more. These points combined mean that researchers with limited budgets will find that as time goes by it becomes challenging to have enough disk space, and increasingly difficult to perform operations that require access to a large number of images at the same time, and almost impossible to work with data once it is on tapes on the shelf.

The Elixir project at CFHT is working to address these issues by centralizing common tasks which are needed by many observers, especially those which require manipulation of large stacks of data. By outfitting one site well with the needed computer hardware, we can provide the individual researchers with well characterized images which can be manipulated individually or in small stacks, keeping the data handling tasks managable. Among these tasks are the job of producing high quality detrend frames, darks, flats, and so on, needed by all astronomers. In the process, since we have access to a wide range of data, we can investigate and address calibration issues that may not be accessible to individual researchers.

In this article, we discuss a significant flat-field effect discovered in the CFH12K images which became apparent in our investigation of the standard star photometry, and the ways we are addressing the effect. We have discovered that scattered light is contaminating flat-field images taken with CFH12K. The contamination is at a relatively low level, and is difficult to detect without careful analysis. Nonetheless, the contamination introduces errors to photometry which may be as large as several percent. The systematic nature of the errors means that repeated measurements of standard stars do not serve to reduce the errors to acceptable levels. In addition, we provide methods to correct flat-field images already in hand, or photometry of images applied with uncorrected flats. {\bf Identification of the problem}

We first noticed a problem with CFH12K photometry in our analysis of standard star images obtained during the first QSO science run January 27 - February 5, 2001. Several factors in this run were crucial to the detection of a problem. First, because this was the first Queue run, the QSO and Elixir teams were both very attentive to the photometric conditions every night during this run. We had assessments of the evening and morning twilight conditions from several people, including whether there was light haze or vog. Careful attention was necessary, not only so we were aware of which nights were photometric, but also because of the impact even light cirrus can have on the flat-field processing. Second, and very fortunately, every night during this run was reported to be photometric in the sense that no clouds were visible, though haze was reported on several nights. Third, the QSO team performed observations of a particularly large number of photometric standards. Especially for the first run, it was very important to know we could ascertain the transparency conditions of the sky, and the most reliable way to do this is to have sufficient standard star photometry. Finally, the Elixir team had a goal of 2\% photometric accuracy and were therefore motivated to demonstrate that such an accuracy could be proven for each night.

The error first came to light when the Elixir team performed the photometric analysis of the standard stars. High quality detrend frames had been produced and applied to the standard star frames. The flat-field images were internally consistent at a level of better than 1\%, and were of sufficient quality to detect the effects of the haze in the flat-field images. The quality of these calibrations were such that the Elixir team expected 1\% or better photometric accuracy, especially when coupled with the consistent reports of photometric weather. As a result, when the standard stars were first analysed, the Elixir team was surprised to discover photometric errors as large as 4.5\%. Figures N-N show the standard star residuals for each of the four Johnson wide-band filters as a function of a variety of parameters: stellar color, airmass, time, star number, etc. To make these plots, the best zero points for each filter have been applied (see table N), as well as the best airmass terms. At this stage, no color term could accurately be determined from the data, so the color terms were left at 0.0. The median scatter per image for each filters is also given in table N. It is interesting to note that the median scatter per star, also given in table N, is substantially smaller than the scatter per image. This is the first clue that there is a problem related to the mosaic.

We first attempted to demonstrate that the large errors were not a result of the process. We ran several versions of the standard star analysis, in each case substituting a different process where possible. We tried different sets of flat-field images: twilight flats vs night-time superflats; flat produced by hand rather than with the Elixir system. We also applied the flat-field images to the science imags with different sets of software as well as a simplified algorithm, in which we ignored the dark frames and only used the overscan for a bias correction. Finally, we tried different photometry analysis routines, sextractor versus dophot. None of these variations produced a significant improvement in the resulting photometry.

Our analyses, and Figure N, show that the photometry for specific stars is very consisten, but inconsistent from one star to the next. This does not appear to be related to the properties of the stars themselves, such as their apparent magnitude or their color (see Fig N). However, the standard star frames were generally taken at a single pointing in the sky for each filter and field. This means that a single star is recorded on essentially the same portion of the mosaic in each standard star image. The typical scatter per star is $< 0.5$\%, which is substantially smaller that the desired accuracy of 2\%. We concluded that the errors we were finding were related to the mosaic and not the process or the individual stars. Although there are no clear trends of the standard star residuals with stellar color, observation airmass, exposure time, stellar magnitude, etc, there is apparently a trend of the residual with position in the mosaic. This can be seen in the plot of stellar residual with mosaic coordinate (Figure N). At this point, we began to suspect that scattered light was the culprit.

At about the same time that we concluded there were errors related to the mosaic, we learned of similar errors reported by other observers. Independent of the Elixir team, Nick Kaiser and Andy Conolly reported problems with CFH12K photometry. They compared CFH12K stellar photometry to Sloan DSS photometry, and found spatially coherent discrepancies between the two datasets. The comparison between the Sloan and CFH12K photometry may introduce large errors, but the spatial trend observed appears to confirm the errors seen in the Elixir photometry.

The flat-field images appear to flatten both the input flats and the night-time sky images quite well, particularly in B and in V where fringing is not an important effect. We came to the conclusion that the the mosaic is not being uniformly illuminated during the flat-field process, and that the non-uniformity is generally consistent, and present during the night-time as well. {\bf Search for reflections}

If the flat-field is not illuminated uniformly, it may be possible to detect the contaminating sources directly by imaging the focal plane. We suspected that some particular telescope structure may be reflecting light to the mosaic, in addition to the light that reaches the mosaic from the primary mirror. A possible candidate was identified in photographs taken of the primary mirror from the prime focus cage.

In May 1998, after extensive work was done on the Prime Focus wide-field corrector baffling, Barney McGrath obtained photographs of the primary mirror as viewed from the WFC. An example of these is shown in Figure N. The primary mirror, the central hole, and the reflections of the prime focus cage and the spider legs are clearly visible in this image. Also visible are the access cage (left), the crane and the dome, none of which are in position during actual observations. It is clear that the area of the primary mirror dominates the specularly reflected light contribution in this image. However, also visible are trapezoidal structures on the perimeter of the mirror. These are the mirror cover petals, which are quite bright in this image.

A more detailed examination of possible reflecting light sources under more realistic conditions was performed by converting the CFH12K to a pinhole camera. We created a filter slide which can hold a thin sheet of metal in place of a filter. We used the LAMA laser cutting machine to place several holes, 200um in diameter, at specific location in this filter slide. Each hole acts like a pinhole camera, projecting an image on the detector of whatever is on the other side of the hole, in this case, the primary mirror and the support structures. Not only does this let us view exactly the structures seen by the CFH12K detectors, but, by including holes at a range of locations, we can also see how the observed structures vary across the field.

The first picture shows the full CFH12K mosaic field. The 13 'donuts' scattered across the field are images of the primary mirror projected by each of the 13 pinholes. In each image, the main circular structure is the primary mirror, with a dark shadow of the prime focus cage, as well as the spider legs of the support structures. Around the outside of the primary mirror, there are a series of trapezoidal shapes: these are the mirror covers. Already in this image, two things are clear: First, the brightest source, other than the primary mirror, is the ring of cover petals. Second, the observed petals vary across the detector, as would be required of any structure which illuminates the mosaic in the required non-uniform way. {\bf Light from the petals}

The fact that there is significant light coming from the mirror petals, and the fact that the amount varies across the field-of-view suggested that the mirror cover petals are in fact the main culprit in our photometric errors. Other illuminated sources appear to be at a very low level and did not seem like likely candidates.

To make a stronger demonstration of the effect of the teflon strips, we devised a way to cover the teflon strips and obtain dome flats with and without the teflon covered. We used large sheets of black cloth draped over the exposed underside of the mirror covers to hide the teflon. We cut 14 lengths of black cloth, each roughly 3m long and 1m wide. With the telescope at zenith, one end of each strip was attached to the caisson centrale using magnets. The other end could then be dropped down into the caisson centrale, shrouding the inside of the open mirror covers.

We obtained dome flats in each of the main broad-band filters, BVRI, with both shroud on and should off. We obtained three flats in each filter for both shroud states. Averaging these three images together, and subtracting 'shroud off' - 'shroud on' results in a difference image which consists of the excess illumination pattern. Although dome flats are not sufficiently flat to construct flat-field images, the illumination should be stable enough to measure the pattern of the excess from the teflon pads.

Figure N shows the difference image for the R filter, and clearly demonstrates the presence of excess light from the teflon pads, following the general pattern expected from the pinhole images. A similar scattered light term is seen in the V and B images. The I images, however, show a very different pattern. The cause of this different pattern is unclear, but it may simply show that our black cloth is not sufficiently opaque in the I band.

Although the 'shroud off' - 'shroud on' difference image shows the presence of a scattered light component, the amplitude of the scattered light term in these difference images is much smaller than expected from the photometric errors. This was the first piece of evidence that the excess light from the pads did not actually cause the bulk of the photometric errors. However, we did not recognize this until much later.

To test the excess light term derived here, we applied these dome scattered light images to the flat-field images from the first QSO run, 01Ak01. Since there appeared to be a different amplitude to the scattered light term in these images from that seen in the photometric errors, we decided that the scattered light term needed to be scaled for reasons we did not really understand. We multiplied the scattered light image by a scaling term before applying it to the flat-field image. We then applied the flat-field image to the standard star images from the 01Ak01 run in the usual way. We then observed the resulting photometric errors and examined the trends of the residuals with mosaic position. We ran this experiment for several values of this scaling term in an attempt to minimize the spatially dependent residual trends. We found that a factor of 10.0 worked best to reduce the scatter to a minimum for each of B, V, R, and I.

The reduction in the photometric residuals was very significant. Figures N-N show the residual plots for the standard stars before and after correction with the scattered light frame. These plots include a linear color term for each filter. The improvement in the scatter for these plots makes it possible to determine a reliable color term for each of the filters.

These experiments convinced us that the teflon pads were the cause of the problem, so we decided to remove the pads. The pads were attached to the mirror petals using screws. It was relatively easy to remove all pads between two CFH12K camera runs. We chose to wait until the April 2001 run was finished before removing the pads because we wanted to ensure the consistency of the flat-field during a single run. During the next CFH12K run, we generated flat-field images in the standard way and compared them to the flats generated during the previous runs. The disappointing result was that the difference between these flats was very small, less than 1\%, far smaller than the several percent errors in our standard star photometry.

The flat-field images taken without the Teflon pads showed that the teflon pads were not the cause of the excess light. Even so, the simple fact that we could apply the excess light pattern derived by covering the petals and obtain significant corrections showed that the pattern itself exhibits the correct basic shape. This is hardly surpising in retrospect: any excess illumination which is generally axially symmetric and originates a large distance from the mosaic will exhibit the general pattern of vignetting as the baffle structure around the mosaic obscures the outer portions of the mosaic more that the inner portions. The remaining scatter in the standard star frames is likely to be caused by the error in our approximate to the excess light term. {\bf Empirical Correction}

These experiments with the Teflon pads demonstrate that a correction to the flat-field can improve the photometry substantially, but that it is difficult to measure the flat-field error from the flat-field images. An alternative to eliminating all sources of contamination in the flat-field images is to construct a correction from stellar photometry, using a large number of stars to sample the effect. Such a correction would have the advantage of correcting the actual error of concern, removing other causes of position-dependent photometric variations. One such cause which must be present in the CFH12K imager is cause by the geometric distortion in the lenses. The optical distortion causes the plate scale to vary with postion off-axis. Since the plate scale changes, even a perfect flat-field image would produce a photometric error sine the illumination source has a constant surface brightness.

In addition to the excess illumination, there are photometric errors which would be introduced even if the illumination source were perfectly flat. Optical distortion in the camera makes pixels near the center of the mosaic subtend a smaller angle on the sky than pixels near the edge of the detector. Since a perfect flat-field illumination has a uniform surface brightness, the pixels near the edge would receive more photons than those near the center, resulting in an over-correction of the photometry near the edges compared to the field center. Interestingly, the optical distortion effect has the opposite trend from the scattered light error, with excess light in the edges, and is less than half the amplitude of the observed photometric errors, about 2\%. {\bf Observations}

We have taken a series of images of standard star fields to track down the flat-field errors by measuring their effect on the stellar photometry. The images are obtained at 12 pointings, with a range of offsets from 50 pixels to half of the mosaic size in each of the X and Y directions. These observations were performed for each of the BVRI (Z?) filters.

We flattened these images with the appropriate uncorrected twilight master flat-field images from that run (01Ak07). We only use data obtained in photometric conditions, as demonstrated by SkyProbe (REF). We then performed Sextractor photometry on the images, and astrometry, and included the measurements in the Elixir photometry databasing system. This makes it easy to track the multiple measurements of a single star (REF?).

We divided the entire mosaic 12,000 x 8,000 pixel grid into 24 x 16 boxes (500 x 500 pixels). Each star has a series of measurements at different locations on the mosaic. If the measurements are uncorrected, a given star will have a large scatter because measurements near the center of the mosaic are too bright while those near the corners are too faint. Using an iterative process, we determined offset values for each of the 24 x 16 mosaic grid positions which minimize the scatter per star, and at the same time determined best-fit magnitudes for each star based on the collection of adjusted measurements.

Figures NN show the stellar residuals as a function of the X mosaic position for the R filter. On the left are the uncorrected residuals, while on the right we have applied the grid of corrections as a function of position. The magnitudes scale is in milli-magnitudes. It is clear that the corrections determined for each 500x500 pixel box in the mosaic substantially improves the scatter for each star, and removes all position-dependent trend in the residuals.

Figure NN show the applied offset from the grid of correction points as a greyscale. The full range of the greyscale is 0.12 mag. The pattern is generally similar to the mosaic correction determined from the shroud tests (right), but it also has signficant differences. The histogram of photometic scatter per stars is shown in Figure NN. The conclusion is that, within the photometric system of our filters, we are able to perform photometry which is consistently accurate at the 0.7 - 1.0\% level. {\bf Landolt Photometry}

The corrections determined above substantially reduce the scatter for the images used to determine the correction. However, it is necessary to demonstrate that the same improvement continues to hold for all observations. The corrected flat-field images can now be applied to standard star images to demonstrate the photometric accuracy of the corrected flats.

We have created corrected BVRI flats for each of the runs and performed the complete analysis on the standard star images. In this analysis, we match Landolt stars with our measurements and determine the residuals between the Landolt photometry and our photometry. In this process, we apply a single color correction to our photometry (for R, we apply a slope of 0.035 mag / B-V) and a fixed airmass extinction term (0.09 mag / airmass for R). In addition, we determine a single photometric zero-point correction for each mosaic frame.

The resulting photometry now makes it possible to identify errors and problems in the Landolt photometry. Until this point we could not distinguish our photometric errors from those of Landolt. The following series of plots demonstrates our ability to identify poor quality photometry in the Landolt catalog. The plots show the photometric residuals of our measurements to the Landolt photometry vs a variety of terms. The lower left three plots show the residuals after correction for airmass and color terms, but not mosaic zero-point offsets. The remaining plots show the residuals after the zero-point correction. The residuals are plotted against: star number (unique number for each star in the list), mosaic image sequence number, stellar magnitude, airmass, color (B-V), and mosaic X and Y positions.

In the first set, all measurements of all Landolt stars are shown. Already it is clear that there is no longer a trend in mosaic coordinate, nor is there a residual trend in any of the other terms.

In the second set, we have excluded a certain subset of the Landolt stars. We have excluded any Landolt stars with fewer than 3 measurements or fewer than 2 nights of observations. In addition, some of the errors reported by Landolt are quite substantial in one filter, but not so large for the other filters. This appears to suggest variability. We have excluded any stars with a total rms greater than 0.05 mag (if all colors had the same error, this would imply a consistent error of 0.02 mag). The exclusion of this subset of Landolt stars clearly makes a substantial improvement in our photometric residuals, and implies that we are excluding stars which have been poorly measured by Landolt.

In the third set, we perform some filtering on our measurements to exclude obvious outliers. First, we exclude any images which have zero-point corrections larger than 0.2 mag, a clear sign of non-photometric conditions. Zero-point deviations smaller than this are consistent with the general changes in the atmopheric transparency and may not represent non-photometric periods. However, we also exclude images for which the scatter is larger than 0.15 mag, implying either clouds across the images or some artifact in the images. Finally, we exclude any stars which have scatter greater than 0.05 mag, either those which are faint and photon limited in our data or which are variable or perhaps fall near a bad column, etc. The improvement over the second plot above is again clear, though it mostly represents the removal of a few specific outliers.

Finally, the plot below shows histograms of the per-image and per-star scatter from the final selection of measurements above. (Images which were excluded on the basis given above are given a scatter of 0 and ignored in the calculation of the median). There are a few points to note on this plot. First, the median per-star scatter is 0.66\%. Next, the per-image median scatter is 1\%. However, we suggest that this distribution consists of a set of 'good' images (first peak at 0.7\%) and a set of 'poor' images (second peak near 2.5\%). We make this claim because the residual plots above suggest that certain sequences of images are better than others: the sequence is sorted by RA and these 'good' and 'poor' regions correspond to different Landolt fields. We suggest that some of the Landolt fields have noticably better photometry than others. This interpretation is reinforced by the fact that the 'good' peak is consistent with the per-star scatter in the plot above.

The conclusion is that we are at least able to perform photometry completely automatically at the 0.7\% level in our system and at the 1\% level in the connection between our R and the Landolt / Johnson R, and possibly somewhat better.