LSST Applications g0fba68d861+aff6b1d179,g1e78f5e6d3+b2e1eec3e3,g1fd858c14a+eb8d917efb,g35bb328faa+fcb1d3bbc8,g436fd98eb5+de86862952,g4af146b050+2f70285269,g4d2262a081+c17cfe15e3,g4e0f332c67+8616b824a5,g53246c7159+fcb1d3bbc8,g5a012ec0e7+d65fd7031a,g60b5630c4e+de86862952,g67b6fd64d1+c0248a1c13,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g87b7deb4dc+1a71b41694,g8852436030+40f6ec51d1,g89139ef638+c0248a1c13,g9125e01d80+fcb1d3bbc8,g94187f82dc+de86862952,g989de1cb63+c0248a1c13,g9f33ca652e+62adb22cd2,g9f7030ddb1+d892b2cb3e,ga2b97cdc51+de86862952,gabe3b4be73+1e0a283bba,gabf8522325+83c19109ce,gb1101e3267+1371da34ff,gb58c049af0+f03b321e39,gb89ab40317+c0248a1c13,gcf25f946ba+40f6ec51d1,gd6cbbdb0b4+d9e8db455e,gd9a9a58781+fcb1d3bbc8,gde0f65d7ad+fc726a16be,gded526ad44+763ef31e97,ge278dab8ac+4ce6343b44,ge410e46f29+c0248a1c13,gf67bdafdda+c0248a1c13,gfe06eef73a+95f9f0e40c,v29.0.0.rc3
LSST Data Management Base Package
|
Functions | |
getKernelCenterDisplacement (kernel, x, y, image=None) | |
getPsfFwhm (psf, average=True, position=None) | |
float | evaluateMeanPsfFwhm (afwImage.Exposure exposure, float fwhmExposureBuffer, int fwhmExposureGrid) |
afwImage.ImageD | computeAveragePsf (afwImage.Exposure exposure, float psfExposureBuffer, int psfExposureGrid) |
computeRobustStatistics (image, mask, statsCtrl, statistic=afwMath.MEANCLIP) | |
computePSFNoiseEquivalentArea (psf) | |
angleMean (angles) | |
evaluateMaskFraction (mask, maskPlane) | |
Variables | |
_LOG = getLogger(__name__) | |
Support utilities for Measuring sources
lsst.ip.diffim.utils.angleMean | ( | angles | ) |
Calculate the mean of an array of angles. Parameters ---------- angles : `ndarray` An array of angles, in radians Returns ------- `lsst.geom.Angle` The mean angle
Definition at line 300 of file utils.py.
afwImage.ImageD lsst.ip.diffim.utils.computeAveragePsf | ( | afwImage.Exposure | exposure, |
float | psfExposureBuffer, | ||
int | psfExposureGrid ) |
Get the average PSF by evaluating it on a grid within an exposure. Parameters ---------- exposure : `~lsst.afw.image.Exposure` The exposure for which the average PSF is to be computed. The exposure must contain a `psf` attribute. psfExposureBuffer : `float` Fractional buffer margin to be left out of all sides of the image during the construction of the grid to compute average PSF in an exposure. psfExposureGrid : `int` Grid size to compute the average PSF in an exposure. Returns ------- psfImage : `~lsst.afw.image.Image` The average PSF across the exposure. Raises ------ ValueError Raised if the PSF cannot be computed at any of the grid points. See Also -------- `evaluateMeanPsfFwhm`
Definition at line 195 of file utils.py.
lsst.ip.diffim.utils.computePSFNoiseEquivalentArea | ( | psf | ) |
Compute the noise equivalent area for an image psf Parameters ---------- psf : `lsst.afw.detection.Psf` Returns ------- nea : `float`
Definition at line 284 of file utils.py.
lsst.ip.diffim.utils.computeRobustStatistics | ( | image, | |
mask, | |||
statsCtrl, | |||
statistic = afwMath.MEANCLIP ) |
Calculate a robust mean of the variance plane of an exposure. Parameters ---------- image : `lsst.afw.image.Image` Image or variance plane of an exposure to evaluate. mask : `lsst.afw.image.Mask` Mask plane to use for excluding pixels. statsCtrl : `lsst.afw.math.StatisticsControl` Statistics control object for configuring the calculation. statistic : `lsst.afw.math.Property`, optional The type of statistic to compute. Typical values are ``afwMath.MEANCLIP`` or ``afwMath.STDEVCLIP``. Returns ------- value : `float` The result of the statistic calculated from the unflagged pixels.
Definition at line 260 of file utils.py.
lsst.ip.diffim.utils.evaluateMaskFraction | ( | mask, | |
maskPlane ) |
Evaluate the fraction of masked pixels in a mask plane. Parameters ---------- mask : `lsst.afw.image.Mask` The mask to evaluate the fraction on maskPlane : `str` The particular mask plane to evaluate the fraction Returns ------- value : `float` The calculated fraction of masked pixels
Definition at line 317 of file utils.py.
float lsst.ip.diffim.utils.evaluateMeanPsfFwhm | ( | afwImage.Exposure | exposure, |
float | fwhmExposureBuffer, | ||
int | fwhmExposureGrid ) |
Get the mean PSF FWHM by evaluating it on a grid within an exposure. Parameters ---------- exposure : `~lsst.afw.image.Exposure` The exposure for which the mean FWHM of the PSF is to be computed. The exposure must contain a `psf` attribute. fwhmExposureBuffer : `float` Fractional buffer margin to be left out of all sides of the image during the construction of the grid to compute mean PSF FWHM in an exposure. fwhmExposureGrid : `int` Grid size to compute the mean FWHM in an exposure. Returns ------- meanFwhm : `float` The mean PSF FWHM on the exposure. Raises ------ ValueError Raised if the PSF cannot be computed at any of the grid points. See Also -------- `getPsfFwhm` `computeAveragePsf`
Definition at line 135 of file utils.py.
lsst.ip.diffim.utils.getKernelCenterDisplacement | ( | kernel, | |
x, | |||
y, | |||
image = None ) |
Calculate the PSF matching kernel peak offset from the nominal position. Parameters ---------- kernel : `~lsst.afw.math.LinearCombinationKernel` The PSF matching kernel to evaluate. x : `float` The x position on the detector to evaluate the kernel y : `float` The y position on the detector to evaluate the kernel image : `~lsst.afw.image.ImageD` The image to use as base for computing kernel pixel values Returns ------- kernel_sum : `float` The sum of the kernel on the desired location dx : `float` The displacement of the kernel averaged peak, with respect to the center of the extraction of the kernel dy : `float` The displacement of the kernel averaged peak, with respect to the center of the extraction of the kernel pos_angle: `float` The position angle in detector coordinates of the displacement length : `float` The displacement module of the kernel centroid in pixel units
Definition at line 40 of file utils.py.
lsst.ip.diffim.utils.getPsfFwhm | ( | psf, | |
average = True, | |||
position = None ) |
Directly calculate the horizontal and vertical widths of a PSF at half its maximum value. Parameters ---------- psf : `~lsst.afw.detection.Psf` Point spread function (PSF) to evaluate. average : `bool`, optional Set to return the average width over Y and X axes. position : `~lsst.geom.Point2D`, optional The position at which to evaluate the PSF. If `None`, then the average position is used. Returns ------- psfSize : `float` | `tuple` [`float`] The FWHM of the PSF computed at its average position. Returns the widths along the Y and X axes, or the average of the two if `average` is set. See Also -------- evaluateMeanPsfFwhm
Definition at line 99 of file utils.py.