Dithering strategies for ACS - STScI

1 downloads 0 Views 38KB Size Report
Nov 2, 1998 - that true mosaicing, while very important for both ACS GOs and GTOs, was beyond the scope of this document. In particular, it is extremely ...
Instrument Science Report ACS-98-02

Dithering strategies for ACS M. Stiavelli, A. Fruchter, F.R. Boffi, M. Clampin, C. Cox, H. Ferguson, G. Hartig, R. Jedrzejewski, R. Kutina, M. Lallo 2- Nov- 98

ABSTRACT We review the motivations for dithering exposures with the ACS, discuss possible strategies for combining dithered exposures automatically and the implementation of dither patterns in RPS2. We recommend the development of an easy to use, standalone tool based on a version of Drizzle. We discuss the benefits of different methods to derive image offsets and identify a strategy for an automated quick-look combination. Presently, it appears to be impractical to carry out automatically in the pipeline the final, science grade, reconstruction of a dithered set of exposures. Finally, we recommend a set of DITHER PATTERN macros based on an enhancement of existing patterns for other instruments.

1. Introduction The combination of images taken at different pointings, i.e. dithered, has become a standard data reduction procedure for imaging data. The early applications on HST data, mostly WFPC2 images, were based on simple shifting and adding of images with tasks like combine and imcombine. A significant increase in the usage of dithering in HST imaging observations was prompted by the Hubble Deep Field (HDF) and the related development of the Drizzle package. The Hubble Deep Field South (HDFS) allowed us to test new ideas on how to use Drizzle, how to obtain the image offsets, and the feasibility of combination of rotated images. This experience has influenced our conclusions. For a variety of reasons discussed in detail in the next section we expect that dithering will be commonly used by ACS users. The aim of this ISR is to discuss the scientific advantages of using a dithering strategy (Sect 2), the relative advantages and disadvantages of different strategies, and the selection of an optimal strategy (Sect 3 and 4), and, finally, the recommended dithering and mosaicing patterns for RPS2 (Sect 5).

1

2. The scientific problem There are a variety of reasons for taking exposures of an object at slightly different telescope pointings. As an example, by obtaining images shifted by large offsets one can produce a mosaiced field of view much larger than that of an individual exposure. We felt that true mosaicing, while very important for both ACS GOs and GTOs, was beyond the scope of this document. In particular, it is extremely unlikely that the combination of ACS mosaicing will be carried out automatically by the ACS pipeline or by the STScI On the Fly Calibration (OTFC) in the near future. Therefore, here we have restricted ourselves mostly to small dithering offsets. In general, obtaining CCD images at slightly different pointings improves the scientific return of a given observation in a number of ways: 1. allows for the removal of detector blemishes, 2. allows for a straightforward removal of hot pixels, 3. can improve the sampling of undersampled images, 4. improves the photometric accuracy by averaging over flat fielding errors, 5. can produce a larger contiguous field of view by eliminating the gap between the chips in, e.g., a mosaiced camera like the Wide Field Channel (WFC) in ACS. For 1), 2), 4) and 5) one needs only shifts by an integer number of pixels, while 3) calls for sub-pixel offsets. In the specific case of ACS, the camera that is most relevant and probably the most challenging for dithering is the WFC. However, we expect that proposers will obtain dithered exposures to improve the sampling also for the SBC and the HRC. Mosaicing to increase the FOV will also be commonly used for all cameras. . ACS-WFC is characterized by a two-component geometric distortion: 1. pixels projected on the sky are not square and one pixel diagonal is longer than the other by 8 per cent. This effect is due to the inclination of the detectors with respect to the camera optical axis. 2. Defining a point with no distortion at the center of the WFC, distortion becomes very significant away from this point with linear scales varying by +/- 4% and areal distortion by +/- 8 or 9% according to preliminary distortion modelling. In addition to geometric distortion, the presence of the ~40 pixels inter-chip gap and the possible presence of cosmetic defects with diameter up to about 10 pixels will also affect the way ACS-WFC will be used. One might argue that the typical ACS user will make use of dithering by an integer number of pixels to obtain a contiguous FOV and eliminate blemishes. Programs allocating only a small/modest exposure time for each filter may benefit from obtaining only one exposure at each pointing, thus requiring a

2

combination algorithm suitable for correcting for cosmic ray hits (hereafter CR-hits) as well. Programs with long exposures in a single filter could either use a large number of different pointings or a smaller number and CR-split their exposures at each pointing. Given that WFC is not as undersampled as WFPC2 the requirement for a very large number of pointings is probably not as strong. However, the reconstruction of well dithered observations could, in principle, yield a critically sampled PSF at 500 nm, i.e., a final FWHM equal to the original pixel size. Stars should be easier to separate from CR-hits and hot pixels and there will be no strong need for sub-pixel dithers to improve the PSF sampling. Ideally, following the principle that the HST pipeline should produce final data that are suitable for scientific usage by the majority of the users, our eventual goal should be that of combining ACS dithered images within CALACS. As we will see this goal appears to be only partially reachable. The preparation of an easy to use, stand alone, tool for combining dithered observations will be a first essential step in this direction but is well motivated regardless of our plans concerning automated combination of dithered images.

3. Algorithms for combining dithered images The simplest approach for the combination of images dithered by an integer number of pixels is to use some version of shift-and-add. Upon alignment, CR are rejected and the images are co-added with some version of combine or imcombine. A variant of this approach, interlacing, can be used also for images shifted by half a pixel by replicating the input pixels and aligning the images to a subpixel accuracy. Such approaches are simple to use and are not particularly CPU demanding. Typical dithering offsets for ACS-WFC will be in the range 20-50 pixels since, as we have seen, this is the size of the inter-chip gap in ACS-WFC and of typical CCD blemishes. Over such offsets the geometric distortion of WFC renders integer pixel offsets at the center of the field of view (FOV) not integer at the FOV edge. In particular, a 20 per cent change in pixel area is equivalent to a 10 per cent change in pixel size. This amount of distortion converts a 30 pixel offset in the center to a 33 pixel offset at the FOV edge. Under such circumstances stars would not remain aligned across the FOV. Images obtained by shift-and-add would only be acceptable in the innermost one quarter of the field of view, thus reducing greatly the usefulness of this approach. We felt that this limitation is significant enough to discard shift-and-add as a viable solution for ACS WFC. Recently, Lauer (1998, astro-ph/9810394) has proposed a method to combine undersampled images. The main goal of this method is to achieve the highest possible spatial resolution for images already clean of cosmic rays and in the absence of geometric distorsion. Thus, while this method may be of interested for some applications, it does not appear suitable for a first combination of generic ACS data sets.

3

Since the geometric distortion is large enough to require geometric correction during combination we felt that we needed to use the Drizzle algorithm originally developed for the Hubble Deep Field (Fruchter and Hook 1997). Drizzling is a rather general technique for the linear reconstruction of an image from dithered data. It can be thought of as a continuous set of linear functions ranging from the optimal form of linear reconstruction, interlacing, to the old-standby, shift-and-add. The degree to which one can approach interlacing depends on the dither pattern and the degree to which the data must be masked for cosmic rays and other defects. Therefore, for first-pass ACS processing we plan to only use Drizzle in its shift-and-add form. The advantage of Drizzle over the standard shift-and-add, however, is that, because any individual drizzled image may (when approximating interlacing) leave holes in the output image, Drizzle already incorporates an intelligent system for handling missing data. The output value from Drizzle of a given pixel is a suitably weighted average of the input pixels, where the weight of an input pixel depends not only on its a priori weight, but also the area of its overlap with the output pixel. Corrupted input pixels are given a weight of zero. Thus, for the case of the ACS, Drizzle can be thought of as a combination of the "boxer" geometric distortion code (originally developed by Sparks and Jedrzejewski for the FOC but which is now at the heart of the Drizzle geometric distortion removal) plus a weighting system which handles missing data. Summarizing, Drizzle preserves photometry and resolution, can weigh input images according to the statistical significance of each pixel and removes the effect of geometric distortion both on image shape and photometry. PSF subtraction with Drizzle should also be accurate. We expect that the better sampling of ACS compared to WFPC2 should also help in this respect. Drizzle has not yet been demonstrated to yield photometric accuracy better than 1 per cent. However, it is not clear that other image combination techniques are able to provide such a degree of accuracy. Finally, the experience with the HDFS shows that even the existing version of Drizzle can handle images larger than 4K by 4K pixels. On the basis of its (proven) capabilities Drizzle appears to be suitable for satisfying the scientific requirements of the vast majority of ACS users.

4. How to get the offsets So far we have assumed that the offsets between different exposures were known, this in general will not be the case since it is known, e.g., from the HDF experience, that on occasion the commanded position differs from the position that is actually achieved. This is typically due to the FGS acquiring a secondary peak in the S curve and thus normally leads to pointings which differ from the commanded ones by more than 0.5 arcsec. Our tests show that, within a visit with a good lock, the shifts derived from the commanded pointings and the actual ones are indeed very similar, often within 5 mas and always within 15 mas. The commanded positions accuracy is typically limited to data taken

4

within the same visit. However, the current association scheme only applies to data taken within a visit. Thus, a viable and low cost strategy could be to ignore those cases where there is a large mismatch between commanded and actual position and use the offsets derived from the commanded positions. Clearly, this would reduce the scientific usefulness of the combination since even one misplaced image would ruin the combination in a complete data set. However, a quick look image based on the commanded offset would be useful both for data quality assessment and as a starting point for more sophisticated, offline, processing. An alternative possibility would be to rely heavily on the data themselves by making use of, e.g., cross-correlations. Software based on this concept is indeed present in the Drizzle package. We believe, at this stage, that this approach is not suitable for non-interactive usage. Moreover, cross-correlations may be problematic for observations with narrow-band filters or short broad-band exposures, since in these cases there may not be any bright source in the field. Given that cross-correlation is not well-suited for automated processing and that the existing task is entirely adequate for interactive usage, it does not seem urgent to devote significant resources to its improvement. A last possibility is to obtain the offset from the jitter files associated with each individual observation. This solution has been explored extensively at the ST-ECF and is used in their OTFC software to combine WFPC2 dithered observations. The ST-ECF has classified about 30,000 WFPC2 exposures in three categories: “Bad”, meaning that there was loss of lock during the exposure or, perhaps, telemetry gaps during the observations; “Processable”, meaning that the jitter file information appears accurate and the standard deviation is small; “Groupable”, meaning that the position is accurate but the standard deviation is high, i.e., that there may be pointing problems. It turns out that 52 per cent of the WFPC2 images in the archive are “Processable”, 28 per cent are “Groupable” and 20 per cent are “Bad”. The fraction of “Processable” and “Groupable” images seem to have increased recently probably due to the installation of a new FGS and the SSR during SM2. At face value this statistics suggests that a fraction between 52 and 80 (or more) per cent of the images should be suitable for automatic combination. We have carried out one complete test on a set of 18 STIS parallel images obtained in the course of three visits and verified that image offsets can be easily obtained with accuracy better than 20 mas. Within a single visit the accuracy is about 5 mas. We expect that a level of accuracy below 10 mas should be typically achieved. Note also that all of the 18 images analyzed in detail so far would have been in the “Processable” class. For images taken during different visits the accuracy is generally much lower, e.g., during HDFS shifts of even 30 mas were relatively common. We plan to continue testing the reliability of the jitter files by considering additional data sets, both parallel and primary. For the moment, based on our and the ST-ECF’s results we can assume that the jitter files provide a reliable way of deriving the image off-

5

sets within a visit. However, the major advatange of jitter files is that they allow one to identify false locks. In fact, the position provided by the jitter file is in these cases wrong but the guide star separation and its rms and the position rms can be used to define a quality flag for the offsets. Thus, images with false locks can be identified and excluded from the combination. One possible strategy for GOs would be to carry out a first combination of all images with good lock, clean them of CRs, and derive the final offsets from crosscorrelation. This approach would be significantly more demanding in terms of CPU requirements. The final drizzled science image will in general be obtained by this procedure after optimization of the drizzle parameters and iterations for CR removal. For these reasons we believe that such an iterative approach is best suited for offline processing. The main difficulty in using the jitter files for obtaining a quick look image lies in the fact that jitter file information is available only with a delay of about one day and thus it can possibly constrain the staging disk requirement in OPUS and require changes in OPUS/AB. Moreover, so far the STScI “policy” has been to have all the information required to calibrate science data in the data headers. Reliance on the jitter files would establish a less than desirable dependency of the science data on the engineering data stream. An alternative would be to change the flight software to average FGS encoder positions within ACS and to include the mean and the rms in the data header. It is unclear that this extra cost would be justified given the small fraction of pointings affected by false locks. It is only for these relatively rare data sets that offsets, rms values and GS data from the jitter files are superior to the offsets derived from the commanded positions. Summarizing, it appears that an automatic “quick-look” combination of dithered data sets in the pipeline and/or in the OTFC based on the commanded offsets is both feasible and useful and we recommend that it be considered as a future extension. Conversely, producing the final drizzled science image automatically through the pipeline does not appear to be , at this stage, a reasonable goal since it implies a significant flight software change and a substantial increase in CPU requirements.

5. RPS2 dithering patterns The patterns recommended for ACS and the rationale behind these recommandations were presented in the TIR ACS-98-002 “Proposed Dither Patterns for ACS” and will only be briefly summarized here. We proposed a total of three dither patterns and two mosaic patterns for ACS. The following dither patterns are meant to be used mainly to correct for detector defects: •

DITHER-TYPE=BOX



DITHER-TYPE=LINE



DITHER-TYPE=DE-BLEMISH (future extension) The following mosaic patterns are used to cover a large field:

6



MOSAIC-TYPE=BOX



MOSAIC-TYPE=LINE

ACS has been designed to take advantage of guide stars handovers by aligning the detector axes to the FGS pickles. In order to provide users with the possibility of carrying out reliably large FOV offsets for mosaicing it would be desirable to be able to exploit this possibility. For the moment we have assumed that mosaicing offsets are limited to a maximum of 240 arcsec. SESD is investigating the possibility of using larger offsets. Following the proceedings of the unified Patterns WG (R. Henry et al.) patterns should be implemented within the unified patterns syntax using macros. A fully general deblemish pattern cannot easily be implemented within this syntax. On the other hand, depending on the distribution of blemishes on the chip, an implementation of deblemish using one of the supported dither patterns could be adequate. In fact, we expect this to be the case for the HRC. Since the final flight detectors for WFC have not yet been selected we do not yet know at this stage whether a fully general deblemish pattern is indeed necessary. For this reason it is convenient to delay a decision on the deblemish pattern until after the WFC detectors selection. In the following, we suggest how to implement the remaining patterns as macros within the unified pattern syntax.

7

ACS-DITHER-LINE It is a pattern similar to the WFPC2 LINE pattern. With default parameters it produces two pointings shifted along the pixel diagonal by 50 WFC pixels or 10 HRC pixels. The default parameters are chosen so as to have a shift by exactly an integer number of pixels for the WFC center. Pattern-Type: ACS-DITHER-LINE Pattern-Purpose: DITHER Number-Of-Points: 2-9, default is 2 Point-Spacing: 0.025-5.0, default is 2.5 for the WFC and 0.26 for the HRC Coordinate-Frame: POS-TARG Pattern-Orient: 0-360, default is 45 Center-Pattern: ?

ACS-DITHER-BOX It is similar to the WFPC2 BOX pattern. With default parameters it produces 4 pointings spanning a total range of 3.5 and 0.7 arcsec, respectively for WFC and HRC, in both detector axes X and Y. This is equivalent to 50 pixel shifts for WFC and approximately 20 pixels for HRC. The parameters are chosen so as to shift exactly by an integer number of pixels in the WFC center. Pattern-Type: ACS-DITHER-BOX Pattern-Purpose: DITHER Number-Of-Points: 4 Point-Spacing: 0.025-5.0, default is 3.5 for WFC and 0.5 for HRC Line-Spacing: 0.025-5.0, default is 3.5 for WFC and 0.5 for HRC Coordinate-Frame: POS-TARG Pattern-Orient: 0-360, default is 53.13 Center-Pattern: ?

8

ACS-MOSAIC-LINE It is a pattern similar to the WFPC2 LINE pattern. With default parameters it produces two pointings shifted along the detector X axis by 20 or 80 arcsec respectively for the HRC and the WFC. Pattern-Type: ACS-MOSAIC-LINE Pattern-Purpose: MOSAIC Number-Of-Points: 2-9, default is 2 Point-Spacing: 60-240, default is 80 for WFC and 20 for HRC Coordinate-Frame: POS-TARG Pattern-Orient: 0-360, default is 0 Center-Pattern: ?

ACS-MOSAIC-BOX It is similar to the WFPC2 BOX pattern. With default parameters it produces 4 pointings spanning for the HRC a range of 80 arcsec along the X axis and 160 arcsec along the Y axis. Pattern-Type: ACS-MOSAIC-BOX Pattern-Purpose: MOSAIC Number-Of-Points: 4 Point-Spacing: 60-240, default is 80 for WFC, 20 arcsec for HRC Line-Spacing: 60-240, default is 160 for WFC, 20 arcsec for HRC Coordinate-Frame: POS-TARG Pattern-Orient: 0-360, default is 0 Center-Pattern: ?

6. Recommendation Summarizing, on the basis of the characteristics of ACS and its expected usage we recommend that: 1. a quick look combination of dithered images is eventually included in a future extension of the pipeline and/or in the OTFC. Particularly important would be the

9

availability of paper products for the final combined image. The quick look image would also serve as a starting point for more sophisticated, offline, processing by GOs and GTOS. 2. offsets are derived from the commanded positions (for the automatic combination in the pipeline) or jitter files and cross-correlation (for off-line processing) and that software is developed to easily use such offsets, particularly when rotations are also present. 3. dithered images are combined using (a version of) Drizzle 4. a standalone IRAF task be developed to handle dithered images in a simple, convenient and robust way by the time of the ACS installation on HST. Such task would allow users to process their data off line and permit the testing with on orbit data which is necessary for the following pipeline extension. 5. we revisit the feasibility and cost of a science-grade combination in the pipeline after on-orbit calibrations and GO and GTO programs have allowed us to gain experience on dithering with ACS. Experience with automatic science-grade combination of dithered exposures could be relevant also in the context of NGST.

7. Acknowledgment We thank Alberto Micol and Benoit Pirenne of the ST-ECF in Garching for providing us with detailed information on their use of jitter files for the combination of WFPC2 dithered images, and Rodger Doxsey for useful suggestions. MS thanks all participants to the ACS Dithering WG and to the HDFS effort.

10