MegaCam Data Calibration

Table of contents:

  • 1. Astrometry
    • 1.1 Principle
    • 1.2 How it works
    • 1.3 FITS keywords
  • 2. Photometry
    • 2.1 Principle
    • 2.2 How it works
    • 2.2 FITS keywords
    • 2.3 2015A update

1. Astrometry

1.1 Principle

The MegaCam raw data already have some rough World Coordinates System (WCS) information loaded in their headers. That WCS information is based on a single value of the telescope pointing (the center of the field) extrapolated to the 36 CCDs based on their relative instrumental metrology (X-Y offsets and rotation).

The role of the Elixir astrometric calibration is to update these existing keywords with a more precise solution. That solution is derived on a per CCD basis, there are no considerations of the mosaic as a whole to refine further the astrometric solution (this is done by Terapix).

When Elixir successfully derives a new astrometric solution per CCD (95% of the cases, some of the 5% failures are simply due to the lack of reference stars like in an absorbed region of the Galactic plane), a precision of 0.5 to 1 arcsecond across each CCD is achieved (that precision is loaded into a new FITS keyword: "CERROR").

1.2 How it works

Elixir determines an initial guess for the image coordinates based on the native header keywords present in the raw file. The program then determines the plate scale and the rough orientation of the image from the header to get close to the final solution. The comparison is then made with an astrometric catalog, which may be the HST Guide Star Catalog, the USNO database, or even the photometry database produced by Elixir itself.

The solution derived by Elixir is a first order fit. For better precision, down to 0.1 arcsecond (say 1 pixel) further iterations on a second to third order polynomial would be necessary, but it is not in the scope of Elixir. The scatter in the solution is given in the CERROR keyword.

Each CCD in the mosaic gets processed individually and the information loaded in the headers are unique to that CCD only.

1.3 FITS keywords

Here is the set of keywords that get updated when Elixir successfully derives an astrometric solution:

The WCS keywords:

 CRPIX1  =      1066.1999511719 / WCS Coordinate reference pixel
 CRPIX2  =      4633.7001953125 / WCS Coordinate reference pixel
 CD1_1   =          5.21543E-05 / WCS Coordinate scale matrix
 CD1_2   =          8.27032E-08 / WCS Coordinate scale matrix
 CD2_1   =          1.33032E-07 / WCS Coordinate scale matrix
 CD2_2   =         -5.19428E-05 / WCS Coordinate scale matrix
 CRVAL1  =        13.8947624016 / WCS Ref value (RA in decimal degrees)
 CRVAL2  =         0.8811377613 / WCS Ref value (DEC in decimal degrees) 

The Elixir information:

 NASTRO  =                   17 / number of stars used for astrometry
 CERROR  =         0.8152624582 / scatter in astrometry soln (arcsec) 
In case of failure, Elixir does not change the initial raw astrometric keywords nor does it add the NASTRO and CERROR keywords, but it adds a comment field in the header in the Elixir section:
 COMMENT  Elixir:  no astrometry solution for this image

2. Photometry

2.1 Principle

The goal of the Elixir calibration is to provide the photometric equations parameters allowing the measurement of magnitudes in the Sloan system (SDSS). The magnitude is defined through this set of two equations:

Mag(instrumental[FILTER]) = -2.5log(DN) + 2.5log(EXPTIME) + PHOT_C + PHOT_K x (AIRMASS - 1) [1]

Mag(SDSS[FILTER]) = Mag(instrumental) + PHOT_X x ( Mag(SDSS[PHOT_C1] - Mag(SDSS[PHOT_C2]) ) [2]

With "FILTER" the filter defined in the FILTER keyword of the image (the filter through which the data were obtained for that file), "DN" the number of counts (ADUs) measured on the Elixir processed FITS image, "EXPTIME" the exposure time of the image as defined in the EXPTIME keyword, "PHOT_C" the photometric zero point (in DN) measured by Elixir for that filter, "PHOT_K" the airmass term as derived from MegaCam data mining over long stretches of time for that filter, "AIRMASS" the airmass value at which the exposure was taken as defined in the AIRMASS keyword, "PHOT_X" the color term as derived from MegaCam data mining over long stretches of time for the filter set defined by the keywords "PHOT_C1" and "PHOT_C2", and Mag(SDSS[PHOT_C1]) and Mag(SDSS[PHOT_C2]) are the two magnitudes in the SDSS system derived for the relevant filters listed in the PHOT_C1 and PHOT_C2 keywords.

Some equation solving is required to get to the SDSS magnitude directly from the instrumental magnitudes, i.e. avoid having Mag(SDSS) depending on either Mag(SDSS[PHOT_C1]) and Mag(SDSS[PHOT_C2]), but only on Mag(instrumental[PHOT_C1]) and Mag(instrumental[PHOT_C2]).

The only value that is updated from one MegaPrime observing run to another by Elixir is the photometric zero point (PHOT_C) while all the others are assumed constant.

The value of PHOT_C loaded in the headers is applicable only to data taken in photometric conditions. Beware that even if an image was acquired in non-photometric conditions (cirrus or clouds), it will still contain the Elixir photometry information for a clear sky. There are no information at this point in the image header to tag an image as taken or not under photometric conditions: for this the MetaData must be consulted. The QSO observer comment should provide this information, and so does the SkyProbe nightly plots. If the PI asked for the data to be taken in photometric conditions but QSO actually took the data in slightly non-photometric conditions, QSO will have then captured later on (weeks later sometimes) an image of that exact field with an exposure the 1/10th the value of the initial exposure to allow the PI doing a photometric bootstrapping.

2.2 How it works

The QSO rule is to observe one Landoldt field at the beginning of each night in all 5 broadband filters (u*, g', r', i', z') only if the sky appears clear (i.e. no clouds visible and SkyProbe telling so). At the end of the night, depending on which filters were used during that night, another Landoldt field is captured in that subset of filters only. If the sky is non-photometric, no time is wasted capturing these frames of course. At the end of each observing run, Elixir benefits from a large sample of data from which it can extract a per run zero point for each filter (PHOT_C). A rejection algorithm samples only the frames that appear to have been taken in photometric conditions (zero points close to the nominal values "PHOT_C0") to further filter out the possible effect of atmospheric absorption. The scatter appears to be indeed very limited for all the frames taken under a clear sky and the rejection of the outliers is straightforward.

As described in the Data Processing section of these pages, a photometric superflat is applied to the data in order for the zero point to be uniform across the entire field of view. Indeed, the photometric equation parameters are the same for all 36 CCDs.

2.3 FITS keywords

The following set of keywords is injected in the processed file header. It is the same information for all 36 CCDs. This is an example extracted from an i' band image:
  PHOT_C  =              25.7150 / Elixir zero point - measured for camera run
  PHOT_CS =               0.0048 / Elixir zero point - scatter
  PHOT_NS =                   19 / Elixir zero point - N stars
  PHOT_NM =                    5 / Elixir zero point - N images
  PHOT_C0 =              25.7430 / Elixir zero point - nominal
  PHOT_X  =               0.0830 / Elixir zero point - color term
  PHOT_K  =              -0.0400 / Elixir zero point - airmass term
  PHOT_C1 = 'r_SDSS            ' / Elixir zero point - color 1
  PHOT_C2 = 'i_SDSS            ' / Elixir zero point - color 2
  COMMENT   Photometric Analysis is incomplete for this image.
  COMMENT   MAG_SAT and MAG_LIM cannot be determined.
  COMMENT   Formula for Photometry, based on keywords given in this header:
  COMMENT   m = -2.5*log(DN) + 2.5*log(EXPTIME)
The equation encoded in the header relates easily to the equations [1] & [2] given above.

2.4 2015A update

Starting with semester 2015A, and to take advantage of the numerous "tertiary standards" observed by the SNLS and QSO teams at each camera run in the SNLS deep fields, the reference photometric system is changed from the SDSS to the SNLS magnitude system.

Therefore, all "old" (uS,gS,rS,iS,zS) filters which were used to create the SNLS deep field catalog are already in the new reference system, and have therefore no color correction terms. (Note that iS here denotes the second generation i' filter acquired in 2007 to replace the original filter that was broken at that time).

However, all new broadband filters (acquired late 2014, and available for observations in 2015A) are sufficiently different that they require their own zero point and color term corrections, with respect to the SNLS magnitude system.