lsst.meas.modelfit  15.0-4-g535e784+2
Functions
lsst.meas.modelfit.regularizedMoments.regularizedMomentsContinued Namespace Reference

Functions

def makeGaussian (x, y, scale, muX, muY, varX, varXY, varY)
 
def buildUncertanty (imShape, W, uncertanty)
 
def measureMoments (image, W)
 

Function Documentation

◆ buildUncertanty()

def lsst.meas.modelfit.regularizedMoments.regularizedMomentsContinued.buildUncertanty (   imShape,
  W,
  uncertanty 
)
Propagate pixel uncertainties to uncertainties in weighted moments

Parameters
----------
imShape : tuple(float, float)
    The shape of image for which weighted moments have been calculated
W : iterable
    An iterable object with six elements corresponding to the moments used
    in the weighted moment calculation, scale, mean in x, mean in y, variance
    in x, covariance between x and y, and variance in y.
uncertanty : `float`
    Uncertainty in the pixel value. This is a single value, as this routine
    assumes errors are background dominated, and uncorrelated

Returns
-------
covarianceMatrix : 2D 6x6 numpy array of floats
    This is the covariance matrix on the measured moments with uncertainties
    propagated from pixel uncertainties

Definition at line 65 of file regularizedMomentsContinued.py.

◆ makeGaussian()

def lsst.meas.modelfit.regularizedMoments.regularizedMomentsContinued.makeGaussian (   x,
  y,
  scale,
  muX,
  muY,
  varX,
  varXY,
  varY 
)
Create an elliptical Gaussian.

Parameters
----------
x : 2D numpy array
    An array containing the x coordinates the Gaussian will be evaluated on.
    most likely the result of a numpy.indices call
y : 2D numpy array
    An array containing the y coordinates the Gaussian will be evaluated on.
    most likely the result of a numpy.indices call
scale : `float`
    The value the resulting Gaussian will have when summed over all pixels.
muX : `float`
    The central position of the Gaussian in the x direction
muY : `float`
    The central position of the Gaussian in the y direction
varX : `float`
    The variance of the Gaussian about the muX position
varXY : `float`
    The covariance of the Gaussian in x and y
varY : `float`
    The variance of the Gaussian about the muY position

Returns
-------
Gaussian : 2D numpy array
    The Gaussian array generated from the input values

Definition at line 25 of file regularizedMomentsContinued.py.

◆ measureMoments()

def lsst.meas.modelfit.regularizedMoments.regularizedMomentsContinued.measureMoments (   image,
  W 
)
Calculate weighted moments of the input image with the given weight array

Parameters
----------
image : 2D numpy array of floats
    This is the input postage stamp of a source for which the weighted moments are
    to be measured
W : 2D numpy array of floats
    Array of floats that are used as weights when calculating moments on the input
    image. Array must be the same shape image

Returns
-------
moments : 6 element numpy array
    These are the weighted moments as measured from the input image in the order of
    0th, 1st X, 1st Y, 2nd X, 2nd XY, 2nd Y

Raises
------
AssertionError: Raises if the input arrays are not the same shape

Definition at line 105 of file regularizedMomentsContinued.py.