LinearizeLookupTable

class lsst.ip.isr.LinearizeLookupTable

Bases: lsst.ip.isr.LinearizeBase

Correct non-linearity with a persisted lookup table.

The lookup table consists of entries such that given “coefficients” c0, c1:

for each i,j of image:
rowInd = int(c0) colInd = int(c1 + uncorrImage[i,j]) corrImage[i,j] = uncorrImage[i,j] + table[rowInd, colInd]
  • c0: row index; used to identify which row of the table to use
    (typically one per amplifier, though one can have multiple amplifiers use the same table)
  • c1: column index offset; added to the uncorrected image value
    before truncation; this supports tables that can handle negative image values; also, if the c1 ends with .5 then the nearest index is used instead of truncating to the next smaller index

Attributes Summary

LinearityType

Methods Summary

__call__(image, **kwargs) Correct for non-linearity.

Attributes Documentation

LinearityType = 'LookupTable'

Methods Documentation

__call__(image, **kwargs)

Correct for non-linearity.

Parameters:
image : lsst.afw.image.Image

Image to be corrected

kwargs : dict

Dictionary of parameter keywords:

coeffs

Columnation vector (list or numpy.array).

table

Lookup table data (numpy.array).

log

Logger to handle messages (logging.Logger).

Returns:
output : tuple [bool, int]

If true, a correction was applied successfully. The integer indicates the number of pixels that were uncorrectable by being out of range.

Raises:
RuntimeError:

Raised if the requested row index is out of the table bounds.