lsst.cp.pipe  20.0.0-17-ga9337b4+cbc55e0393
Public Member Functions | Static Public Attributes | List of all members
lsst.cp.pipe.linearity.LinearitySolveTask Class Reference
Inheritance diagram for lsst.cp.pipe.linearity.LinearitySolveTask:

Public Member Functions

def runQuantum (self, butlerQC, inputRefs, outputRefs)
 
def run (self, inputPtc, camera=None, inputDims=None)
 
def debugFit (self, stepname, timeVector, meanVector, linearizer, ampName)
 

Static Public Attributes

 ConfigClass = LinearitySolveConfig
 

Detailed Description

Fit the linearity from the PTC dataset.

Definition at line 89 of file linearity.py.

Member Function Documentation

◆ debugFit()

def lsst.cp.pipe.linearity.LinearitySolveTask.debugFit (   self,
  stepname,
  timeVector,
  meanVector,
  linearizer,
  ampName 
)
Debug method for linearity fitting.

Parameters
----------
stepname : `str`
    A label to use to check if we care to debug at a given
    line of code.
timeVector : `numpy.array`
    The values to use as the independent variable in the
    linearity fit.
meanVector : `numpy.array`
    The values to use as the dependent variable in the
    linearity fit.
linearizer : `lsst.ip.isr.Linearizer`
    The linearity correction to compare.
ampName : `str`
    Amplifier name to lookup linearity correction values.

Definition at line 223 of file linearity.py.

◆ run()

def lsst.cp.pipe.linearity.LinearitySolveTask.run (   self,
  inputPtc,
  camera = None,
  inputDims = None 
)
Fit non-linearity to PTC data, returning the correct Linearizer
object.

Parameters
----------
inputPtc : `lsst.cp.pipe.PtcDataset`
    Pre-measured PTC dataset.
camera : `lsst.afw.cameraGeom.Camera`, optional
    Camera geometry.
inputDims : `lsst.daf.butler.DataCoordinate` or `dict`, optional
    DataIds to use to populate the output calibration.

Returns
-------
results : `lsst.pipe.base.Struct`
    The results struct containing:

    ``outputLinearizer`` : `lsst.ip.isr.Linearizer`
Final linearizer calibration.
    ``outputProvenance`` : `lsst.ip.isr.IsrProvenance`
Provenance data for the new calibration.

Notes
-----
This task currently fits only polynomial-defined corrections,
where the correction coefficients are defined such that:
    corrImage = uncorrImage + sum_i c_i uncorrImage^(2 + i)
These `c_i` are defined in terms of the direct polynomial fit:
    meanVector ~ P(x=timeVector) = sum_j k_j x^j
such that c_(j-2) = -k_j/(k_1^j) in units of DN^(1-j) (c.f.,
Eq. 37 of 2003.05978). The `config.polynomialOrder` defines
the maximum order of x^j to fit.  As k_0 and k_1 are
degenerate with bias level and gain, they are not included in
the non-linearity correction.

Definition at line 115 of file linearity.py.

◆ runQuantum()

def lsst.cp.pipe.linearity.LinearitySolveTask.runQuantum (   self,
  butlerQC,
  inputRefs,
  outputRefs 
)
Ensure that the input and output dimensions are passed along.

Parameters
----------
butlerQC : `lsst.daf.butler.butlerQuantumContext.ButlerQuantumContext`
    Butler to operate on.
inputRefs : `lsst.pipe.base.connections.InputQuantizedConnection`
    Input data refs to load.
ouptutRefs : `lsst.pipe.base.connections.OutputQuantizedConnection`
    Output data refs to persist.

Definition at line 95 of file linearity.py.

Member Data Documentation

◆ ConfigClass

lsst.cp.pipe.linearity.LinearitySolveTask.ConfigClass = LinearitySolveConfig
static

Definition at line 92 of file linearity.py.


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