lsst.cp.pipe  18.1.0-2-g4903023+12
Public Member Functions | Static Public Attributes | List of all members
lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask Class Reference
Inheritance diagram for lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask:

Public Member Functions

def __init__ (self, args, kwargs)
 
def runDataRef (self, dataRef, visitPairs)
 
def measureMeanVarPair (self, exposure1, exposure2, region=None)
 
def funcPolynomial (self, pars, x)
 
def funcAstier (self, pars, x)
 
def fitPtcAndNl (self, fitVectorsDict, ptcFitType='POLYNOMIAL')
 
def plot (self, dataRef, fitPtcDict, nlDict, ptcFitType='POLYNOMIAL')
 

Static Public Attributes

 RunnerClass = PairedVisitListTaskRunner
 
 ConfigClass = MeasurePhotonTransferCurveTaskConfig
 

Detailed Description

A class to calculate, fit, and plot a PTC from a set of flat pairs.

The Photon Transfer Curve (var(signal) vs mean(signal)) is a standard tool
used in astronomical detectors characterization (e.g., Janesick 2001,
Janesick 2007). This task calculates the PTC from a series of pairs of
flat-field images; each pair taken at identical exposure times. The
difference image of each pair is formed to eliminate fixed pattern noise,
and then the variance of the difference image and the mean of the average image
are used to produce the PTC. An n-degree polynomial or the approximation in Equation
16 of Astier+19 ("The Shape of the Photon Transfer Curve of CCD sensors",
arXiv:1905.08677) can be fitted to the PTC curve. These models include
parameters such as the gain (e/ADU) and readout noise.

Parameters
----------

*args: `list`
    Positional arguments passed to the Task constructor. None used at this
    time.
**kwargs: `dict`
    Keyword arguments passed on to the Task constructor. None used at this
    time.

Definition at line 132 of file ptc.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask.__init__ (   self,
  args,
  kwargs 
)

Definition at line 162 of file ptc.py.

Member Function Documentation

◆ fitPtcAndNl()

def lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask.fitPtcAndNl (   self,
  fitVectorsDict,
  ptcFitType = 'POLYNOMIAL' 
)
Function to fit PTC, and calculate linearity and linearity residual

Parameters
----------
fitVectorsDicti : `dict`
    Dictionary with exposure time, mean, and variance vectors in a tuple
ptcFitType : `str`
    Fit a 'POLYNOMIAL' (degree: 'polynomialFitDegree') or '
    ASTIERAPPROXIMATION' to the PTC

Returns
-------
fitPtcDict : `dict`
    Dictionary of the form fitPtcDict[amp] =
    (meanVec, varVec, parsFit, parsFitErr, index)
nlDict : `dict`
    Dictionary of the form nlDict[amp] =
    (timeVec, meanVec, linResidual, parsFit, parsFitErr)

Definition at line 421 of file ptc.py.

◆ funcAstier()

def lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask.funcAstier (   self,
  pars,
  x 
)
Single brighter-fatter parameter model for PTC; Equation 16 of Astier+19

Definition at line 416 of file ptc.py.

◆ funcPolynomial()

def lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask.funcPolynomial (   self,
  pars,
  x 
)
Polynomial function definition

Definition at line 412 of file ptc.py.

◆ measureMeanVarPair()

def lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask.measureMeanVarPair (   self,
  exposure1,
  exposure2,
  region = None 
)
Calculate the mean signal of two exposures and the variance of their difference.

Parameters
----------
exposure1 : `lsst.afw.image.exposure.exposure.ExposureF`
    First exposure of flat field pair.

exposure2 : `lsst.afw.image.exposure.exposure.ExposureF`
    Second exposure of flat field pair.

region : `lsst.geom.Box2I`
    Region of each exposure where to perform the calculations (e.g, an amplifier).

Return
------

mu : `np.float`
    0.5*(mu1 + mu2), where mu1, and mu2 are the clipped means of the regions in
    both exposures.

varDiff : `np.float`
    Half of the clipped variance of the difference of the regions inthe two input
    exposures.

Definition at line 246 of file ptc.py.

◆ plot()

def lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask.plot (   self,
  dataRef,
  fitPtcDict,
  nlDict,
  ptcFitType = 'POLYNOMIAL' 
)

Definition at line 532 of file ptc.py.

◆ runDataRef()

def lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask.runDataRef (   self,
  dataRef,
  visitPairs 
)
Run the Photon Transfer Curve (PTC) measurement task.

For a dataRef (which is each detector here),
and given a list of visit pairs at different exposure times,
measure the PTC.

Parameters
----------
dataRef : list of lsst.daf.persistence.ButlerDataRef
    dataRef for the detector for the visits to be fit.
visitPairs : `iterable` of `tuple` of `int`
    Pairs of visit numbers to be processed together

Definition at line 183 of file ptc.py.

Member Data Documentation

◆ ConfigClass

lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask.ConfigClass = MeasurePhotonTransferCurveTaskConfig
static

Definition at line 159 of file ptc.py.

◆ RunnerClass

lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask.RunnerClass = PairedVisitListTaskRunner
static

Definition at line 158 of file ptc.py.


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