Elixir: Progress Report May 2001

The Elixir project has achieved an important milestone this semester: the collection of software is ready for regular operations during CFH12K runs. The Elixir system has been used for the three QSO runs, and the single non-QSO run, executed as of May 2001 to produce high-quality detrend data, astrometric and photometric calibrations, and to evaluate the nightly sky transparency. In addition, the Elixir software and the growing collection of CFH12K data products in our databases have been used to identify several areas where the telescope \& optics are in need of some improvement to enable top-quality scientific data. Background

The Elixir project has a wide-ranging set of goals, all related to the evaluation and manipulation of the science data obtained with the wide-field imaging system. At present, Elixir is limited to the CFH12K imager, but in the future will be expanded to include at a minimum MegaCam, and possibly the wide-field infrared imagers.

{$\bullet$ \em Monitoring} - The Real-Time component of Elixir provides a mechanism to monitor a variety of parameters about the images as they are acquired: seeing, sky flux, dome temperatures, etc. A variety of representations of the data collected are made available to the observer as the night progresses.

{$\bullet$ \em Detrend Data Creation} - The Elixir project is responsible for producing high-quality detrend data appropriate to each CFH12K image acquired during a run. The collection of bias, dark, and flat-field images obtained during a run are combined into master detrend images as the run progresses. The Elixir databases allow the detrend-creation software to pre-select an appropriate set of input images, rejecting those with gross errors. A user interface allows the Elixir team to evaluate the residuals for each input frame and fine-tune the input selection, dividing a run into subsections as needed if the detrend data varies during the run. The detrend images created by the Elixir system are registered in a database which makes it a trivial task to select the appropriate detrend data for a given science frame.

{$\bullet$ \em Astrometric Calibration} - The Elixir system provides automatic astrometric calibration of every science image distributed by the Data Archiving and Distribution System (DADS) system. The calibration is performed relative to the USNO and HST Guide Star reference catalogs. The resulting astrometric calibration coefficients are included in the image headers of the distributed images.

{$\bullet$ \em Photometric Calibration} - The Elixir system performs a complete analysis of photometric standards obtained during a CFH12K run. These measurements allows us to refine our system parameters (zero points, color terms, and airmass terms) and to evaluate the stability and transparency of the atmosphere on a nightly basis. The resulting photometric calibrations are stored in a database, and included in the headers of science images distributed by the DADS system.

{$\bullet$ \em Science Image Detrending} - CFH12K data which is distributed by the DADS system is passed to an Elixir component for automatic detrending. All images have bias, dark, flat, and mask corrections applied, and the I \& Z filter images are fringe corrected, while R images are `skyring' corrected. These last corrections are additive and should not affect the photometric accuracy of the images. They do, however, improve the background flatness and ease the process of image combination. {\bf Real-Time Operations}

In semester 2001A, the Elixir system has reached a level of functionality at which all of the primary goals discussed above have been performed in an operational mode. In previous semesters, while most of the various tasks had been possible, the connection between various software components did not exist and the processing required substantial intervention by the Elixir team. By mid-May, all of the steps needed to go from raw CFH12K images to the detrended, calibrated images ready for distribution have been defined and implemented. The result is that these steps can now be easily performed by the Service Observer, for example, without detailed knowledge of the underlying software.

The collection of real-time data displayed by the Elixir system has been somewhat refined. Data available to the observer include the seeing from each image, plots of the seeing as a function of time, and the skyflux as a function of time (both plots are helpful in making assessments of the appropriate QSO condition). In addition, we provide an improved analysis of the focus images, displaying parabolic fits to the focus trends in each of four separate chips. We have discovered that it is important to use several detectors spaced across the mosaic to minimize sensitivity to variations in image quality across the field (see below). This semester saw the implementation of a real-time display tool and the refinement of the tasks which create these real-time data products. \begin{figure} \resizebox{16cm}{!}{\includegraphics{sac3.pics/mkdetrend.ps}} \caption{ \label{mkdetrend} Sample portion of the detrend-creation report. This html-tool lets the Elixir team select the appropriate input detrend images. } \end{figure}

The Elixir detrend-creation system has been completed this semester. This collection of software has made the task of flat-field image creation significantly more sophisticated, and has improved the collection of the flat-field data. The Elixir system is used to generate a test master flat-field (per filter) early on in a run. As new flat-field images are acquired their residuals are determined and can be examined easily with our evaluation software (Figure \ref{mkdetrend}). The evaluation shows the QSO team the quality of the input images as well as how many counts have been integrated and the typical scatter per pixel induced by the resulting flat-field. This information can guide the QSO team in deciding which flats to take and whether the filters can be changed during a run. This detailed analysis makes the resulting flats of such high quality that we can distinguish contaminating effects from very small amounts of cirrus clouds. Even thin cirrus can keep the sky from being truly flat during flat-field acquisition. The identification of flat-field images contaminated with light cirrus correlates very well with the Observer's reports of the sky conditions at twilight.

The photometric zeropoint analysis is now regularly achieving a high level of accuracy. We can demonstrate the stability of the atmosphere during a photometric night using the standard star data from that night. During the first run, when essentially every night was photometric, the zero point measurements show a 1.5\% scatter per frame in all filters. During later runs, the photometric nights show this same level of accuracy, but non-photometric nights betray themselves with substantially larger scatter. This level of accuracy is currently limited by residual scattered light problems, as discussed below.

At this point, the Elixir system includes virtually all of the components needed for regular operations. The major gap to be addressed is in the automatic creation and application of fringe and skyring frames. The necessary software is expected to be completed by late June. There are a few areas where improvements in the software functionality will smooth the operation of the Elixir software, but which are not required to achieve the basic goals of the project. {\bf Flat-fielding and Scattered Light}

We have discovered that scattered light from structures on the bottom of the primary mirror covers 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 a few percent. The systematic nature of the errors means that repeated measurements of standard stars does not serve to beat down the errors to acceptable levels. The high level of detail in the Elixir analysis of the detrend data and the large number of photometric standard star data obtained during the QSO runs this semester made it possible to track down this problem.

We will present a more complete report on this problem in the CFH12K bulletin, but will provide summary details here. The problem first came to light when the Elixir team performed the photometric analysis of the standard star images obtained in the first QSO run. High quality detrend frames had been produced and applied to the standard star frames. The quality of these calibrations were such that we 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 analyzed, we were surprised to discover photometric errors as large as 5\%. After substantial investigation, we were able to show that there was a high level of consistency in measurements made of the same stars with different analysis methods, different versions of the flat-field images (twilight vs night-time superflats), and different nights. The photometric errors observed were a strong function of the position on the detector. This implied that the flat-field was somehow inaccurate. Given the care taken to ensure the best possible conditions for the flat-field acquisition, and the consistency between twilight and superflats, we came to the realization that the flat illumination was not actually flat, ie, there was a source of scattered light which varied across the field. \begin{figure} \resizebox{16cm}{!}{\includegraphics{sac3.pics/primary.ps}} \caption{ \label{primary} The primary mirror and open mirror cover petals as seen from the prime focus cage. } \end{figure}

We identified the major source of scattered light to be a set of Teflon strips on the bottom of the primary mirror cover petals. When the cover is open, these strips are visible from Prime Focus (see Figure \ref{primary}). Furthermore, they are vignetted at the edges of the mosaic, causing the necessary variation across the field. We performed a set of measurements to demonstrate the presence of the scattered light: we obtained a series of dome flats in which strips of black cloth were used to cover the underside of the mirror cover petals, and a second set with the petals exposed. The differences in these flats show a pattern of scattered light appropriate to the observed spatial trends in the photometric errors.

We have generated scattered light-corrected flat-field images using the scattered light frame described above. The application of these corrected flats to the standard star images shows a marked improvement in the consistency of the photometric calibration. Before the correction was applied, it was difficult to determine a useful color term for any of the filters. After the correction is applied, the color terms was easy to determine. There are still some significant outliers among the standard stars, so that the typical scatter per frame ranges from 2.5\% - 3.0\%, but the bulk of the stars are now much more tightly constrained than before. The remaining outliers may be due to remaining errors in the flat-field, especially towards the corners where the corrections are the largest. Alternatively, some of the outliers may be from Landolt standards which have long-term variability not detected by Landolt (1992). \begin{figure} \resizebox{16cm}{!}{\includegraphics{sac3.pics/position-dm.ps}} \caption{ \label{scatter} Standard star residuals as a function of mosaic position. Top: uncorrected R-band data. Bottom: R-band data after correction for scattered light. } \end{figure}

This scattered light problem has contaminated all CFH12K data obtained to date. Observers who have obtained CFH12K image in the past and who require accurate photometry should consider this issue carefully. The scattered-light images we have used to correct the flats obtained this past semester should be applicable to data obtained in previous semesters as well. We will make the scattered light frames available to the community, as well as the recipe used to generate the corrected flat-field images. Alternatively, a correction may be applied to stellar photometry to remove the observed trend for data which has already been analyzed. As of 15 May, 2001, we have removed the Teflon strips which appear to cause the problem so that future CFH12K runs will not be affected. {\bf Mosaic-wide Image Quality} \begin{figure} \resizebox{16cm}{!}{\includegraphics{sac3.pics/570925o.ps}} \caption{ \label{570925o} Image quality as a function of mosaic position. Each cross represents the average image quality in a 500 pixel box. The histogram shows the observed FWHM across this image. } \end{figure}

In the detailed photometric and astrometric analysis of each image, the Elixir system records the observed seeing parameters for each object independently (FHWM$_X$, FHWM$_Y$, angle). We have used this collection of data to determine the variation of the image quality across the mosaic. We create a grid of points on the mosaic, in which the average of these three statistics are used to generate a representative star in that grid location. Figure \ref{570925o} shows a typical image taken in poor seeing. The top part of the diagram shows the range of observed FWHM values for this image, while the bottom part shows the average image quality across the field. When the seeing is as poor as in this diagram ($>0.8''$), the image quality is quite consistent everywhere in the image. \begin{figure} \resizebox{16cm}{!}{\includegraphics{sac3.pics/570914o.ps}} \caption{ \label{570914o} Image quality as a function of mosaic position for an image with good seeing. } \end{figure}

Figure \ref{570914o} shows the alternative situation. Part of the time, when the image quality is better than 0.8'', a clear variation of the image quality across the field becomes apparent. We have been working to understand the possible causes of such a large variation. One possibility, a misalignment of one of the optical elements in the wide-field corrector, appears to have been ruled out. Another possibility is that there is a mechanical problem which is letting the camera tilt slightly with respect to the focal plane. This may occur during a focus operation if there is slack in the focus drive chain. We are investigating the observations of this effect further and will attempt to address it when we have a clear understanding of the cause. {\bf Skyprobe}

Perhaps the most important new tool from the Elixir team is Skyprobe. This device addresses the difficulty of determining the instantaneous sky transparency, and provides a way to monitor the conditions without excessive standard star observations. Skyprobe is a small (50mm) camera lens mounted on a small (500x700) SBIG-2 CCD. The system is mounted on the top of the CFH12K cage, and driven by an iOpener lap-top-sized computer running Linux. During the night, an image is obtained by this system every minute. The field-of-view is large, 5degrees x 7degrees, and aligned with the CFH12K FOV.

Skyprobe was first installed in the third QSO run, April 12. For this run, the images were displayed in real-time in a web-browser for the observer, and also shown in animation. It is possible to see the presence of cirrus in the images, either by their obscuration of the stars or by their reflected light if the Moon is sufficiently bright. This system has already been helpful in letting the observers determine if there are clouds or not while they observe.

Since that run, we have implemented a quantitative analysis of the Skyprobe images. Using the Elixir software, it is now possible to measure the stellar photometry of the stars in the Skyprobe image, determine their astrometry, and match the stars with stars from the Tycho database. This collection of stellar photometry covers the entire sky in the appropriate magnitude range, and provides accurate photometry for approximately B and V filters. We can therefore determine a zeropoint for each Skyprobe image relative to the Tycho photometry. A comparison of this photometry with the nominal zeropoint provides an accurate, time-resolved measurement of the sky transparency during the entire night.

There are still some details of the photometry to work out, but the results so far are very encouraging. Figure \ref{skyprobe} shows the zero-point residuals for one night during the third QSO run, during which the observers and the Elixir CFH12K standard star analysis stated that the night was photometric. The period from 8h to 13h has a scatter of just over 1\%, and the period between 6h and 8h has a scatter of 2.2\%. \begin{figure} \resizebox{16cm}{!}{\includegraphics{sac3.pics/skyprobe.ps}} \caption{ \label{skyprobe} Skyprobe zeropoint offsets for images taken 2001/4/23 UT. } \end{figure}