lsst.meas.algorithms gf82c78fb6f+5b4928dc2e
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Attributes | List of all members
lsst.meas.algorithms.noise_covariance.ComputeNoiseCorrelationTask Class Reference
Inheritance diagram for lsst.meas.algorithms.noise_covariance.ComputeNoiseCorrelationTask:

Public Member Functions

def __init__ (self, *args, **kwargs)
 
def subtractedBackground (self, lsst.afw.image.MaskedImage maskedImage)
 
CorrelationMatrix run (self, lsst.afw.image.MaskedImage maskedImage, lsst.afw.image.MaskedImage|None refMaskedImage=None)
 

Static Public Attributes

ComputeNoiseCorrelationConfig ConfigClass = ComputeNoiseCorrelationConfig
 

Protected Member Functions

CorrelationMatrix _pixelBased (self, lsst.afw.image.MaskedImage maskedImage, lsst.afw.image.MaskedImage refMaskedImage)
 

Static Protected Attributes

str _DefaultName = "computeNoiseCorrelation"
 

Detailed Description

Compute the noise correlation coefficients in a MaskedImage

The variance plane in a convolved or warped image (or a coadd derived
from warped images) does not accurately reflect the noise properties of
the image because variance has been lost to covariance. This Task computes
a matrix of correlation coefficients of a desired size. It assumes that the
noise is (at least the correlation coefficients are) stationary and uses
spatial averaging to compute the correlation coefficients.

Definition at line 102 of file noise_covariance.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.meas.algorithms.noise_covariance.ComputeNoiseCorrelationTask.__init__ (   self,
args,
**  kwargs 
)

Definition at line 116 of file noise_covariance.py.

Member Function Documentation

◆ _pixelBased()

CorrelationMatrix lsst.meas.algorithms.noise_covariance.ComputeNoiseCorrelationTask._pixelBased (   self,
lsst.afw.image.MaskedImage  maskedImage,
lsst.afw.image.MaskedImage  refMaskedImage 
)
protected
Determine correlation coefficients between pixels

This is the concrete routine that does the computation.

Parameters
----------
maskedImage : `~lsst.afw.image.MaskedImage`
    Image for which to determine the variance rescaling factor.
refMaskedImage : `~lsst.afw.image.MaskedImage`
    Image from which to determine which pixels to mask.

Returns
-------
corr_matrix : `CorrelationMatrix`
    Correlation matrix of the maskedImage.

Definition at line 189 of file noise_covariance.py.

◆ run()

CorrelationMatrix lsst.meas.algorithms.noise_covariance.ComputeNoiseCorrelationTask.run (   self,
lsst.afw.image.MaskedImage  maskedImage,
lsst.afw.image.MaskedImage | None   refMaskedImage = None 
)
Compute the correlation matrix from a maskedImage.

Parameters
----------
maskedImage :  `~lsst.afw.image.MaskedImage`
    Image for which to determine the correlation matrix.
refMaskedImage : `~lsst.afw.image.MaskedImage`, optional
    Image from which to determine which pixels to mask.
    If None, it defaults to ``maskedImage``.

Returns
-------
corr_matrix : `CorrelationMatrix`
    Correlation matrix of the maskedImage.

Raises
------
RuntimeError
    Raised if ``refMaskedImage`` is provided and does not have the same
    dimensions as ``maskedImage``.

Definition at line 151 of file noise_covariance.py.

◆ subtractedBackground()

def lsst.meas.algorithms.noise_covariance.ComputeNoiseCorrelationTask.subtractedBackground (   self,
lsst.afw.image.MaskedImage  maskedImage 
)
Context manager for subtracting the background

We need to subtract the background so that the entire image
(apart from objects, which should be clipped) will have the
image/sqrt(variance) distributed about zero with unit variance.
This context manager subtracts the background, and ensures it
is restored on exit.

Parameters
----------
maskedImage : `lsst.afw.image.MaskedImage`
    Image+mask+variance to have background subtracted and restored.

Returns
-------
context : context manager
    Context manager that ensure the background is restored.

Definition at line 122 of file noise_covariance.py.

Member Data Documentation

◆ _DefaultName

str lsst.meas.algorithms.noise_covariance.ComputeNoiseCorrelationTask._DefaultName = "computeNoiseCorrelation"
staticprotected

Definition at line 114 of file noise_covariance.py.

◆ ConfigClass

ComputeNoiseCorrelationConfig lsst.meas.algorithms.noise_covariance.ComputeNoiseCorrelationTask.ConfigClass = ComputeNoiseCorrelationConfig
static

Definition at line 113 of file noise_covariance.py.


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