CalcKSBMoments

For each galaxy in a galaxy set, this module measures the moments as defined in Kaiser Squires & Broadhurst 1995 (both quadrapole and elliptical), weighted by a given function. Once these moments have been computed, an estimate for the shear bias is computed, as are the average ellipticity and angle for the set.

The centroid about which the moments are taken can be given in a number of ways. The default behaviour is to measure the centroid using the zeroth moment. If the keyword FixCentroid is set, the center of the image is used. If the keyword TrueCentroid is set, the values from the data stream, usually generated by MakeGalSet, will be used.

The quadrapole moments are defined as Q_ij=sum(f(x,y)*w(x,y)*i*j)/sum(f(x,y)*w(x,y)) where f(x,y) is the input image and w(x,y) is the weight function and i,j are {x,y}.

The elliptical moments are then e1=(Q_xx-Q_yy)/(Q_xx+Q_yy) and e2=(2*Q_xy)/(Qxx+Q_yy).

The shear bias term, gamma, is given by gamma_i=|e_i|/2 where i={1,2}.

Parameters

NameTypeDescription
FixCentroid keyword Fix centroid to center of image.
TrueCentroid keyword Use the centroid supplied in the data stream.
WeightModel string "Constant" or "Gaussian". The weight model to use when calculating the moments. Either a constant weight or a circular gaussian.
Sigma double If using a Gaussian weight model, this is the sigma parameter in units of pixels.
Window int Units of pixels. Calculate moments on square domain of side Window instead of entire image. Overridden if larger than either image dimension. If centroid is too close to the edge, smaller, rectangular domains are summed over instead of offset squares.
Verbose keyword If present, output messages to screen for debugging purposes.

Inputs

NameTypeDescription
GalSet/Width int Width of each image in pixels.
GalSet/Height int Height on each image in pixels.
GalSet/BiasedCount int Number of biased images in galaxy set.
GalSet/BiasedImages double* Array of pixel values of biased images.
GalSet/BiasedCentX double* If TrueCentroid is set, an array of the "true" x-coordinate of the galaxy centroid for each image.
GalSet/BiasedCentY double* If TrueCentroid is set, an array of the "true" y-coordinate of the galaxy centroid for each image.
GalSet/UnbiasedCount int Number of biased images in galaxy set.
GalSet/UnbiasedImages double* Array of pixel values of biased images.
GalSet/UnbiasedCentX double* If TrueCentroid is set, an array of the "true" x-coordinate of the galaxy centroid for each image.
GalSet/UnbiasedCentY double* If TrueCentroid is set, an array of the "true" y-coordinate of the galaxy centroid for each image.

Outputs

NameTypeDescription
KSBMoments/BiasedQuadXX double* Array of the measured X-X quadrapole moments for each biased galaxy.
KSBMoments/BiasedQuadXY double* Array of the measured X-Y quadrapole moments for each biased galaxy.
KSBMoments/BiasedQuadXX double* Array of the measured Y-Y quadrapole moments for each biased galaxy.
KSBMoments/BiasedEllip1 double* Array of the measured elliptical moments (ellipticy aligned with X,Y axis) for each biased galaxy.
KSBMoments/BiasedEllip2 double* Array of the measured elliptical moments (ellipticy 45 degrees to X,Y axis) for each biased galaxy
KSBMoments/BiasedMeanGamma1 double Estimate for shear bias (aligned with X,Y axis) of biased galaxies.
KSBMoments/BiasedMeanGamma2 double Estimate for shear bias (45 degrees to X,Y axis) of biased galaxies.
KSBMoments/BiasedMeanEllip double Average ellipticity of all biased galaxies.
KSBMoments/BiasedMeanAngle double Average orientation of all biased galaxies in radians.
KSBMoments/UnbiasedQuadXX double* Array of the measured X-X quadrapole moments for each unbiased galaxy.
KSBMoments/UnbiasedQuadXY double* Array of the measured X-Y quadrapole moments for each unbiased galaxy.
KSBMoments/UnbiasedQuadXX double* Array of the measured Y-Y quadrapole moments for each unbiased galaxy.
KSBMoments/UnbiasedEllip1 double* Array of the measured elliptical moments (ellipticy aligned with X,Y axis) for each unbiased galaxy.
KSBMoments/UnbiasedEllip2 double* Array of the measured elliptical moments (ellipticy 45 degrees to X,Y axis) for each unbiased galaxy
KSBMoments/UnbiasedMeanGamma1 double Estimate for shear unbias (aligned with X,Y axis) of unbiased galaxies.
KSBMoments/UnbiasedMeanGamma2 double Estimate for shear unbias (45 degrees to X,Y axis) of unbiased galaxies.
KSBMoments/UnbiasedMeanEllip double Average ellipticity of all unbiased galaxies.
KSBMoments/UnbiasedMeanAngle double Average orientation of all unbiased galaxies in radians.

Last updated Friday, November 14, 2003.
© Lawrence Berkeley National Laboratory.