lsst.cp.pipe  20.0.0-13-geadc0ac+2112427e73
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask Class Reference
Inheritance diagram for lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask:

Public Member Functions

def __init__ (self, *args, **kwargs)
 
def runDataRef (self, dataRef)
 
def run (self, filenameFull, datasetPtc, linearizer=None, log=None)
 
def covAstierMakeAllPlots (self, covFits, covFitsNoB, pdfPages, log=None)
 
def plotNormalizedCovariances (self, covFits, covFitsNoB, i, j, pdfPages, offset=0.004, numberOfBins=10, plotData=True, topPlot=False, log=None)
 

Static Public Member Functions

def plotCovariances (covFits, pdfPages)
 
def plot_a_b (covFits, pdfPages, bRange=3)
 
def ab_vs_dist (covFits, pdfPages, bRange=4)
 
def plotAcoeffsSum (covFits, pdfPages)
 
def plotRelativeBiasACoeffs (covFits, covFitsNoB, signalElectrons, pdfPages, maxr=None)
 
def findGroups (x, maxDiff)
 
def indexForBins (x, nBins)
 
def binData (x, y, binIndex, wy=None)
 

Static Public Attributes

 ConfigClass = PlotPhotonTransferCurveTaskConfig
 

Detailed Description

A class to plot the dataset from MeasurePhotonTransferCurveTask.

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 75 of file plotPtc.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.__init__ (   self,
args,
**  kwargs 
)

Definition at line 93 of file plotPtc.py.

Member Function Documentation

◆ ab_vs_dist()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.ab_vs_dist (   covFits,
  pdfPages,
  bRange = 4 
)
static
Fig. 13 of Astier+19.

Values of a and b arrays fits, averaged over amplifiers, as a function of distance.

Parameters
----------
covFits: `dict`
    Dictionary of CovFit objects, with amp names as keys.

pdfPages: `matplotlib.backends.backend_pdf.PdfPages`
    PDF file where the plots will be saved.

bRange : `int`
    Maximum lag for b arrays.

Definition at line 562 of file plotPtc.py.

◆ binData()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.binData (   x,
  y,
  binIndex,
  wy = None 
)
static
Bin data (usually for display purposes).

Patrameters
-----------
x: `numpy.array`
    Data to bin.

y: `numpy.array`
    Data to bin.

binIdex: `list`
    Bin number of each datum.

wy: `numpy.array`
    Inverse rms of each datum to use when averaging (the actual weight is wy**2).

Returns:
-------

xbin: `numpy.array`
    Binned data in x.

ybin: `numpy.array`
    Binned data in y.

wybin: `numpy.array`
    Binned weights in y, computed from wy's in each bin.

sybin: `numpy.array`
    Uncertainty on the bin average, considering actual scatter, and ignoring weights.

Definition at line 1021 of file plotPtc.py.

◆ covAstierMakeAllPlots()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.covAstierMakeAllPlots (   self,
  covFits,
  covFitsNoB,
  pdfPages,
  log = None 
)
Make plots for MeasurePhotonTransferCurve task when doCovariancesAstier=True.

This function call other functions that mostly reproduce the plots in Astier+19.
Most of the code is ported from Pierre Astier's repository https://github.com/PierreAstier/bfptc

Parameters
----------
covFits: `dict`
    Dictionary of CovFit objects, with amp names as keys.

covFitsNoB: `dict`
   Dictionary of CovFit objects, with amp names as keys (b=0 in Eq. 20 of Astier+19).

pdfPages: `matplotlib.backends.backend_pdf.PdfPages`
    PDF file where the plots will be saved.

log : `lsst.log.Log`, optional
    Logger to handle messages

Definition at line 156 of file plotPtc.py.

◆ findGroups()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.findGroups (   x,
  maxDiff 
)
static
Group data into bins, with at most maxDiff distance between bins.

Parameters
----------
x: `list`
    Data to bin.

maxDiff: `int`
    Maximum distance between bins.

Returns
-------
index: `list`
    Bin indices.

Definition at line 963 of file plotPtc.py.

◆ indexForBins()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.indexForBins (   x,
  nBins 
)
static
Builds an index with regular binning. The result can be fed into binData.

Parameters
----------
x: `numpy.array`
    Data to bin.
nBins: `int`
    Number of bin.

Returns
-------
np.digitize(x, bins): `numpy.array`
    Bin indices.

Definition at line 1001 of file plotPtc.py.

◆ plot_a_b()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.plot_a_b (   covFits,
  pdfPages,
  bRange = 3 
)
static
Fig. 12 of Astier+19

Color display of a and b arrays fits, averaged over channels.

Parameters
----------
covFits: `dict`
    Dictionary of CovFit objects, with amp names as keys.

pdfPages: `matplotlib.backends.backend_pdf.PdfPages`
    PDF file where the plots will be saved.

bRange : `int`
    Maximum lag for b arrays.

Definition at line 516 of file plotPtc.py.

◆ plotAcoeffsSum()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.plotAcoeffsSum (   covFits,
  pdfPages 
)
static
Fig. 14. of Astier+19

Cumulative sum of a_ij as a function of maximum separation. This plot displays the average over
channels.

Parameters
----------
covFits: `dict`
    Dictionary of CovFit objects, with amp names as keys.

pdfPages: `matplotlib.backends.backend_pdf.PdfPages`
    PDF file where the plots will be saved.

Definition at line 629 of file plotPtc.py.

◆ plotCovariances()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.plotCovariances (   covFits,
  pdfPages 
)
static
Plot covariances and models: Cov00, Cov10, Cov01.

Figs. 6 and 7 of Astier+19

Parameters
----------
covFits: `dict`
    Dictionary of CovFit objects, with amp names as keys.

pdfPages: `matplotlib.backends.backend_pdf.PdfPages`
    PDF file where the plots will be saved.

Definition at line 196 of file plotPtc.py.

◆ plotNormalizedCovariances()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.plotNormalizedCovariances (   self,
  covFits,
  covFitsNoB,
  i,
  j,
  pdfPages,
  offset = 0.004,
  numberOfBins = 10,
  plotData = True,
  topPlot = False,
  log = None 
)
Plot C_ij/mu vs mu.

Figs. 8, 10, and 11 of Astier+19

Parameters
----------
covFits: `dict`
    Dictionary of CovFit objects, with amp names as keys.

covFitsNoB: `dict`
   Dictionary of CovFit objects, with amp names as keys (b=0 in Eq. 20 of Astier+19).

i : `int`
    Covariane lag

j : `int
    Covariance lag

pdfPages: `matplotlib.backends.backend_pdf.PdfPages`
    PDF file where the plots will be saved.

offset : `float`, optional
    Constant offset factor to plot covariances in same panel (so they don't overlap).

numberOfBins : `int`, optional
    Number of bins for top and bottom plot.

plotData : `bool`, optional
    Plot the data points?

topPlot : `bool`, optional
    Plot the top plot with the covariances, and the bottom plot with the model residuals?

log : `lsst.log.Log`, optional
    Logger to handle messages.

Definition at line 379 of file plotPtc.py.

◆ plotRelativeBiasACoeffs()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.plotRelativeBiasACoeffs (   covFits,
  covFitsNoB,
  signalElectrons,
  pdfPages,
  maxr = None 
)
static
Fig. 15 in Astier+19.

Illustrates systematic bias from estimating 'a'
coefficients from the slope of correlations as opposed to the
full model in Astier+19.

Parameters
----------
covFits : `dict`
    Dictionary of CovFit objects, with amp names as keys.

covFitsNoB : `dict`
   Dictionary of CovFit objects, with amp names as keys (b=0 in Eq. 20 of Astier+19).

signalElectrons : `float`
    Signal at which to evaluate the a_ij coefficients.

pdfPages: `matplotlib.backends.backend_pdf.PdfPages`
    PDF file where the plots will be saved.

maxr : `int`, optional
    Maximum lag.

Definition at line 671 of file plotPtc.py.

◆ run()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.run (   self,
  filenameFull,
  datasetPtc,
  linearizer = None,
  log = None 
)
Make the plots for the PTC task

Definition at line 139 of file plotPtc.py.

◆ runDataRef()

def lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.runDataRef (   self,
  dataRef 
)
Run the Photon Transfer Curve (PTC) plotting measurement task.

Parameters
----------
dataRef : list of lsst.daf.persistence.ButlerDataRef
    dataRef for the detector for the visits to be fit.

Definition at line 109 of file plotPtc.py.

Member Data Documentation

◆ ConfigClass

lsst.cp.pipe.plotPtc.PlotPhotonTransferCurveTask.ConfigClass = PlotPhotonTransferCurveTaskConfig
static

Definition at line 90 of file plotPtc.py.


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