lsst.cp.pipe  19.0.0-18-gfc4e62b+8
Classes | Functions
lsst.cp.pipe.makeBrighterFatterKernel Namespace Reference

Classes

class  BrighterFatterGain
 
class  BrighterFatterKernel
 
class  BrighterFatterKernelTaskDataIdContainer
 
class  MakeBrighterFatterKernelTask
 
class  MakeBrighterFatterKernelTaskConfig
 

Functions

def calcBiasCorr (fluxLevels, imageShape, repeats=1, seed=0, addCorrelations=False, correlationStrength=0.1, maxLag=10, nSigmaClip=5, border=10, logger=None)
 

Function Documentation

◆ calcBiasCorr()

def lsst.cp.pipe.makeBrighterFatterKernel.calcBiasCorr (   fluxLevels,
  imageShape,
  repeats = 1,
  seed = 0,
  addCorrelations = False,
  correlationStrength = 0.1,
  maxLag = 10,
  nSigmaClip = 5,
  border = 10,
  logger = None 
)
Calculate the bias induced when sigma-clipping non-Gaussian distributions.

Fill image-pairs of the specified size with Poisson-distributed values,
adding correlations as necessary. Then calculate the cross correlation,
and calculate the bias induced using the cross-correlation image
and the image means.

Parameters:
-----------
fluxLevels : `list` of `int`
    The mean flux levels at which to simulate.
    Nominal values might be something like [70000, 90000, 110000]
imageShape : `tuple` of `int`
    The shape of the image array to simulate, nx by ny pixels.
repeats : `int`, optional
    Number of repeats to perform so that results
    can be averaged to improve SNR.
seed : `int`, optional
    The random seed to use for the Poisson points.
addCorrelations : `bool`, optional
    Whether to add brighter-fatter-like correlations to the simulated images
    If true, a correlation between x_{i,j} and x_{i+1,j+1} is introduced
    by adding a*x_{i,j} to x_{i+1,j+1}
correlationStrength : `float`, optional
    The strength of the correlations.
    This is the value of the coefficient `a` in the above definition.
maxLag : `int`, optional
    The maximum lag to work to in pixels
nSigmaClip : `float`, optional
    Number of sigma to clip to when calculating the sigma-clipped mean.
border : `int`, optional
    Number of border pixels to mask
logger : `lsst.log.Log`, optional
    Logger to use. Instantiated anew if not provided.

Returns:
--------
biases : `dict` [`float`, `list` of `float`]
    A dictionary, keyed by flux level, containing a list of the biases
    for each repeat at that flux level
means : `dict` [`float`, `list` of `float`]
    A dictionary, keyed by flux level, containing a list of the average
    mean fluxes (average of the mean of the two images)
    for the image pairs at that flux level
xcorrs : `dict` [`float`, `list` of `np.ndarray`]
    A dictionary, keyed by flux level, containing a list of the xcorr
    images for the image pairs at that flux level

Definition at line 1609 of file makeBrighterFatterKernel.py.