lsst.ip.isr g7aa544c432+58f4610262
Public Member Functions | Static Public Attributes | List of all members
lsst.ip.isr.linearize.LinearizeLookupTable Class Reference
Inheritance diagram for lsst.ip.isr.linearize.LinearizeLookupTable:
lsst.ip.isr.linearize.LinearizeBase

Public Member Functions

def __call__ (self, image, **kwargs)
 

Static Public Attributes

string LinearityType = "LookupTable"
 

Detailed Description

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

Definition at line 537 of file linearize.py.

Member Function Documentation

◆ __call__()

def lsst.ip.isr.linearize.LinearizeLookupTable.__call__ (   self,
  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.

Reimplemented from lsst.ip.isr.linearize.LinearizeBase.

Definition at line 559 of file linearize.py.

Member Data Documentation

◆ LinearityType

string lsst.ip.isr.linearize.LinearizeLookupTable.LinearityType = "LookupTable"
static

Definition at line 557 of file linearize.py.


The documentation for this class was generated from the following file: