WIRCam Current Preprocessing at CFHT

The current pipeline goes through the following steps:

  • Subtracts the bias from each line using reference pixels
  • Subtracts the dark
  • Divides by the dome flat field
  • Masks the bad pixels
  • Builds and subtracts the sky background
  • Subtracts the common noise pattern (crosstalk)
  • Provides a rough ~15 arcsec astrometry
  • Matches the 2MASS catalog to measure the absorption and photometry
Known issues with the current version:
  • No non-linearity correction (of up to 5% for 2005B and 2006A).
  • No DC correction of the horizontal bands extending on each sides from the guide box (does not affect all guided exposures).
  • Crosstalk should be removed as the first step. Current method still yields residues of subtraction. An overall improvement of the crosstalk subtraction is needed.
  • No illumination correction of the flat field to account for stray-light or uneven photometry across the field of view.

It is worth detailing a little more the step of sky subtraction. A relatively standard method is used. Processed images taken close in time and at different sky positions are scaled to the same median level and each pixel is medianed, excluding the current image. The exact number of images, of different DP positions and the time window used are variable and can be set manually. A minimum of 4 dithered exposures are used within a 30 minute time window. If these constraints can not be met, the image is currently discarded. Usually, about 5-9 images are used.

A mask is applied prior to the medianing. The current implementation of the masking is a quick and dirty one. All pixels above a 4-sigma threshold are masked prior to the medianing. It has been noticed on stacked images that sky subtraction residues exist due to faint sources remaining under that threshold.

A note about flat fielding. We currently use dome flats for our processing. Altough, twilight flats have been obtained regularly almost every night. Differences exist between dome and twilight flats and a detailed investigation to determine which flat is better is underway.

A note about dark subtraction. We currently acquire sequences of darks at a few exposure times and use the exposure time closest to the actual exposure time for data processing.

General quality of the preprocessed images. The photometric accuracy of the current processing is probably close to 5%. The main systematic effect should be coming from the uncorrected non-linearity. On deep stacks, the quick and dirty sky subtraction sets the limiting magnitude. A two-step sky subtraction process has now been put in place at Terapix to better build and subtract the sky. It uses the fully sky-subtracted images provided by CFHT to build a first-pass stack. Then it uses this deep stack and uses the a second set of CFHT preprocessed images (a set without sky subtraction) to build more accurate masks to build and subtract the sky.

The most important artifacts affecting final stacks are:

  • 1) Crosstalk caused by a bright star which produces a repetitive pattern on all other amplifiers;
  • 2) Vertical crosstalk spreading from the guide box vertically in both directions.It remains on stacks because our guide star selection algorithm always picks the brightest available star for guiding.

Coming improvements for version 1.0 of the pipeline:

  • Improved crosstalk subtraction
  • Non-linearity correction