lsst.ip.diffim  13.0-26-g703d095+11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Classes | Functions
lsst.ip.diffim.diffimTools Namespace Reference

Classes

class  NbasisEvaluator
 

Functions

def makeFlatNoiseImage
 Add noise. More...
 
def makePoissonNoiseImage
 
def fakeCoeffs
 Make fake images for testing; one is a delta function (or narrow gaussian) and the other is a convolution of this with a spatially varying kernel. More...
 
def makeFakeKernelSet
 
def backgroundSubtract
 Background subtraction for ip_diffim. More...
 
def writeKernelCellSet
 More coarse debugging. More...
 
def sourceToFootprintList
 Converting types. More...
 
def sourceTableToCandidateList
 

Function Documentation

def lsst.ip.diffim.diffimTools.backgroundSubtract (   config,
  maskedImages 
)

Background subtraction for ip_diffim.

Definition at line 229 of file diffimTools.py.

def lsst.ip.diffim.diffimTools.fakeCoeffs ( )

Make fake images for testing; one is a delta function (or narrow gaussian) and the other is a convolution of this with a spatially varying kernel.

Definition at line 88 of file diffimTools.py.

def lsst.ip.diffim.diffimTools.makeFakeKernelSet (   sizeCell = 128,
  nCell = 3,
  deltaFunctionCounts = 1.e4,
  tGaussianWidth = 1.0,
  addNoise = True,
  bgValue = 100.,
  display = False 
)

Definition at line 100 of file diffimTools.py.

def lsst.ip.diffim.diffimTools.makeFlatNoiseImage (   mi,
  seedStat = afwMath.MAX 
)

Add noise.

Definition at line 52 of file diffimTools.py.

def lsst.ip.diffim.diffimTools.makePoissonNoiseImage (   im)
Return a Poisson noise image based on im

Uses numpy.random; you may wish to call numpy.random.seed first.

@warning This uses an undocumented numpy API (the documented API
uses a single float expectation value instead of an array).

@param[in] im image; the output image has the same dimensions and shape
    and its expectation value is the value of im at each pixel

Definition at line 61 of file diffimTools.py.

def lsst.ip.diffim.diffimTools.sourceTableToCandidateList (   sourceTable,
  templateExposure,
  scienceExposure,
  kConfig,
  dConfig,
  log,
  basisList,
  doBuild = False 
)
Takes an input list of Sources, and turns them into
KernelCandidates for fitting of the Psf-matching kernel.

Definition at line 365 of file diffimTools.py.

def lsst.ip.diffim.diffimTools.sourceToFootprintList (   candidateInList,
  templateExposure,
  scienceExposure,
  kernelSize,
  config,
  log 
)

Converting types.

Takes an input list of Sources that were selected to constrain
the Psf-matching Kernel and turns them into a List of Footprints,
which are used to seed a set of KernelCandidates.  The function
checks both the template and science image for masked pixels,
rejecting the Source if certain Mask bits (defined in config) are
set within the Footprint.

@param candidateInList: Input list of Sources
@param templateExposure: Template image, to be checked for Mask bits in Source Footprint
@param scienceExposure: Science image, to be checked for Mask bits in Source Footprint
@param config: Config that defines the Mask planes that indicate an invalid Source and Bbox grow radius
@param log: Log for output

@return a list of dicts having a "source" and "footprint" field, to be used for Psf-matching

Definition at line 285 of file diffimTools.py.

def lsst.ip.diffim.diffimTools.writeKernelCellSet (   kernelCellSet,
  psfMatchingKernel,
  backgroundModel,
  outdir 
)

More coarse debugging.

Definition at line 257 of file diffimTools.py.