                            J      	   Z          z           > dh^        TEXTMSWD                        CALINFO.TXTPDS_VERSION_ID                = PDS3
RECORD_TYPE                   = STREAM
OBJECT                        = TEXT
  PUBLICATION_DATE            = 2008-08-22
  NOTE                        = "Description of the CALIB
     directory contents for the MESSENGER MDIS CDR PDS Archive"
END_OBJECT                    = TEXT
END


                   CALIB Directory Contents

The CALIB directory contains files needed to reduce raw MDIS images (EDRs)
to units of radiance or I/F. Files for needed for major corrections are
arranged into subdirectories by correction type.

CALINFO.TXT      -  The file you are reading. It contains descriptions of
  calibration files and directions for their application to MDIS EDRs.

/LUT_INVERT      -  This directory contains the inverse lookup table
  required for inverting 8-bit images into their original 12-bit format.
  There are two files:

  MDISLUTINV_0.TAB - This file contains 8-bit values, and the 12-bit
    values to which they correspond. There is one set of 12-bit values
    for each of the eight available lookup tables in the instrument.

  MDISLUTINV_0.TAB - The label that describes the preceding file.

  Version history: Version 0 is based on testing using Venus 2
     flyby images.

/DARK_MODEL      - This directory contains tables of coefficients
  needed to model the dark level in the NAC or WAC, with on-chip
  pixel binning turned on or not. There are tables of coefficients
  with the nomenclature:

  MDIScam_bining_DARKMODEL_v.TAB where:
    cam = camera, NAC or WAC
    bining = binning, NOTBIN or BINNED
    v = version number, 0-9,a-z

  Detached labels describing the tables have the nomenclature:

  MDIScam_bining_DARKMODEL_v.LBL

  Version history: Version 0 is based on ground calibration measurements.

/FLAT            - This directory contains flat-field images which
  correct for response variations from pixel to pixel and across the
  CCD. There separate files for each of the 12 WAC filters and for the
  NAC, with on-chip pixel binning turned on or not. Flat-field files
  for the WAC have the nomclature:

  MDISWAC_bining_FLAT_FILT_nn_v.FIT where:
    bining = binning, NOTBIN or BINNED
    nn = filter number, 1-12
    v = version number, 0-9,a-z

  Detached labels describing the images have the nomenclature:

  MDISWAC_bining_FLAT_FILT_nn_v.LBL.

  Flat-field files for the NAC have the nomenclature:

  MDISNAC_bining_FLAT_v.FIT where:
    bining = binning, NOTBIN or BINNED
    v = version number, 0-9,a-z

  and detached labels describing them have the nomenclature:

  MDISNAC_bining_FLAT_v.LBL.

  Version history: Version 2 is the latest version based on ground
  calibration measurements. There are systematic artifacts in the
  flat fields due to unremoved dark current. In addition, the
  locations of some dust donuts has changed since ground calibration
  leading to under - or over-correction of the donuts' flat-field
  effects.

  Version 4 addresses both shortcomings by using flight
  measurements of the onboard calibration target or Venus to improve
  the high spatial frequency characteristics of the flat fields.

  Version 4 is available for both cameras and binning states with
  the exception of WAC filter 2 and NAC binned; for these cases,
  version 2 is the latest.

/RESPONSIVITY    - This directory contains tables of coefficients used
  to convert corrected DN to units of radiance. There are separate
  tables for the WAC and NAC, with on-chip pixel binning turned on or
  not. The tables have the nomenclature:

  MDIScam_bining_RESP_v.TAB where:
    cam = camera, NAC or WAC
    bining = binning, NOTBIN or BINNED
    v = version number, 0-9,a-z

  Each of the WAC tables has records for all of the filters. Detached
  labels describing the tables have the nomenclature:

  MDIScam_bining_RESP_v.LBL.

  Version history: For the WAC, version 0 is based on ground
  calibration measurements, version 1 includes updates based on
  improved characterization of filter bandpasses, and version 2
  includes validation from the first Mercury flyby. A significant
  error in units discovered in verions 0 and 1 is corrected in
  version 2. Version 3 (for filters 3 and 6 only) includes small 
  updates based on comparison with MASC-VIRS data.

  For the NAC, version 0 is based on ground calibration
  measurements. Version 1 combines updates based on improved
  characterization of the bandpass, validation from the first
  Mercury flyby, and correction of the previously mentioned units error.

/SOLAR           - This directory contains tables of solar irradiance
  used to convert radiance to units of I/F. There are separate
  tables for the WAC and NAC. The tables have the nomenclature:

  MDIScam_SOLAR_v.TAB where:
    cam = camera, NAC or WAC
    v = version number, 0-9,a-z

  The WAC table has records for all of the filters. Detached
  labels describing the tables have the nomenclature:

  MDIScam_SOLAR_v.LBL.

  Version history: Version 0 is based on ground characterization of the
  filter bandpasses and the solar spectrum of [KURUCZETAL1997].

/SUPPORT         - This directory contains characterizations of the
instrument that are not part of the calibration process per se, but were
used to derive the calibration files that are used.

  MDISLUTFWD_0.TAB contains the onboard forward lookup tables used
  optionally to convert 12-bit to 8-bit images.

  MDISLUTFWD_0.LBL describes that file.

Bandpasses for each WAC filter and for the NAC are given in tables having
the nomenclature
  MDISBPWa.TAB where:

   a = A through M for different filters:

   DETECTOR, FILTER #,        NAME, LETTER IN FILENAME
        WAC,        1,  700 BP 5  ,                 A
        WAC,        2,  700 BP 600,                 B
        WAC,        3,  480 BP 10 ,                 C
        WAC,        4,  560 BP 5  ,                 D
        WAC,        5,  630 BP 5  ,                 E
        WAC,        6,  430 BP 40 ,                 F
        WAC,        7,  750 BP 5  ,                 G
        WAC,        8,  950 BP 7  ,                 H
        WAC,        9, 1000 BP 15 ,                 I
        WAC,       10,  900 BP 5  ,                 J
        WAC,       11, 1020 BP 40 ,                 K
        WAC,       12,  830 BP 5  ,                 L
        NAC,      N/A,  N/A       ,                 M


USAGE
=====

Raw units are of DN converted to the physical units
of radiance or I/F, following the calibration equation:

L(x,y,f,T,t,b) = Lin[DN(x,y,f,T,t,b,MET) - Dk(x,y,T,t,b,MET) -
Sm(x,y,t,b)] / [Flat(x,y,f,b) * t * Resp(f,b,T)]

where:

L(x,y,f,T,t,b) is radiance in units of W / (m**-2 microns**-1 sr**-1),
measured by the pixel in column x, row y, through filter f, at CCD
temperature T and exposure time t, for binning mode b,

DN(x,y,f,T,t,b,MET) is the raw DN measured by the pixel in column x, row
y, through filter f, at CCD temperature T and exposure time t, for binning
mode b, and Mission Elapsed Time (MET),

Dk(x,y,T,t,b,MET) is the dark level in a given pixel, derived from
a model based on exposure time and CCD temperature,

Sm(x,y,t,b) is the scene-dependent frame transfer smear for the pixel,

Lin is a function that corrects small nonlinearity of detector response,

Flat(x,y,f,b) is the non-uniformity or 'flat-field' correction,

Resp(f,b,T) is the responsivity, relating dark-, flat-, and
smear-corrected DN per unit exposure time to radiance,

and

t is the exposure time in milliseconds.

The above equation assumes that data are in the native 12-bit format in
which they were read off the CCD, and that onboard application of 12-to-8
bit lookup tables (LUTs) has been inverted.

This correction is done step-wise using the calibration tables and
images in this directory as follows.


(1) Inversion of 12 to 8 bit Compression
========================================

8-to-12 bit inversion of DN values is required when the value of
MESS:COMP12_8 is 1 (when the data are 8-bit). There are 8 inverse lookup
tables (LUTs). The table to use is indicated by the value of MESS:COMP_ALG
from 0 through 7. An 8-bit value (in a row of the table) is inverted by
replacing it with the 12-bit value in the column corresponding to a
particular LUT.

The inversion tables are given in the product MDISLUTINV_0.


(2) Subtraction of modeled dark level
=====================================

There are four separate models of dark level (dark current plus
electronics bias), for the MDIS-WAC and MDIS-NAC (as indicated by the
keyword INSTRUMENT_ID), and for each camera, without pixel binning turned
on (MESS:FPU_BIN = 0) or with pixel binning turned on (MESS:FPU_BIN = 1).
The models estimates the dark level Dk(x,y,t,T) as a function of column
position x, row position y, exposure time t (as indicated by the keyword
MESS:EXPOSURE or EXPOSURE_DURATION), and CCD temperature T (as indicated
by the keyword MESS:CCD_TEMP):

Dk(x,y,t,T) = C(T) + D(T) + [E(T) + F(T) * t] * y + {O(T) + P(T) * t +
 [Q(T) + S(T) * t] * y} * x

Variables C(T), D(T), E(T), F(T), O(T), P(T), Q(T), and S(T) are all
third-order functions of CCD temperature, for example:

C(T) = H0 + H1 * T + H2 * T**2 + H3 * T**3

In all cases x or y is in the range 0-1023 for a not-binned image (as
indicated by the keyword MESS:FPU_BIN = 0) or 0-511 for a binned image (as
indicated by the keyword MESS:FPU_BIN = 1). t is in units of milliseconds,
and T is in UNCALIBRATED raw counts of CCD temperature.

For each pixel in column x and row y of an image, application of the
correction is:

DN_dark(x,y,t,T) = DN(x,y,t,T) - Dk(x,y,t,T)

where

DN(x,y,t,T) is DN in 12-bit format,

Dk(x,y,t,T) is the predicted DN level from the dark modeldark model, and

DN_dark(x,y,t,T) is dark-corrected DN.

The eight sets of coefficients for the WAC not-binned, WAC binned, NAC
not-binned, and NAC binned dark models are given in the products
MDISWAC_NOTBIN_DARKMODEL_0, MDISWAC_BINNED_DARKMODEL_0,
MDISNAC_NOTBIN_DARKMODEL_0, and MDISNAC_BINNED_DARKMODEL_0 respectively.


(3) Frame Transfer Smear Correction
===================================

Accumulation of signal continues during the finite duration
of frame transfer induces a streak or frame-transfer smear in the wake
of an illuminated object in the field of view, parallel to the direction
of frame transfer. This smear is approximated as:

Sm(x,y,t,b,f) = SUMM(1,y-1) { t2/t * [DN_dark(x,y,t,b) -
Sm(x,y,t,b,f)] / Flat(x,y,b,f)}

where

Sm(x,y,t,b,f) is the smear in column x and row y at exposure time t
in binning mode b and filter f,

Dk_dark (x,y,t,b) is dark-corrected DN in column x and row y at
exposure time t and temperature T in binning mode b,

Flat(x,y,b,f) is the flat-field correction in column x and row y in
binning mode b and filter f,

t is exposure time in ms, and

t2 is the time for frame transfer (about 3.4 ms) divided by the number of
lines in the image in the direction of frame transfer, 1024 for
full-frame images (when MESS:FPU_BIN = 0) or 512 for binned images (when
MESS:FPU_BIN = 1).

For each pixel in column x and row y of an image, application of the
correction is :

DN_dark_smear(x,y,t,b,f) = DN_dark(x,y,t,b,f) - Sm(x,y,t,b,f)

where

DN_dark_smear(x,y,t,b,f) is dark- and smear- corrected DN,

DN_dark(x,y,t,b,f) is dark-corrected DN, and

Sm(x,y,t,b,f) is the smear calculated as shown above.


(4) Correction for CCD non-linearity
====================================

To remove effects of nonlinearity in WAC image data, the following
corrections should be applied after correction of dark current, bias,
and smear.

For DN_dark_smear > 1
DN_lin = DN_dark_smear/[0.008760 * Ln(DN_dark_smear) + 0.936321]

For DN_dark_smear <= 1
DN_lin = DN_dark_smear/0.936321

To remove effects of nonlinearity in NAC image data, the following
procedure should be applied after correction of dark current, bias,
and smear.

For DN_dark_smear > 1
DN_lin = DN_dark_smear/[0.011844 * Ln(DN_dark_smear) + 0.912031]

For DN_dark_smear <= 1
DN_lin = DN_dark_smear/0.912031

where

DN_dark_smear is the input dark- and smear-corrected DN, and

DN_lin is linearized dark- and smear-corrected DN.


(5) Flat-field correction
=========================

The flat field correction removes pixel to pixel differences in detector
responsivity, so that the responsivity coefficients can be expressed as
scalars for each filter. There is a separate flat-field image for MDIS-WAC
and MDIS-NAC (as indicated by the keyword INSTRUMENT_ID), without pixel
binning turned on (MESS:FPU_BIN = 0) or with pixel binning turned on
(MESS:FPU_BIN = 1), for each separate filter (as indicated by the keyword
FILTER_NUMBER). All of the files are in the 'FLAT' directory.

For each pixel in column x and row y of an image, application of the
correction is

DN_flat(x,y,f,b) = DN_lin(x,y,f,b) / Flat(x,y,f,b)

where

DN_flat(x,y,f,b) is flat-fielded, linearized, dark- and smear-corrected
DN,

DN_lin(x,y,f,b) is linearized dark- and smear-corrected DN, and

Flat(x,y,f,b) is the value in the appropriate flat-field image.


(6) Conversion from DNs to radiance
===================================

The value that relates corrected DN's measured per unit time to radiance
is the responsivity. Responsivity is modeled as a function of which camera
is being used (MDIS-WAC or MDIS-NAC as indicated by the keyword
INSTRUMENT_ID), its binning state (as indicated by the keyword
MESS:FPU_BIN), and in the case of the WAC the filter number (as indicated
by the keyword FILTER_NUMBER). The coefficients used to calculate the
responsivity are in the 'RESPONSIVITY' directory. For a camera, binning
state, and filter, the responsivity is calculated from uncalibrated CCD
temperature (as indicated by the keyword MESS:CCD_TEMP) as follows:

Resp(f,T,b) = R(f,t=-30.3C,b) *
              [correction_offset(f,b) + T(CCD) * correction_slope(f,b)]

where

Resp(f,T,b) is the reponsivity in units of corrected DN / ms / (W / (m**2
microns**1 sr**1)) in filter f and binning state b and CCD temperature T,

R(t=-30.3C,b) is responsivity at a reference CCD temperature of 1060 DN (-
30.3C),

correction_offset(f,b) is camera- and filter-dependent temperature
correction offset for filter f and binning state b, and

correction_slope(f,b) is camera- and filter-dependent temperature
correction slope for filter f and binning state b.

To apply responsivity to obtain radiance L, the expression is

L = DN_flat / (t * Resp(T,b))

where

L is radiance in units of W / (m**2 microns**1 sr**1),

DN_flat is dark-, smear-, linearity-, and flat field-corrected DN,

t is the exposure time in milliseconds, and

Resp(f,T,b) is the responsivity in filter f at CCD temperature T and
binning state b.


(7) Conversion from radiance to I/F
===================================

To convert from radiance to I/F (also known as radiance factor, the ratio
of measured radiance to that which would be measured from a white
perfectly Lambertian surface), the following expression should be applied:

I_over_F(f) = L(f) * pi * (SOLAR_DISTANCE/149597870.691)**2 / F(f)

where

L(f) is calibrated radiance calculated as described above for some filter
f,

SOLAR_DISTANCE is that value for distance of the target object from the
center of the sun in kilometers (as indicated by the keyword
SOLAR_DISTANCE)

149597870.691 is the number of kilometers in 1 AU

F(f) is effective average solar irradiance sampled under the filter
bandpass.

The effective average solar radiance for each camera and bandpass is given
in the SOLAR directory.

