2001 Mars Odyssey

Thermal Emission Imaging System

(THEMIS)

 

 

 

Data Processing User’s Guide

Part 2 - Visible

 

 

Version 0.20

January 1, 2006

                                                           

 

                                                             

Prepared by:                                                                                                     __________                          

                                    Timothy H. McConnochie                                             Date

                                    Cornell University

 

                                                                                                                        __________                          

                                    James F.Bell III                                                            Date

                                    Cornell University

 

 

 

Approved:                                                                                                        __________                         

                                    Philip R. Christensen                                                     Date

                                    THEMIS Principal Investigator

 

                                                                                                                         __________                        

                                    Gaylen McSmith                                                           Date

                                    Mars Odyssey Science Office Manager

 

                                                                                                                        __________                         

                                    TBD                                                                             Date

                                    PDS / Mars Odyssey Interface Manager

 


3.         VISIBLE IMAGER CALIBRATION

3.1         Overview

This section describes the calibration procedure that is applied to THEMIS-VIS raw Experiment Data Records (EDRs) in order to generate Reduced Data Records (RDRs).  This section is provided by T. H. McConnochie and J. F. Bell, Cornell University (Calibration and In-Flight Performance of the Mars Odyssey THEMIS-VIS Instrument, Journal of Geophysical Research – Planets, submitted December 2005).

We describe the calibration and performance of the Mars Odyssey spacecraft’s Thermal Emission Imaging System Visible-Imaging Subsystem (THEMIS-VIS), and present comparisons with other instruments in order to validate the results.  The main challenge to the THEMIS-VIS calibration process is the significant amount of stray light that accumulates during both integration and readout.  The stray light is influenced by scene elements outside of the field of view of the THEMIS-VIS detector, and so its magnitude can only be estimated.  As a result, residual stray light artifacts are common in calibrated THEMIS-VIS images, and are especially prominent when the exposure time is short, or the scene contrast is high.  Nevertheless, our absolute 2s calibration uncertainty for the central region of the most frequently used THEMIS-VIS channel – the 654 nm band – is better than 5% for all but the shortest exposures times, and our comparisons with Hubble Space Telescope and Mars Exploration Rover measurements show no evidence of systematic calibration inaccuracies.

 

3.2         Introduction

The Mars Odyssey spacecraft’s Thermal Emission Imaging System (THEMIS) consists of two independent multispectral imagers sharing a single telescope – a nine-band mid-infrared microbolometer arrary (THEMIS-IR), and a five-band visible/near-infrared interline-transfer CCD (THEMIS-VIS).  THEMIS has been acquiring visible and infrared images from Odyssey's 400 km circular polar orbit since February 2002, and has already provided important new insights about the geology and evolution of the martian surface (e.g., Christensen et al., 2003; Titus et al., 2003; Pelkey et al., 2003, 2004; Milam et al., 2003).  Details of the THEMIS design, including THEMIS-IR, and the optics shared by both subsystems, can be found in Christensen et al. (2004).  The purpose of this paper is to describe and evaluate the calibration of THEMIS-VIS, and to describe aspects of the instrument design and on-orbit performance which are directly related to the calibration.

THEMIS-VIS is one of several visible light instruments currently in operation in Mars orbit. Of these, the Mars Orbiter Camera (MOC) on the Mars Global Surveyor (MGS) orbiter (Malin et al., 1992), and the High-Resolution Stereo Camera (HRSC) on the Mars Express orbiter (Neukum and Jaumann, 2004) are most similar to THEMIS-VIS. The OMEGA imaging spectrometer on Mars Express (Bonello et al., 2004), the visible-band bolometer detectors of the Thermal Emission Spectrometer (TES) on MGS (Christensen et al., 1992), and the Wide-Field Planetary Camera 2 (WFPC2), Advanced Camera for Surveys (ACS), and Space Telescope Imaging Spectrometer (STIS) (e.g., Bell, 2003) on the Hubble Space Telescope (HST) are also currently providing (or have recently provided) visible-light coverage of Mars, but at significantly lower resolutions than MOC and HRSC.

MOC acquires monochrome images at scales as small as ~1.5 m and two-color imagery at regional and global scales from a circular, 400 km altitude, 2:00 p.m. local solar time Sun-synchronous orbit (Malin et al., 1992).  HRSC provides stereo imagery and 4-channel color from a highly elliptical orbit with a best resolution of ~50 meters per pixel (Neukum and Jaumann, 2004).  Both MOC and HRSC are line-scan cameras, which use linear Charge-Coupled Device (CCD) arrays to obtain information along one axis, and spacecraft ground track motion perpendicular to the CCD array direction to obtain the other spatial axis.  THEMIS-VIS acquires monochrome or color images in any combination of its five bands with resolution modes of 18, 36, and 72 meters per pixel from its circular, 400 km, approximately Sun-synchronous orbit at typical local solar times of 4:00 p.m. to 5:00 p.m.  The filter bandpasses have a FWHM of roughly 50 nm and are centered at 423, 540, 654, 749, and 860 nm.  Fig. 1a shows the THEMIS-VIS bandpass profiles.  Unlike MOC and HRSC, THEMIS-VIS is a 2-D array framing camera – all 1024 x 1032 CCD pixels are exposed simultaneously.  However, spacecraft ground track motion is also used to expand the spatial coverage of acquired imaging sequences.  While THEMIS-VIS is not designed to provide stereo capability, a limited amount of information on the altitude and cross-track velocity of high clouds can be derived by co-registering overlapping frames acquired at slightly changing viewing geometries over the course of a color imaging sequence (McConnochie et al., 2004).

THEMIS-VIS was found to have a serious problem from stray light contaminating the detector signal both during integration and during the CCD readout.  Stray light accumulation during integration affects the entire array, but is most noticeable as broad and brighter stripes of additional signal near the edges of uncalibrated images.  Stray light accumulation during the readout process creates an additive offset, and an effect similar to the "electronic shutter smear" seen in some shutterless CCD imaging systems, both of which are proportional to scene brightness but independent of the exposure time.  Most of this paper is focused on the removal of both forms of stray light contamination from THEMIS-VIS images.

This paper describes and evaluates the process by which the radiance-calibrated data stored in the NASA Planetary Data System (PDS) THEMIS-VIS Reduced Data Records (RDRs; accessible via the internet at http://themis-data.asu.edu/) is generated from the raw PDS Engineering Data Records (EDRs).  (Note that THEMIS-VIS RDRs are not geometrically calibrated.  This paper does not address geometric calibration.)  We begin by describing the relevant operational details of THEMIS-VIS, as well as our preferred model for the stray-light contamination mechanisms.  We then discuss each step of the EDR-to-RDR calibration process.  Finally, we evaluate the calibration by comparing the derived THEMIS-VIS radiances to HST results, as well as to the surface-based multispectral measurements provided by the Mars Exploration Rovers’ Panoramic Cameras (Pancams).

 

3.3         Operational Details and Labeling Conventions

VIS uses a Kodak interline-transfer CCD.  For each column of photosites, there is a masked vertical register (v-register) adjacent to it.  At the start of a THEMIS-VIS exposure, any charge accumulated on the detector is flushed.  Charge accumulated in the photosites is transferred to the adjacent v-registers twice during the commanded exposure period – once at the midpoint and once at the end.  The v-registers are masked to minimize accumulation of photo-electrons during readout.  During the readout process, beginning immediately after the second photosite charge transfer, the charge is shifted "downstream," i.e., down the v-registers and transferred to the CCD’s horizontal register (h-register) one row at a time.  The h-register will be considered to be at the "bottom" of the detector array in this paper, so that "down" and "downstream" are in the same direction.  That is, if one row of pixels is said to be below or downstream of another row of pixels, then the row that is “below” or “downstream” is closer to the h-register.  With this convention, the direction of spacecraft motion (south on the afternoon side of the orbit) is always “down.”  We number rows starting from zero at the bottom.  Note, however, that the opposite row ordering convention is used in PDS EDR and RDR products.

Physically, the THEMIS-VIS CCD detector has 1032 columns and 1024 rows.  The 5 THEMIS-VIS filters are strips that are 1032 columns wide and approximately 200 rows tall and are bonded directly to the detector.  The front of the CCD housing is covered by a window, which therefore falls between the filter strips and the telescope optics, and which influences the overall spectral response in each THEMIS-VIS band.  Figure 1a gives the spectral response through each THEMIS-VIS filter with the spectral throughput of the CCD window included.  The spectral response of each filter by itself turns out to be important, as we will show, for predicting the magnitude of stray light contamination, and is therefore plotted in Figure 1b. 

In this document, as in the EDR and RDR labels on the PDS files, the filters are labeled "filter 1", "filter 2", …"filter 5" in order of their position on the detector array, with filter 1 at the bottom, closest to the h-register.  In this naming scheme, "filter 1" is 860 nm, "filter 2" is 425 nm, "filter 3" is 654 nm, "filter 4" is 749 nm and "filter 5" is 540 nm.  An alternate filter designation exists, using the labels "band 1", "band 2", …"band 5" to refer to the filters in order of increasing center wavelength [425, 540, 654, 749, 860 nm].  Figure 2 shows the THEMIS-VIS focal plane with “filters” f and “bands” k labeled.

The groundtrack of the Odyssey spacecraft runs approximately parallel to the detector columns.  This allows multispectral images to be acquired using a timed sequence of THEMIS-VIS exposures.  Any combination of one or more filters can be acquired by selectively reading out only those rows that correspond to the desired filters.  Thus, a single THEMIS-VIS exposure can contain any or all of the five filters.  We refer to the portion of an exposure that contains data for a single filter as a "framelet."  All exposures in a sequence have the same exposure duration, and all filters in an exposure must have the same exposure duration, and so all framelets in a given THEMIS-VIS sequence have identical exposure durations.

 The different filter framelets in a full-frame THEMIS-VIS exposure cover different regions of the Martian surface (nominally about 3.6 km apart for adjacent filters), hence the need for a sequence of multiple exposures to build up a multispectral image using spacecraft downtrack motion to image the same parts of the surface through different filters (and thus at slightly different times).  The exposure sequences are designed so that all filters end up with the same number of framelets, and so that when a filter moves past the targeted region of the surface, it is no longer read out, meaning that the first and last several exposures of an imaging sequence will have a smaller number of filters read out than exposures in the middle of a sequence.  Figure 3 illustrates the way that the framelets of a series of exposures map onto the Martian surface and can be arranged to form a continuous image strip for each filter.

The delay between exposures within a THEMIS-VIS imaging sequence is set so as to maximize the areal coverage of an imaging sequence while allowing for adequate overlap between adjacent framelets of the same band.  A 1 second delay leads to a typical overlap of between 10 and 20 detector pixels (depending on the surface elevation and the angle of the planet’s rotation relative to the groundtrack) when projected onto the martian surface.  One side effect of this overlap is that framelets of different bands are not exactly spatially coincident when map projected, meaning that framelet boundaries (and calibration artifacts associated with those boundaries) for different bands are in different positions in mapped data, and that the total area covered by lower-numbered filters within a sequence is offset relative to that covered by higher-numbered filters by a number of pixels equal to the framelet-to-framelet overlap multiplied by the difference in filter number.  The delay between exposures is given by the “INTERFRAME_DELAY” keyword in the THEMIS-VIS PDS headers.  A standard interframe delay of 1.00 seconds was for used image numbers up through V14885012.  The standard interframe delay was changed to 0.90 seconds beginning with V14886001.

Rows and columns near the edges of the filters are always cropped during readout.  The result is that each framelet has dimensions of 1024 by 192 detector pixels.  The rows that are cropped are referred to henceforth as inter-framelet rows.  When THEMIS-VIS EDR “cubes” are generated (3-dimensional data sets containing both spatial and spectral information, in PDS “QUB” file format), the THEMIS-VIS exposures in a sequence are broken up into their constituent framelets and re-assembled so that each framelet’s position in the cube corresponds roughly to its spatial location on the surface of the planet.  Thus, for a given filter, the corresponding plane of the EDR QUB is generated by concatenating the framelets from top to bottom in the order in which they were acquired.  Assuming no spatial summing (spatial summing is discussed below), and using the PDS row ordering convention (opposite that used elsewhere in this paper), the first (top) framelet goes in EDR rows 0 – 191, the second in EDR rows 192 – 383, etc..  Within a given EDR QUB plane, we assign the framelets a number, m, starting from the top, with the first framelet acquired in a given filter being m = 0. 

The procedure for removing stray light accumulated during readout requires that all of the framelets from a given exposure be grouped together.  Consider a framelet at position m0 taken through filter number f0. The position m1 of the framelet taken through filter number f1 that was acquired in the same exposure as framelet (m0, f0) can be found by the following equation:

.                                                                                                          (1)

If m1 < 0 or m1 ³ n, where n is the number of framelets in each filter in the EDR cube, then there was no framelet of filter f1 acquired in the same exposure as framelet (m0, f0).  Note that equation (1) is written in terms of filter numbers, which are, as mentioned previously, not the same as band numbers.  Note also, however, that the EDR and RDR QUB planes are stored in band order, not in filter order, and the location of each filter within the EDR and RDR cubes is given by the BAND_BIN_FILTER keyword in the PDS labels.  Figure 4 shows all five planes of the EDR from a five-band THEMIS-VIS imaging sequence with each framelet labeled according to its band number k, filter number f, framelet number m, and exposure number a.  Exposure number a is defined so that it is equal to m for the lowest numbered filter in a given EDR or RDR; thus:

.                                                                                                           (2)

THEMIS-VIS can operate in any of three spatial summing modes.  The preceding discussion has assumed summing mode 1, i.e., no spatial summing, for clarity.  In summing modes (i.e., for spatial summing factors of) 2 and 4, the THEMIS-VIS pixels are binned 2 x 2 and 4 x 4, respectively.  This creates framelets with 512 columns by 96 rows, or 256 columns by 48 rows, respectively.  Summing mode 1 has a typical pixel scale of 18 meters on the martian surface for a nadir-pointed viewing geometry.  Thus, summing modes 2 and 4 have nadir-pointed pixel scales of 36 and 72 meters per pixel.  To date, the martian surface has been targeted solely in the nadir-pointed configuration, so actual pixel scales will vary only slightly from the values quoted here.

The amount of time required to read out a single THEMIS-VIS exposure depends both on the spatial summing mode and on the number of filters being read out.  Each framelet of an exposure requires 141, 76, or 39 msec to read out, for summing modes 1, 2, and 4, respectively.  A small amount of time (~ 4 msec) is also required to "dump" the charge from each filter that is not being read out.  About 0.2 msec is required to dump each group of the inter-framelet rows, which are never read out.  So, for example, it takes 703 msec to complete the readout process when summing mode 1 data from all five filters is being acquired.  Since this readout time is long compared to the ~5-10 msec typical exposure time, the opacity of the masks that protect the v-registers from photo-electrons, as well as the amount of time that each row of data spends in the v-registers during readout, are crucial factors for the THEMIS-VIS calibration process.  And since THEMIS-VIS quickly dumps the charge in filters not being read out, the amount of time a given row spends in the v-registers depends not only on its distance from the h-register, but also on which of the filters that are below it on the array are being read out.

Correcting for stray light and dark current accumulation during readout requires knowledge of the timing for each data pixel as it is clocked down the v-registers to the h-register during readout.  For pixels in a given filter, this timing depends on which of the lower-numbered (closer to h-register) filters are being read out in a particular exposure, and which are being dumped and not read out.  Pixels in filter number f have 2(f-1) possible timing "paths" during readout (e.g., for filter 3, these are the read out filter combinations [3,2,1], [3,2], [3,1], and [3]).  The total number of possible paths is therefore

.                                                                                                                   (3)

These 31 possible paths will henceforth be referred to as "filter paths."  Each path is given a filter path code, F.  For a given filter with filter number f0, F is determined by:

.                                                        (4)

A filter is included in an exposure if both of the following are true: (1) the filter is present in the EDR; and (2) the framelet position m of the filter (as calculated from equation (1)) satisfies m1 < n and m1 ³ 0, where n is the number of framelets of each filter in the EDR cube.

The calibration process is also influenced by the manner in which the THEMIS-VIS electronics perform spatial summing and store the data.  The number of pixels summed in the “horizontal” direction (along rows) is always equal to the number of pixels summed in the “vertical” direction (along columns), but the spatial summing in each direction is performed in a different manner.  Vertical summing, if any, is performed in the h-register.  The charge from the appropriate number of v-register pixels is simply added together into each h-register site, and the h-register sites are then passed to the analog-to-digital (A-to-D) converter and represented as digital (“data number” or “DN”) values with a gain measured at 25.4 electrons per DN.  An additive bias equal to 104 DNs is removed at this stage, after which DN values can range from 0 to 2047 (i.e., 11 available bits) regardless of the spatial summing mode.  At this point, summing has only been performed along the vertical axis, and the DN values represent charge from a number of pixels equal to the spatial summing factor.  That is, for a given exposure time and scene brightness, 2x2 summing gives, neglecting charge accumulation during readout, twice as much h-register charge, and thus a DN value which is larger by a factor of two.

Next, horizontal summing is performed on these DN values by THEMIS-VIS onboard software, but now the appropriate number of pixels are averaged rather than summed, so that DN values in the 0 – 2047 range remain in the 0 – 2047 range.  Thus, considering the total effect of the two disparate steps of the spatial summing process, the values returned by THEMIS-VIS with spatial summing are, with a given scene brightness and exposure time, still only larger by a factor equal to the spatial summing factor (rather than to the spatial summing factor squared) once readout-accumulated charge has been removed, and the amount of exposure time required to reach saturation of the available 0 – 2047 DN representation range is correspondingly less by a factor equal to the spatial summing factor.

Before the THEMIS-VIS data are sent to the Odyssey spacecraft flight computer for storage and eventual downlink, the 0 – 2047 11-bit DN values are compressed into a 0 – 255 8-bit range using a square-root encoding algorithm.  It is important to note that 0 – 255 square-root encoded data is preserved in the EDR, that the encoding is non-linear, and that therefore the encoding must be reversed before the THEMIS-VIS EDR data is used in any quantitative way.  (See Table 5.)

The number of framelets in any THEMIS-VIS imaging sequence is limited by the 3.8 megabyte capacity of the THEMIS-VIS instrument’s data storage buffer, since THEMIS-VIS can transfer data to the spacecraft flight computer only after the completion of an imaging sequence.  This maximum capacity corresponds to 19, 78, and 318 framelets for summing modes 1, 2, and 4 respectively, which means maxima of 3, 15, and 63 framelets per band for five-band imaging sequences, or, for example, 6, 26, and 106 framelets per band for three-band imaging sequences.

In addition to the normal operating mode described above, THEMIS-VIS has a “test” mode in which the entire 1024x1032 array is read out and stored, only a single exposure is acquired, and only spatial summing mode 1 is available.  The in-flight test mode is otherwise identical to the normal operations.  However, much of the calibration data used for this paper was acquired using a pre-flight test mode with several additional differences from in-flight operations: 1)  only one photosite transfer, at the end of the commanded exposure time, is performed; 2) no bias subtraction is applied prior to data storage; and 3) the data are never compressed to an 8-bit representation.

In order to compare pre-flight (or in-flight) test mode results with normal operating mode data, the test mode images are separated into framelets, with the test mode image yielding one framelet for each filter.  These framelets are 1024x192, just like a normal framelet, and are obtained by extracting rows 2 – 193, 202 – 393,  403 – 594 , 611 – 802, and 813 – 1004, for filters 1 – 5, respectively, so as to cover the same region of the detector as the operating-mode framelets.  Rows are numbered starting with zero at the bottom of the detector.

 

3.4         Stray Light Model

Our calibration method is based on the hypothesis that the source of the stray light signals is a light leak under the edges of the filters (Fig. 5).  Since the edges of the filters are not masked, and since light reaches the focal plane at fairly high incidence angles (the THEMIS optics are an f/1.7 system), a significant portion of the light that strikes the focal plane near the edges of the filters is scattered or reflected towards the gap between the filter and detector  (this gap is filled with a transparent adhesive used to bond the filters to the array; see Fig. 5).  Since the interference filters strongly reflect broadband light, light that is scattered or reflected into the gap can be directed back down to the detector.

Light directed back towards the detector will obviously contaminate the photosites of the detector array, and we will refer to this effect as photosite stray light.  Photosite stray light is illustrated in Fig. 6, which shows a pre-flight test mode image of a uniform integrating-sphere light source.  Within the region covered by each filter the signal level is nearly uniform, and the brightness differences between the filters are the result of the calibration lamp spectrum and the wavelength dependence of the THEMIS-VIS system’s responsivity.  Superimposed on this expected pattern are broad brighter stripes at the bottom and on either side of the array.  These brighter stripes are the result of the photosite stray light.  Notice that the signal in most of the area of the 860 nm filter, located at the “bottom” of the array, is dominated by the photosite stray light.  It is not known why there is no similar bright stripe in the 540 nm filter at the “top” of the array.  Also note that, as shown by Fig. 7, the amplitude of this stray light pattern is similar in each of the filters, despite the fact that the center-field, mostly uncontaminated photosite signal varies widely from filter to filter.

  Light propagating in the filter-detector gap also contaminates the v-registers and h-register, since the narrow masks that protect the v-registers and h-register are less effective at high incidence angles.  The v-register and h-register contamination is readily observed in the pre-flight calibration data by extrapolating DN vs. time to an exposure time of zero, thereby eliminating the photosite contribution to the signal.  Fig. 8 shows a column profile of this register contamination signal for several different calibration-lamp brightnesses, with a 3-msec integration photosite signal shown for comparison.  Fig. 9 shows an image of the register contamination signal for a particular pre-flight calibration lamp brightness.  The ramp-up of the register contamination signal towards high row numbers seen in Figs. 8 and 9 is superficially similar to an electronic shutter smear effect, but it differs in that it depends on the brightness of the scene just outside of the detector field of view, rather than on the portion of the scene imaged by the detector, and so its magnitude and behavior are not directly related to the information contained in the image.

Although details of the scattering/reflection processes and the properties of the register masks are not well known and so must be derived as part of the calibration procedure, the general features of our model yield several key assumptions for that procedure:

1) The source for both types of stray light is just outside the field of view of the detector.  Therefore, the calibration procedure can never exactly remove stray light effects because the scene radiance in the region just outside the field of view can by definition only be estimated.    For low-contrast scenes, this “guess” can be fairly accurate, but for high-contrast scenes, the error inherent in estimating out-of-field stray light can be significant.

2) The register stray light is proportional to the scene radiance, and to the amount of time that each row spends in the v-registers during the readout process, but it does not depend on the exposure time (since the readout time depends only on the spatial summing mode and filter combination).

3) The photosite stray light is proportional to both the scene radiance and the exposure time.

4) Both stray light signals are proportional to the “broadband” scene radiance, rather than the narrow-band radiance in any of the five filters, since the stray light bypasses the filters in our model of the effect.  Thus, just as the “direct” (i.e., stray-light free) signal in each filter is proportional to the scene radiance spectrum weighted by that particular filter’s response function (shown in Fig. 1a), the stray light signal in each filter is proportional to the scene radiance weighted by a different response function – one which includes all of the same factors as those for the filters, except for the transmissivity of the filters themselves.  This response function is shown in Fig. 10.  The dominant factors in this broadband response function are the CCD window and the detector quantum efficiency.

 

3.5         Calibration Procedure

The THEMIS-VIS flight-data calibration process, (henceforth, the "calibration pipeline") consists of seven steps:  (1) 8-bit to 11-bit decoding; (2) identification of bad pixels; (3) bias subtraction; (4) register stray light subtraction; (5) correction for pixel response variations (i.e., "flatfielding"); (6) photosite stray light subtraction;  and (7) conversion to radiance.  Derivation of the calibration frames and calibration coefficients necessary for this pipeline proceeds in a somewhat different order, however.   The first step of the calibration derivation is to use the pre-flight data set to determine the photosite stray-light response and the direct response for the central region of each filter.  The next step is to develop a model, which we will call the “broadband radiance model” that predicts the broadband scene radiance from the narrow-band scene radiances in each of the five THEMIS-VIS bandpasses.   The response coefficients and broadband radiance model are necessary for deriving the calibration frames of pipeline steps 4, 6, and 7.  Once the response coefficients and broadband radiance model are in hand, the calibration frames are derived in the same order as the pipeline steps using only on-orbit data, and so we will conclude this section by describing each pipeline step together with the derivation of any required calibration frames.

Many of the calibration coefficients, and in particular the response coefficients, apply to the entire area of a filter, and so they are calculated using mean values from a representative sub-region of that filter’s framelets.  This sub-region should also contain a minimal amount of stray light, so that the calibration coefficients based on it are influenced as little possible by any uncertainties in the stray light estimates.  We have identified one such representative-yet-minimal-stray-light region, which will be referred to as the “calibration region of interest” (C-ROI), for each filter.  The C-ROI boundaries are shown in Fig. 6.

3.6         Derivation of response coefficients from pre-flight data

Given the differences between the pre-flight and on-orbit operating modes, and considering the possibility of launch or post-launch changes in instrument behavior, we have derived the THEMIS-VIS calibration using on-orbit data wherever possible.  However, in order to accurately determine the photosite radiometric responses, we require a source with known spectral radiance.  In principle, this requirement could be met on-orbit using radiance measurements acquired by another instrument, but this other instrument would need to observe the same region of Mars at the same time as a THEMIS-VIS imaging sequence, with the same viewing geometry, and have a well validated calibration, high spectral resolution, and sub-kilometer scale spatial resolution.    We have acquired concurrent THEMIS-VIS – WFPC2 and THEMIS-VIS – ACS measurements that come closest to satisfying these criteria, but given the spatial resolution discrepancy, and since the difference in phase angle between the HST measurements and the THEMIS-VIS measurements is very large, and the high-phase photometric properties of the martian surface-atmosphere system are potentially variable and not well known, we deem our ground based spectral radiance source to be the most reliable means for determining the radiometric response.   The HST data sets will be used to validate the results.

The pre-flight data set we have used was acquired with the THEMIS instrument in a temperature-controlled vacuum chamber viewing an integrating-sphere light source through a window in the chamber wall.   The integrating-sphere exit port filled the THEMIS-VIS field of view and extended well beyond it in all directions.  We verified that changing the distance between the integrating sphere exit port and the THEMIS-VIS window had no effect on the observed signal pattern or signal magnitude. 

The integrating sphere output spectral radiance is varied by changing the number of 8, 45, and 200 Watt lamps, and for many of the possible lamp combinations the integrating sphere output is traceable to National Institute of Standards and Technology (NIST) standards.  For the THEMIS-VIS calibration activities, we used from one to nine 8W lamps, and also settings with one 45W lamp and two 45W lamps.  The lamp settings with the 8W lamps are all directly NIST-traceable with +/- 2% precision.  The one 45 W and two 45 W settings are not directly NIST-traceable.  We have estimated the spectral radiance for these settings by subtracting the NIST-traceable ten 8W setting spectral radiance from the NIST-traceable ten 8 W, one 45 W setting and ten 8 W, two 45 W setting spectral radiances.  This subtraction is of course only valid under the assumption that the lamp settings are linear combinations of each other.  We have tested the linearity assumption by differencing the NIST-traceable radiance measurements of sets of 8W lamp settings; for example, nine 8 W – six 8 W – three 8 W should give zero radiance with a precision degraded by a factor of roughly.  We find that the linearity assumption is valid under such tests, and we therefore conclude that our differencing-based spectral radiance values for the 45 W lamps will have a precision of roughly  ´ +/- 2% , i.e., better than +/- 3%, and will not be systematically biased.  In any case, the 45 W lamps provide a different spectral shape from the 8 W lamps, and this different spectral shape is crucial for separating the direct response from the stray-light response, so we have no choice but to use the 45 W lamps in the calibration process.

 The spectral radiance presented to THEMIS-VIS is also of course affected by the transmissivity of the vacuum chamber window.  Fig. 11 shows the integrating sphere radiance for each lamp setting after correction for the window transmissivity.  For each lamp setting, we calculate a weighted mean broadband radiance, as well as a weighted mean narrow-band radiance for each filter, by weighting the window-corrected sphere radiances with the response functions of Fig. 10 and Fig. 1a, respectively.  These weighted mean radiance values are listed in Table 1.

A set of THEMIS-VIS integrating-sphere tests was performed in a thermally controlled vacuum chamber temperature with the THEMIS-VIS focal plane temperature maintained at each of six different settings.  For each temperature setting, measurements were taken with the following twelve lamp settings: all lamps turned off, one through nine 8W lamps, one 45W lamp, and two 45W lamps.  Exposure times of 3, 6, 12, and 24 milliseconds were used at each lamp setting, and ten images were acquired at each exposure time.  All ten images are averaged together to produce a single low-noise image at each exposure time.  We use this data set to estimate the photosite stray-light response and the direct response as follows:

1)      Fit a line to the set of exposure times for each pixel of each lamp level in order to determine S*, the total photosite (stray-light plus direct) signal, in DN per msec.

,                                                                                   (5)

where  is the observed raw DN value for pixel i, j of band k at lamp level l, t is exposure time, and the residuals of the fit are represented by eZ gives the register stray-light signal.  Z is useful for understanding the behavior of the register stray light, but since the pre-flight test-mode readout pattern and timing is different from the flight operating mode, Z is not directly applicable to the flight data calibration.

Since the pre-flight test mode performs only one photosite-to-register transfer in the course of an exposure, detector full-well was reached well before the A-to-D conversion saturation value of 2047.  We observed non-linear response associated with full-well at DN levels greater than 1250.  Therefore, we inspected the  images for each filter and lamp level and excluded any with substantial regions of > 1250 DN.  Additionally, in the linear fitting process, we exclude all individual pixels that are either greater than 1250 DN, or which have more than 5% of pixels > 1250 in the surrounding 11x11 region.

2)      Determine the background-subtracted total photosite signal, S:

,                                                                                                      (6)

where  refers to the lamp setting with all lamps turned off.  The zero lamp signal is clearly not dark current, as the zero lamp images show a stray light pattern similar to the directly illuminated images, and their  peak center-filter values of 2.5 DN per msec at 262 K are too high for plausible dark current and shows no temperature dependence.  The zero lamp signal is also spectrally distinct from the integrating-sphere signal, which implies that its source may be background light in the testing room.    In addition to subtracting this background light, we have also attempted to mitigate its impact by excluding the lower lamp settings from the model fits described below.  Thus, in deriving the response coefficients, we use only those settings with the 45W lamps or at least six 8W lamps.  With this restriction, the largest background signal contribution is to the 423 nm filter signal at six 8W lamps, where it makes up ~15% of the total signal.  Although the background subtraction should remove most of this contribution, without knowing the source of the background signal we have no way to assess its variability aside from the residuals of the model fits described below.

3)      For each band k, extract the C-ROI mean values of the background subtracted photosite signal,  (“Signal” in Table 1).  Then fit them to a linear model, with weighted-mean broadband radiance  (in Table 1), and weighted-mean band k narrow-band radiance  (also in Table 1) as the independent variables:

,                                                                                              (7)

where  and  are the photosite stray light response coefficient and direct response coefficient, respectively.  The straight bar in the symbols and  indicates that these radiances should be interpreted as spatial means over the region sampled by a framelet.

Since  and are highly correlated, we have taken the precaution of solving for  and  using a grid-search algorithm, which allows us to map the solution set and visualize the extent to which  and  can be simultaneously constrained.  We perform the grid-search with a grid spacing of 0.005 DN msec-1 / (W m-2 mm-1 sr-1) in both  and , calculating the c2 probability at each point.  The search range was 0 – 3 DN msec-1 / (W m-2 mm-1 sr-1) in  and 0 – 7 DN msec-1 / (W m-2 mm-1 sr-1) in .  In order to calculate the c2 probability, each data point is assigned a standard error equal to the root-mean-squared residual of the best fit.  Fig. 12 shows the resulting normalized probability density function (PDF) for 4 different vacuum chamber temperatures.  Note that the model fits do a poor job of constraining the photosite stray-light response for bands 2 and 4, and that they provide no constraint at all on the photosite stray light response of band 3.  Also note the small upward trend of direct response with increasing temperature for bands 2 through 5.  Since the 268 K and 279 K tests bracket the observed on-orbit focal plane temperatures of 268 – 278 K, we will use these tests to determine our response coefficients and associated confidence intervals.

4)      Identify the band 1 direct and stray light response coefficients directly from the 279 K PDFs.  Since band 1 shows no temperature trend for either coefficient, we are free to choose the most precise estimate, which is the one calculated at 279 K.  The normalized 1-D PDF for direct response is shown in Fig. 13, and the normalized 1-D PDF for stray light response in Fig. 14.  The adopted values for the coefficients, and their confidence intervals, are given in Table 2.  The adopted values are the mean of the population described by the 1-D PDF.  The confidence intervals are ranges centered on the adopted value and encompassing 95% of the total probability in the 1-D PDF.

5)      Identify the band 5 response coefficients by combining the 1-D PDFs for the 268 K and 279 K tests.  This is necessary because the band 5 coefficients exhibit a temperature trend.  The adopted values and confidence intervals are derived as previously described, but using the sum of the normalized 1-D PDFs for the two tests.  However, as will be described later, the band 5 direct response coefficient derived in this manner was found to conflict with on-orbit validation measurements.  We have therefore chosen to adopt the band 5 direct response coefficient implied by the validation measurements.

6)      Assume that band 2 – 4 have the same stray light response as band 1.   Some kind of assumption about the band 2 – 4 stray light response is obviously required, since it is poorly constrained by the integrating sphere data set, and we have chosen the simplest possible assumption that is consistent with the 2-D PDFs.  The row profiles of bands 1 – 4 shown in Fig. 7 indicate that these four bands show similar stray light patterns with similar amplitudes, which suggests that similar amounts of light are reaching the central area of each filter, and that our assumption is therefore reasonable.

7)      Identify the direct response coefficients for bands 2 – 4 by combining the 1-D PDFs for the 268 K and 279 K tests.  For these bands, the 1-D PDF is generated by summing over the region of the 2-D PDF that falls within the band 1 stray light response coefficient confidence interval.

3.7         Derivation of broadband radiance model from HST data

Since the broadband radiance, , is not generally known during on-orbit operations, it must be estimated from the narrow band radiances, .  We do this by finding a set of coefficients  such that

.                                                                                                       (8)

Alternatively, we can estimate  directly from the photosite signal, S:

.                                                                                                      (9)

The  coefficients are related to the  coefficients by

,                                                                                                (10)

which can be shown by combining Equations (7), (8), and (9). 

The  or  can be estimated from a data set of  and that is representative of the radiance of Mars during on-orbit operations.  We have chosen a set of HST WFPC2 and ACS observations of Mars performed in 2003 during the Odyssey mission (Bell et al., 2004b), the details of which are given in Table 3.  These HST observations use narrow-band filters to sample the Mars radiance spectrum, and so we must interpolate from these samples to form a complete spectrum suitable for convolution with the THEMIS-VIS narrow-band and broadband spectral response functions.  We do this by performing a cubic spline interpolation of the HST I/F samples and then multiplying by the solar radiance spectrum.

The HST measurements are calibrated using the methods described in Bell et al. (1997).  The images are projected onto a 2 pixel-per-degree simple cylindrical grid, and the Mars radiance spectrum at each grid point is used to generate  and for each grid point.  All grid points from all of the HST observation sequences described in Table 3 form the  and  for the multiple linear regression model indicated by Equations (8) or (9).  We have used this regression model approach to find  and  in two ways: 1) using Eq. (7) to calculate  from  and , then Eq. (9) to solve for , and then Eq. (10) to give  from ; and 2) using Eq. (8) to solve for  and then Eq. (10) to give . Both methods produce essentially identical results.

Our adopted  coefficients are shown in Table 4.  In order to produce the best possible estimate of for a particular image sequence, the calibration pipeline needs to be able to use whatever  values are available, and so we need a different set of  for each of the 31 possible band combinations.  The calibration pipeline will choose the set of coefficients for the band combination that includes only those bands that are being used to estimate , regardless of which bands happen to be present in an EDR or an exposure.  Since the  are regression coefficients and not response coefficients, negative values are in principle allowed.  However, all of the negative coefficients in Table 4 are very small relative to the others for their band combination, and so can be interpreted as zero, meaning that a particular band when part of a particular band combination does not contribute significantly to the  estimate.

3.8         Flight data calibration procedure

In this subsection, we describe the calibration pipeline procedures in the order that they are performed.

3.8.1        8-bit to 11-bit decoding. 

The 8-bit-per-pixel square-root encoded EDR data is decoded to its full 11-bit-per-pixel linear range using the inverse look-up table shown in Table 5.  The decoded values can range from 0 to 2040.

3.8.2        “Bad” pixel identification 

Bad pixels, also known as null pixels, are assigned the value specified by the CORE_NULL keyword in the PDS RDR label, and are ignored in all subsequent THEMIS-VIS processing.  Bad pixels are identified in the decoded (11-bit-per-pixel) EDR data as follows:

3.8.2.a)     Threshold values 

All pixels with a DN level of 2040 (the highest possible value) or 0 are flagged as null pixels because they are likely saturated.

3.8.2.b)     Bad rows and columns

Some rows and columns near the edge of each framelet are always filled with unusable (noisy or saturated or zero) data.  The pixels in these rows and columns (Table 6) are therefore flagged as null.

3.8.2.c)     Saturated regions

In exposures where all or part of the detector is saturated, the DN value of some saturated pixels is "wrapped" by the instrument firmware to a value which is invariably small compared to the rest of the pixels in the array.  These "wrapped" pixels are identified by considering each THEMIS-VIS framelet separately.  Any pixel whose value is less than the framelet median by at least 1200 DN has probably been "wrapped" and is therefore flagged as null.  The median is calculated using all pixels not flagged as null in a) or b).

3.8.2.d)     Neighboring pixels

Pixels near to saturated regions are often observed to be anomalously high even if they themselves do not meet the criteria of a) or c).  Therefore, if too many of the pixels near a given pixel are flagged as null in a) or c), that pixel is also flagged as null.  A 5 by 5 pixel region centered on each pixel is considered.  This region is truncated if it would extend pass the edge of the array.  Pixels that lie in the "bad rows and columns" identified in b) are always treated as valid for this procedure.  If more than 30% of the pixels in the 5x5 (truncated if necessary) region for a given pixel are null, then that pixel is also flagged as null.

3.8.3        Bias subtraction

3.8.3.a)      Nighttime VIS images

The bias subtraction procedure uses THEMIS-VIS images acquired at night with nominal exposure times of zero.  The bias is determined independently for each of the three available spatial summing modes.  In practice there is no detectable difference between night images acquired with typical VIS exposure times (up to thirty milliseconds) and night images with zero exposure time, so non-zero exposure time night images are also included in the averaging process that is used to determine the bias.  This also means that the dark current for typical THEMIS-VIS exposure times is effectively zero.  (Typical on-orbit focal plane temperatures are ±5°C). However, because the readout time is much longer than the exposure times, some of the signal for zero millisecond nighttime exposures may be attributable to dark current accumulated during readout.  The evidence for this is a slight ramp-up in the zero-millisecond signal towards the top of the detector.  Fortunately, since the amount of dark current that accumulates during readout is not a function of exposure time, and since we have detected no temporal variability in the zero exposure night-time images, there is no need to distinguish between bias and readout dark current for the purpose of calibration.  We will therefore henceforth lump both effects together and refer to the combination of the two simply as "bias."

3.8.3.b)     Averaging to create bias frames

To properly account for the small ramp in the bias level, bias frames are created for each of the 31 filter paths and for each of the 3 spatial summing modes.  Where possible, each bias frame is generated from a simple average of all available nighttime exposure framelets with the same summing mode and filter path.

3.8.3.c)     Modeling to handle paths for which no empirical data is available

For many of the less common filter paths, nighttime exposure framelets have not yet been acquired.  In these cases, we apply the following simple model of the detector readout process in order to approximate the expected bias signal:

Consider what happens to the charge from all upstream filters while a downstream filter is being read out.  As our first simplifying assumption, we ignore the inter-framelet rows (there are 7 ± 2 inter-framelet rows at each filter boundary) and pretend that the top row of one framelet is always adjacent to the bottom row of the next.  As each row of the downstream filter is shifted into the h-register, the upstream filter rows are shifted one row closer to the h-register, so that by the time the entire downstream filter has been read out, the rows of each upstream filter f have shifted so that they now lie under the filter   f – 1.  The charge that these rows accumulate in that time is characteristic of filter f.  When the next downstream filter is read out, these same rows are shifted from lying under filter f – 1 to lying under filter f – 2, with the charge accumulated during the shift being characteristic of the starting filter for that shift.  When the rows of filter f are finally in the position where filter f rows are being transferred directly to the h-register, the charge that they accumulate is characteristic of filter 1.  Thus, if all of the filters downstream from f are read out in an exposure, then the rows in filter f accumulate charge from filters f, f – 1, f – 2, …1.

If any of the filters downstream from f is not being read out, then the process of dumping that filter shifts f downstream very rapidly, so if the rows in filter f were under filter f at the start of the dump, very little of the characteristic bias charge of filter f – ∆ is accumulated.  Thus, our second simplifying assumption is that the charge accumulated during such a dump is negligible.

The bias charge built up during readout for a certain filter following a given filter path with filter path code F can therefore be calculated simply by summing the characteristic bias charges, Eij,f, of each downstream filter.  The bias frame Bij,F is:

.                                                                                            (11)

The values of f0 and h(f) are properties of the filter path denoted by F and are defined by Eq. (4), i.e., f0 is the starting filter of the filter path and h(f) indicates whether the filter f is one of those being read out for that filter path.  Eij,f and Bij,F are elements of arrays with the same dimensions as the framelets of the spatial summing mode for which the Bij,F are being derived.  Note that h(f) is always equal to 1 when f = f0, so the characteristic bias of the first filter, Eij,f=1, is always present in the bias frame.

Eij,f can be derived by using empirically known (via the averaging method described in section 3.2) Bij,F.  We perform this derivation by using Bij,F values for those filter paths for which all downstream filters are read out.  These are Bij,F=31, Bij,F=15, Bij,F=7, Bij,F=3, and Bij,F=1.  Writing out Eq. (11) explicitly for these five Bij,F leads to the following trivial system of equations:

                                                         (12)

3.8.3.d)     Bias subtraction algorithm

Bias frames for each summing mode are stored in FITS files each with 31 planes corresponding to the 31 filter paths.  The bias is removed by determining the filter path for each framelet of each filter and then subtracting from it the stored bias frame for that filter path and summing mode.  The bias frames are stored in the FITS files in order of the F code, i.e., the bias frame for a given filter path is found at plane number F - 1 for a zero-based cube plane counting system.

3.8.4        Register stray light subtraction

The strategy for removing register stray light is to first identify the spatial pattern using zero duration exposures, and then determine the way that the intensity of that pattern scales with C-ROI mean broadband scene radiance .

3.8.4.a)     Zero duration daytime THEMIS-VIS images

On-orbit images acquired during daylight with a commanded exposure time of zero msec show the same spatial pattern as the ground-calibration-derived zero exposure images. (cf.,  Fig. 9 and Fig. 15)  Of course, a commanded exposure time of zero does not really produce an exposure time of exactly zero.  However, in the majority of zero exposure flight data, there is no evidence of surface features visible through the register stray light pattern.  The spatial variation of the small amount of scene derived DN that is probably present in the zero exposure images will be washed out by averaging a sufficient number of images.  Furthermore, the level of scene-derived contamination of the zero exposure images will be a negligible fraction of the signal of any given THEMIS-VIS image as long as the effective exposure time for a commanded exposure time of zero is a negligible fraction of the effective exposure time for the THEMIS-VIS image in question.

The register stray light frames are generated using zero duration daytime THEMIS-VIS images that have been calibrated through stage 3 (bias subtraction) of the pipeline.  The zero exposure daytime images are first averaged according to filter path and spatial summing mode in the same manner as the nighttime images are averaged to create bias frames.  Next, the register stray light frames are normalized by, first, setting the mean of a given spatial summing mode’s F = 1 register stray light frame equal to unity.  Then, the register stray light frame for every other filter path for that spatial summing mode is normalized so that its values, relative to the F = 1 frame, reflect the relative intensity of the register stray light for that filter path in the data set.  Normalization to reflect relative intensities in the data set is crucial, because the only means that we have available for determining the scaling factor between the broadband radiance  and register stray light is to measure the changes in mean DN from framelet to framelet within an image sequence as a result of changes in filter path, and then find a single scaling factor for all of the register stray light frames that eliminates these changes in mean DN.

For each filter path, the necessary normalization factor is determined as follows: 1) Find all of the exposures that are in the set of images used to generate the register stray light frames, and contain both the given filter path and the F = 1 filter path.  2) For each of these exposures, calculate the ratio of the mean value of the framelet from the given filter path to the mean value of the F = 1 framelet.  3)  The normalization factor is a single number by which the filter path’s register stray light frame is scaled so that its mean equals the mean of the ratios from the previous step.  Note that the means used to normalize the register stray light frames are calculated from the all non-null pixels in the framelets, rather than from the C-ROI used elsewhere in the calibration procedures.

A complication for this ratio-based normalization is that there are many filter paths that cannot occur in the same exposure as the F = 1 path.  However, every filter path does occur in the same exposure as one of F = 16, F = 8, F = 4, F = 2, or F = 1 paths, which we will refer to as “clear” paths (these are the paths that apply to filters 5, 4, 3, 2, and 1, respectively, when there are no other filters downstream).  The normalization factors of the “clear” filter paths are established using ratios with respect to the F = 1 path, according to the previously described procedure.  Then the ratios of all other filter paths are measured with respect to whichever “clear” path they occur with, and then rescaled using the ratio of that “clear” path to the F = 1 path, which gives us the ratios of these paths with respect to the F = 1 path and hence the normalization factor.

The “clear”-to-F = 1 ratios are established as follows:  In THEMIS-VIS images that use all five filters, an exposure containing F = 2 always occurs immediately following an F = 1 exposure, an exposure containing F = 4 always occurs immediately following an F = 2 exposure, etc.  So the F = 2 ratio is calculated relative to the F = 1 from the previous exposure in the same image, the F = 4 is calculated relative to the previous exposure F = 2, F = 8 relative to the previous F = 4, and F = 16 relative to the previous F = 8.  These ratios are then rescaled in sequence so that they are expressed relative to F = 1.

This normalization scheme assumes that the register stray light signals from the various filter paths are related to each other by a constant proportionality factor.  We have examined the register stray light signal ratios, and have found that they are consistent with the constant proportionality hypothesis.  Obviously, the normalized register stray light frames are generated as described above only for the filter paths that are represented in our data set of zero exposure daylight images.  Register stray light frames for filter paths that are not represented in the data set of zero exposure daylight images are generated by starting from the normalized frames and then applying the same method used for the bias frames in step 3c.

3.8.4.b)     Deriving the register stray light response coefficient

In order to solve for the register stray light response coefficient, we postulate that, on average, once the register stray light is removed, the framelet means will be independent of the filter path, provided that we consider framelets from the same filter.  To take advantage of this postulate, we first determine, for each 5-filter image of a given summing mode, the factor y that we need to multiply the normalized register stray light frames by so that when they are subtracted from the image framelets, the differences between adjacent framelet C-ROI means are minimized in a least-squares sense.  More explicitly, for each 5-filter image, we:  1) Identify the set of framelet pairs that satisfy: a) both members of the pair are from the same filter; b) the members of the pair come from adjacent (in the time sequence) exposures; and c) the members of the pair have different filter paths.  Let the elements of this set be indexed by u.  2) Calculate the difference in the mean (bias subtracted) DN for each pair, , and the difference in the mean normalized register stray light frame for the filters paths of the members of each pair, .  3) Find the value of y that minimizes

.                                                                                                                  (13)

4) Record y, and each band’s mean photosite signal , for the image.  If is the C-ROI-mean of the normalized register stray light frame for a framelet pair member’s filter path, and  is the C-ROI-mean uncorrected DN for that pair member, and t is the exposure time, then

.                                                                                                   (14)

The mean is over all elements of the  set of filter pair members for which the filter number is equal to the k in the  we are calculating.

The register stray light response coefficient z is the factor that relates the mean broadband scene radiance to y:

.                                                                                                                        (15)

Solving for y by minimizing Eq. (13) would of course be sufficient to remove register stray light in a THEMIS-VIS sequence of a uniform scene, but in order to be able to calibrate any arbitrary sequence, we need to know z.  To estimate z we select a sample of 5-band images with low scene variance and determine y and the  as described above.  Let the elements of this sample be indexed by v, so we have a set of and.

The  yield  by applying Eq. (9), and we use the resulting set of  and  with Eq. (15) to give a least squares solution for z.  In finding the , we are free to chose which of the bands k of the , and thus which set of  to use.  Naively, we might expect that using all five bands would give the best estimates and thus the smallest residuals on the z solution, because it provides the most information about the scene radiance spectrum.  However, is an imperfect solution for the register stray light, and so in general the  estimates will be contaminated by some register stray light, reducing the accuracy of the.  This contamination is least significant in the bands with the highest photosite signal, and thus we find that using only the k = 3 (650 nm) band gives the fit for z with the highest R2.  The k =3 solution is our adopted z value, and is reported in Table 2.  Excluding the k = 3, 4 band combination, which gives solutions and R2 identical to that of k = 3, the band combination with the next highest R2 is k = 2, 3.  Since the difference in the z solutions of these two best fits is much higher than their formal errors, we use this difference to form our confidence interval, with the half-width of the confidence interval being set equal to the magnitude of z(k = 1) – z(k =2, 3).

3.8.4.c)     Subtraction of scaled register stray light frames

Register stray light frames for each summing mode are stored in FITS files each with 31 planes corresponding to the 31 filter paths. These frames are stored in order of the F code, i.e., the frame for a given filter path is found at plane number F - 1 for a zero-based cube plane counting system. 

Let  be the bias-subtracted (i.e., calibrated through stage 3) DN for column i, row j, filter f, and exposure a of a THEMIS-VIS imaging sequence with exposure duration t, and let  be the i, j elements of the normalized register stray light frame with the appropriate filter path F.  (F is determined from Eq. (4).)  Then the photosite signal  is

                                                                                                    (16)

The means of determining broadband C-ROI mean radiance is apparent if we take the C-ROI means of S, D, and G, in Eq (16) and then substitute into Eq. (9), eliminating S:

.                                                                                               (17)

 The sums are over whatever subset of filters we chose to use, and the  are those appropriate to that subset.  The exposure number  used to calculate the broadband radiance estimate for exposure number a is not in general equal to a, because the source region for an exposure’s register stray light may not be within its field of view.   Since 50% or more of the register stray light is contributed by the h-register, and since the h-register is at the bottom of the array where it is most likely contaminated by scene radiance near the bottom of an exposure’s field of view, we chose  to select a filter from a different exposure (a later exposure in the sequence) that covers the region just below the field of view of exposure a.  We select that later exposure as follows:

.                                                                                                  (18)

Although in principle we might wish to use as many of the THEMIS-VIS filters as possible when calculating  from Eq. (17), in practice we have found that using choosing a single filter produces better results, in the sense that when the results of single-filter- register stray light removal and multi-filter- register stray light removal are visually inspected and compared, the multi-filter- image is more likely to be the one with more prominent register stray light artifacts.  Therefore, we calculate  using D and G from filter 3 (band 3) whenever it is present in the image.  If filter 3 is not present, we use filter 4, and if not 4, then the next most preferable filter, with the full preference order being 3, 4, 5, 2, 1.  Less preferable filters are those that have higher residuals when we fit for z in Eq. (15) using single-filter-derived values for .

The series of  derived using Eq. (17) for an image will have missing elements on the edges due to the beginning and end of the exposure sequence, and sometimes in the middle due to invalid image data.  Interior gaps are always filled by linear interpolation.  Extrapolation is allowed for only one element past the edge of the valid  elements, and  is treated as constant from this edge point and outwards.

3.8.5        Correction for pixel response variation (“flatfielding”)

The response of framelet pixels to scene radiance is variable, due both to variations in the sensitivity of detector pixels, and to variations in optical throughput.  In the absence of stray light, an image of a uniform scene is a “flatfield,” i.e., a map of these response variations. 

Unfortunately, the variability in THEMIS-VIS signal in uniform-scene images is dominated by stray light.  The crucial distinction between response variations and stray light is that response variations are a multiplicative effect, while stray light is additive, so that regions of the detector that are brighter due to greater response will have proportionally enhanced contrast, while regions that are brighter due to more stray light will have not have enhanced contrast.  This means that if we incorrectly attribute all of the non-uniform signal in a uniform scene image (after removal of register stray light) to photosite stray light, then regions of high response will have spuriously high contrast.  We must therefore remove response variations prior to deriving and removing photosite stray light light.  However, if we incorrectly attribute all of the non-uniform signal in a uniform-scene image to response variations, our calibration process will have the converse effect of creating spuriously decreased contrast in regions of high stray light.  We have therefore adopted a method for generating flatfields that relies on the scene contrast directly by using framelet to framelet signal differences rather than averages as in the usual flatfielding approach.

A flatfield is derived independently for each of the five filters using data calibrated through stage 4 (register stray light subtraction).  Let  and  be the stage 4 signal for, respectively, the early and later members of framelet pair n.  Let  and  be the standard errors for the DN values of the members of the pair.  These standard errors are based on Poisson counting noise statistics, i.e., they are simply the square root of the numbers of electrons detected at each pixel, so:

.                                                (19)

The "raw DN level" refers to the DN level measured prior to bias subtraction, i.e., calibrated through stage 2.  The gain is 25.4 electrons per DN for spatial summing mode 1, 25.4/2 for spatial summing mode 2, and 25.4/4 for spatial summing mode 4.  A framelet pair consists of any two adjacent framelets from the same filter and same THEMIS-VIS data cube.  Let the total number of such framelet pairs in the data set for a given filter be labeled N.  We assume that the photosite stray light signal is slowly varying from framelet to framelet, so that the difference between framelets depends only on the changes in the scene and on counting noise.  Since the magnitude of the differences caused by scene changes (as a fraction of the mean signal) is proportional to responsivity, we estimate the responsivity R by starting with the variance of the framelet-to-framelet differences:

                                                                                      (20a)

and then subtracting the contribution of counting noise to those differences,

.                                                                     (20b)

The responsivity R is the square-root of the counting-noise corrected variances:

.                                                                  (20c)

Unfortunately, the assumption of slowly varying photosite stray light is not always valid, leading to some contamination of our responsivity estimate by stray light effects.  This contamination is most severe where the stray light is most severe, on the right and left edges of all filters, and across the entire filter 1 (band 5, 860 nm).  Given the strong column dependence of the stray light, the weak variation of derived responsivity with column in less contaminated regions, and the tendency of the variation with column to mimic that of the stray light, we are not confident that any of the column variation in derived responsivity is real.  However, the row dependence of responsivity is much stronger, and not correlated with the stray light patterns.  We therefore treat the responsivity as being a function only of detector row, allowing us to derive it by averaging across the central, least contaminated columns.  Figure 16 (dashed lines) shows a family of profiles along columns of Rij, to illustrate the dominance of variation with row.  The strong drop in responsivity below row 15 is due to vignetting by the edge of the filter.

We derived the column-averaged flatfield using summing mode 2 Rij values, because the summing mode 2 data set is much larger than that in the other modes, and so produces a higher quality flatfield.  The resulting profile is normalized so that it has unit mean within the C-ROI bounds.  This normalization ensures that flatfielding does not on average alter .  Thus, the flatfield as a function of row, Rj, is:

                                     (21)

Each column of each framelet is corrected by dividing it by Rj.  Since Rj is originally generated using only summing mode 2 data and is thus a 96 element vector, it