Coverage for python/lsst/meas/algorithms/gaussianPsfFactory.py : 96%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# # LSST Data Management System # # Copyright 2008-2017 AURA/LSST. # # This product includes software developed by the # LSST Project (http://www.lsst.org/). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the LSST License Statement and # the GNU General Public License along with this program. If not, # see <https://www.lsstcorp.org/LegalNotices/>. #
"""Factory for simple Gaussian PSF models
Provides a high-level interface to DoubleGaussianPsf and SingleGaussianPsf by specifying Gaussian PSF model width in FWHM instead of sigma, and supporting computing kernel size as a multiple of PSF width. This makes it suitable for tasks where PSF width is not known in advance. """ doc="Kernel size (width and height) (pixels); if None then sizeFactor is used", dtype=int, optional=True, default=None, check=isPositive, ) doc="Kernel size as a factor of fwhm (dimensionless); " "size = sizeFactor * fwhm; ignored if size is not None", dtype=float, optional=False, default=3.0, check=isPositive, ) doc="Minimum kernel size if using sizeFactor (pixels); ignored if size is not None", dtype=int, optional=True, default=5, check=isPositive, ) doc="Maximum kernel size if using sizeFactor (pixels); ignored if size is not None", dtype=int, optional=True, default=None, check=isPositive, ) doc="Default FWHM of Gaussian model of core of star (pixels)", dtype=float, default=3.0, check=isPositive, ) doc="Add a Gaussian to represent wings?", dtype=bool, optional=False, default=True, ) doc="wing width, as a multiple of core width (dimensionless); ignored if addWing false", dtype=float, optional=False, default=2.5, check=isPositive, ) doc="wing amplitude, as a multiple of core amplitude (dimensionless); ignored if addWing false", dtype=float, optional=False, default=0.1, check=isPositive, )
"""Compute kernel size and star width as sigma
kernel size will be odd unless minSize or maxSize is used and that value is even.
@param[in] fwhm: FWHM of core star (pixels); if None then defaultFwhm is used @return two values: - kernel size (width == height) in pixels - sigma equivalent to supplied fwhm, assuming a Gaussian (pixels)
@warning assumes a valid config """
else: size = self.minSize else:
"""Construct a GaussianPsf
@param[in] self: an instance of ConfigClass @param[in] fwhm: FWHM of core of star (pixels); if None then self.defaultFwhm is used @return a DoubleGaussianPsf if self.addWing is True, else a SingleGaussianPsf """ else:
def makeField(cls, doc): """Make an lsst.pex.config.ConfigurableField """ """Construct a Gaussian PSF
@param[in] config: an instance of GaussianPsfFactory """ doc=doc, target=applyWrapper, ConfigClass=cls ) |