Skip to main content

Pipeline code for the Lunar-VISE, Visible Infrared Camera (VIC) system ground calibration.

Project description

LV-VIC Radiometric Calibration Analysis Procedure

The goal of this document is to organize the analysis that must be performed on the calibration data taken at BAE systems for the LV-VIC instrument. Sections are meant to be organized into distinct tasks which can then be turned into individual MATLAB scripts which can finally be packaged into a distributable MATLAB toolbox for use by the greater planetary science community.

1. Executive Summary

Table 2: Preliminary list of MATLAB scripts to make for the radiometric calibration of the Lunar-VISE VIC. More utility scripts or subscripts may be required to make the entire framework run, but this should cover the main steps of calibration.
Script Name Description Input Output
calculate_bias Calculates pixel-by-pixel bias component to the signal Series of zero exposures images, repeated at different temperatures Function that removes bias signal from each pixel
calculate_dark_current Calculates pixel-by-pixel dark current component to the signal Series of varying exposure time images, repeated at different temperatures Function that removes offset signal for each pixel
pixel_lineararity Fits a linear model to each pixel in the scene to determine linearity Series of varying exposure time images Linear fit for each pixel in the scene
subarea_linearity Fits a linear model to the average response of several subscenes Series of varying exposure time images Several linear fits for several subscenes of the entire scene
get_photon_transfer Creates a photon transfer curve to determine the pixel-by-pixel gain and read noise Groups of consecutive flat-field images taken at varying signal strengths (i.e. different exposure times or integrating sphere settings) Gain and read noise pixel-by-pixel maps
correct_coherent_noise Corrects for known sources of coherent noise across the scene Calibrated image with sources of coherent noise Corrected image with coherent noise removed
correct_flat_field Corrects for flat-field effects across the scene Series of flat field images, bias and offset corrected. Function that corrects a target image for flat-field effects
get_sensitivity Obtains the sensitivity of the instrument that is needed to convert DN to radiance Series of bias and offset corrected flat-field images at varying radiances (i.e. integrating sphere settings) Sensitivity term that converts DN to radiance


Figure 1: Preliminary Radiometric Calibration Flowchart for Lunar-VISE. Each step corresponds to MATLAB scripts listed in Table 1. Each step also loosely corresponds with a source of error to be taken into account in the final radiance calculation.

2. Dark-Field Analysis

2.1 Bias Determination

Bias fundamentally depends on instrument temperature and is different for each pixel in a CMOS detector, so bias maps must be made over the full range of expected operating temperatures. It is also important to average bias frames to get a good idea of both the actual bias level and the uncertainty on bias removal. Bias frames are defined as dark-field frames (i.e. no physical exposure to light using e.g. a shutter) that are taken with the shortest possible exposure time. The MATLAB script should be able to read in a series of bias field images, find their mean and standard deviation and repeat this for many different temperatures. The temperature dependence should then be modeled for each pixel and interpolated to determine the bias for any instrument temperature. Finally, the code should be able to put this information in a form that can later be subtracted from other calibration steps.

Inputs:

  • 4D Array of bias field images (NxMxKxT) where N and M are spatial dimensions, K is the dimension for repeated bias images with zero exposure and T is for varying temperatures.

Outputs:

  • Modeled bias vs. temperature relationship at each pixel
  • A dataframe that can be called via a function to subtract the bias value at a given temperature, interpolated from the measured temperatures.

2.2 Dark Current Measurement

Dark current is also heavily dependent on temperature but will scale with exposure time. For a CMOS sensor, the dark current function will also vary across the detector (e.g. due to amp glow, hot pixels, etc…). By taking a series of exposure lengths over a dark field, the dark current can be discriminated from the bias values. It is currently unclear whether the dark current is pre-characterized for our instrument and whether a model exists to fit the measured dark current, but, assuming a roughly linear relationship to exposure time, the dark current can be obtained simply through measurement over the entire range of expected operating temperatures. The script should be able to take in a series of dark field images with varying exposure times, subtract the bias level for each, and fit a curve/line to find the dark current function. This should then be repeated across the entire temperature range. The output should be a 2-variable model where, given a temperature and an exposure time, the dark current level is given for each pixel on the image.

Inputs:

  • 4D array of dark-field images (NxMxJxT) where N and M are spatial dimensions, J is the series of varying exposure lengths and T is for varying temperatures.

Outputs:

  • A look-up table style function that gives the dark current level at every pixel for a given temperature and exposure time.

3. Linearity Analysis

Figure 2: Preliminary Radiometric Calibration Flowchart for Lunar-VISE. Each step corresponds to MATLAB scripts listed in Table 1. Each step also loosely corresponds with a source of error to be taken into account in the final radiance calculation.

3.1 Average Area Linearity

We should perform an L2 Norm minimization (i.e. least squares regression) for the average instrument response over a broad area of pixels. This is done in Klaasen et al., 2008 and the results are shown in Fig. 2. The MATLAB script should be able to take in several images (i.e. a 3D array) that correspond to different exposures times, compile an exposure time vs. average instrument response dataset for a broad area of pixels, perform an L2 Norm minimization to find the slope and intercept for this data and finally return the residuals for this linear fit. This should then be repeatable for each analyzed wavelength (4D array?). The final possible addition to this script could be the quantification of linearity by some linearity metric (TBD).

Inputs:

  • 3D Array of images, where the 3rd dimension is exposure time. (Possible 4D array to account for wavelengths)
  • Area to analyze for linearity.

Outputs:

  • Linearity plot (as in Fig. 1)
  • Average signal response vs. linear fit residuals (i.e. % Error)
  • Linearity metric (?)

3.2 Pixel-by-Pixel and Band-by-Band Linearity

In addition to an average area, it would likely be good to understand how the linearity of an image changes across both the spatial and spectral dimensions. This is where a relative linearity metric (such as average residual, total residual, R2 etc…) would benefit us. A script could take in the same 3D Array mentioned in 3.1, perform an L2 norm minimization pixel-by-pixel, get the pixel-by-pixel residual and finally create an image of the pixel-by-pixel linearity metric. This could then be repeated for each band and one could assess the band-by-band linearity either averaged across the entire image or on a pixel-by-pixel basis.

Inputs:

  • 3D (or 4D) array where 3rd dimension is exposure time (4th is spectral band)

Outputs:

  • Pixel-by-pixel map of linearity metric
  • Band-by-Band array of linearity metric

4. Noise Analysis

Figure 3: Photon transfer analysis from Klaasen et al., 2008. This method is used to determine the read noise and gain for each pixel in the detector.

4.1 Photon Transfer Analysis

In short, photon transfer analysis uses the relationship between random noise and signal strength (i.e. noise will generally increase with increasing signal) to estimate the gain of each pixel in the detector. The result will be a pixel-by-pixel map of the instrument gain as well as a better understanding of the read noise, which is the noise that occurs when the detector converts the collected electrons to voltages. Read noise is generally independent of signal, and the overall relationship between it and the overall random noise is given by:

$$ \eta=\sqrt{\frac{Σ^2}{g}+ρ^2} $$

where η is the overall random noise in the signal, Σ is the shot noise due to the quantized nature of photons and counting statistics, ρ is the read noise and g is the gain (i.e. electrons/DN). Since Σ= √N where N is the number of incoming photons, Σ^2 is simply just the measured signal, which is converted to DN by dividing by the gain. The random noise can simply be determined by taking N consecutive exposures of equal length, correcting for bias and dark current and taking the standard deviation/√N for each pixel in the image. This can then be repeated for a few different signal strengths (either different radiances or different exposure times) to create the plot shown in Fig. 3. The data can then be fit using the above equation by performing an L2 Norm minimization for g and ρ. The result will be a pixel-by-pixel map of the gain and read noise. The script should be able to produce these maps by taking in a series of groups of consecutive exposures taken at different temperatures.

Inputs:

  • 4D array of flat-field images (NxMxLxS) where N and M are spatial dimensions, L is a series of consecutive images at the same signal strength and S is for variations in signal strength.

Outputs:

  • 2D map of pixel gain values
  • 2D map of pixel read noise values

4.2 Coherent Noise and Other Noise Sources

This analysis will be mostly exploratory and will depend on the instrument electronics. Given that the CMOS detector is enabled with super-pixel electronics (i.e. every group of four pixels in a square is electronically connected, which typically helps detect color, but in our case is not used), there might be coherent noise across each of these groups or noise related to cross-talk between associated pixels in different groups (e.g. all the top right pixels in every super group exhibit an extra bias term). Other sources might include spatially coherent noise sources such as vertical or horizontal striping. The I/O of this script will likely depend on the results of our exploratory analysis, but will in general be able to take in a calibrated image and remove all known sources of coherent instrumental noise. This step will also include flagging bad pixels.

Inputs:

  • A radiometrically calibrated image with sources of coherent instrumental noise and bad pixels.

Outputs:

  • A corrected image with sources of coherent instrumental noise and bad pixels removed.

5. Sensitivity Analysis/Radiometric Calibration

5.1 Flat-Field Correction

To correct for camera transmission variations across a scene, a flat field must be divided out. A flat field is defined as a source of constant radiance across the entire scene. To confidently use a flat field image, it must be the average of several (10-20) captured images. The script should be able to take in these images, find the mean and standard deviation, pick out any pixels that exceed a certain threshold deviation, correct the image for bias and dark current, normalize the mean image to 1 by dividing each good pixel by the mean of the whole image and, finally, divide each captured image by the flat field. The result will hopefully be an image with a much more uniform response across the scene as well as a lower amount of pixel-to-pixel variation.

Inputs:

  • A series of flat-field images (10-20)
  • Bias and Dark Current correction images

Outputs:

  • Normalized flat-field image
  • Function for the correction of future target images

5.2 Filter Sensitivity Determination

In general, the response of a radiometer can be converted to radiance over a bandpass, $f$, using:

$$ N_f = \frac{DN - DN_0(t)}{tg\Omega a \int S_\lambda T_\lambda F_\lambda P_\lambda d\lambda}$$

Where $DN$ is the digital number, $DN_0$ is the dark current and bias signal, $t$ is the exposure time, $g$ is the gain (i.e. e-/DN), $S_\lambda$ is the detector quantum efficiency (i.e. # of e- produced per photon), $T_\lambda$ is the transmission of the optics, $F_\lambda$ is the transmission of the filter and $P_\lambda = \frac{\lambda}{1.98648 \times 10^{-19}}$, which is the inverse of photon energy. The goal of sensitivity determination is to measure the $\frac{1}{\int S_\lambda T_\lambda F_\lambda d\lambda}$, which is instrument dependent and can be thought of as the instrument sensitivity. The script should be able to take in a series of flat field images of different radiances and determine what single sensitivity causes the instrument to best fit each measured radiance. From there, filter transmission, optics transmission and quantum efficiency can be derived.

Inputs:

  • A series of flat-field images at different radiances.
  • Bias, offset and flat field correction frames.

Outputs:

  • Instrument sensitivity value.
  • Function for correcting a target image.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vicradcal-0.0.1.tar.gz (12.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vicradcal-0.0.1-py3-none-any.whl (12.0 MB view details)

Uploaded Python 3

File details

Details for the file vicradcal-0.0.1.tar.gz.

File metadata

  • Download URL: vicradcal-0.0.1.tar.gz
  • Upload date:
  • Size: 12.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for vicradcal-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fe12f595dcdeb7ef677d2ad5666af9502edfd5f897d9d78542a9aaf86e6a5806
MD5 3691d693d2b5acd0fe340769eeb5a67a
BLAKE2b-256 85b51c7a6e5f9d0d61a1ed832ba13f3a853bcb27f8865bc56d2f12f54d8b6d01

See more details on using hashes here.

File details

Details for the file vicradcal-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: vicradcal-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.6

File hashes

Hashes for vicradcal-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d4ae44080b6f973000c5dd5302a43aeee6446e9bf208d9d4c1b292adad3febc9
MD5 2486f9c59cf1852bdef399c5c84e3f85
BLAKE2b-256 17a7abf63f6b4780f6a8e1323d24207a947cb2b50ba5e55d6170337f65fe5716

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page