lsst.cp.pipe  19.0.0-2-gdbc0a5a+3
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, dataset, ptcFitType)
 
def plot (self, dataRef, dataset, ptcFitType)
 

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 196 of file ptc.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 226 of file ptc.py.

Member Function Documentation

◆ fitPtcAndNl()

def lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask.fitPtcAndNl (   self,
  dataset,
  ptcFitType 
)
Fit the photon transfer curve and calculate linearity and residuals.

Fit the photon transfer curve with either a polynomial of the order
specified in the task config, or using the Astier approximation.

Sigma clipping is performed iteratively for the fit, as well as an
initial clipping of data points that are more than
config.initialNonLinearityExclusionThreshold away from lying on a
straight line. This other step is necessary because the photon transfer
curve turns over catastrophically at very high flux (because saturation
drops the variance to ~0) and these far outliers cause the initial fit
to fail, meaning the sigma cannot be calculated to perform the
sigma-clipping.

Parameters
----------
dataset : `lsst.cp.pipe.ptc.PhotonTransferCurveDataset`
    The dataset containing the means, variances and exposure times
ptcFitType : `str`
    Fit a 'POLYNOMIAL' (degree: 'polynomialFitDegree') or
    'ASTIERAPPROXIMATION' to the PTC

Definition at line 530 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 487 of file ptc.py.

◆ funcPolynomial()

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

Definition at line 483 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 317 of file ptc.py.

◆ plot()

def lsst.cp.pipe.ptc.MeasurePhotonTransferCurveTask.plot (   self,
  dataRef,
  dataset,
  ptcFitType 
)

Definition at line 665 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 247 of file ptc.py.

Member Data Documentation

◆ ConfigClass

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

Definition at line 223 of file ptc.py.

◆ RunnerClass

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

Definition at line 222 of file ptc.py.


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