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) 
Mag(SDSS[FILTER]) = Mag(instrumental) + PHOT_X x ( Mag(SDSS[PHOT_C1] - Mag(SDSS[PHOT_C2]) ) 
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])
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)
COMMENT M = m + PHOT_C + PHOT_K*(AIRMASS - 1) + PHOT_X*(PHOT_C1 - PHOT_C2)
The equation encoded in the header relates easily to the equations  & 
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.