GaussianPsfFactory#
- class lsst.meas.algorithms.GaussianPsfFactory(*args, **kw)#
Bases:
ConfigFactory 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.
Attributes Summary
Add a Gaussian to represent wings? (
bool, defaultTrue)Default FWHM of Gaussian model of core of star (pixels) (
float, default3.0)Maximum kernel size if using sizeFactor (pixels); ignored if size is not None (
int, defaultNone)Minimum kernel size if using sizeFactor (pixels); ignored if size is not None (
int, default5)Kernel size (width and height) (pixels); if None then sizeFactor is used (
int, defaultNone)Kernel size as a factor of fwhm (dimensionless); size = sizeFactor * fwhm; ignored if size is not None (
float, default3.0)wing amplitude, as a multiple of core amplitude (dimensionless); ignored if addWing false (
float, default0.1)wing width, as a multiple of core width (dimensionless); ignored if addWing false (
float, default2.5)Methods Summary
apply([fwhm])Construct a GaussianPsf
computeSizeAndSigma([fwhm])Compute kernel size and star width as sigma.
makeField(doc)Make an lsst.pex.config.ConfigurableField
validate()Validate the Config, raising an exception if invalid.
Attributes Documentation
- addWing#
Add a Gaussian to represent wings? (
bool, defaultTrue)
- defaultFwhm#
Default FWHM of Gaussian model of core of star (pixels) (
float, default3.0)
- maxSize#
Maximum kernel size if using sizeFactor (pixels); ignored if size is not None (
int, defaultNone)
- minSize#
Minimum kernel size if using sizeFactor (pixels); ignored if size is not None (
int, default5)
- size#
Kernel size (width and height) (pixels); if None then sizeFactor is used (
int, defaultNone)
- sizeFactor#
Kernel size as a factor of fwhm (dimensionless); size = sizeFactor * fwhm; ignored if size is not None (
float, default3.0)
- wingAmplitude#
wing amplitude, as a multiple of core amplitude (dimensionless); ignored if addWing false (
float, default0.1)
- wingFwhmFactor#
wing width, as a multiple of core width (dimensionless); ignored if addWing false (
float, default2.5)
Methods Documentation
- apply(fwhm=None)#
Construct a GaussianPsf
Parameters#
- fwhm
float FWHM of core of star (pixels); if None then self.defaultFwhm is used
Returns#
- DoubleGaussianPsf
lsst.meas.algorithms.DoubleGaussianPsf Returns if self.addWing is True
- SingleGaussianPsf
lsst.meas.algorithms.SingleGaussianPsf Returns if self.addWing is False
- fwhm
- computeSizeAndSigma(fwhm=None)#
Compute kernel size and star width as sigma. The kernel size will be odd unless minSize or maxSize is used and that value is even. Assumes a valid config.
Parameters#
- fwhm
float FWHM of core star (pixels); if None then defaultFwhm is used
Returns#
- size
int Kernel size (width == height) in pixels
- sigma
float Sigma equivalent to supplied FWHM, assuming a Gaussian (pixels)
- fwhm
- classmethod makeField(doc)#
Make an lsst.pex.config.ConfigurableField
- validate()#
Validate the Config, raising an exception if invalid.
Raises#
- lsst.pex.config.FieldValidationError
Raised if verification fails.
Notes#
The base class implementation performs type checks on all fields by calling their
validatemethods.Complex single-field validation can be defined by deriving new Field types. For convenience, some derived
lsst.pex.config.Field-types (ConfigFieldandConfigChoiceField) are defined inlsst.pex.configthat handle recursing into subconfigs.Inter-field relationships should only be checked in derived
Configclasses after calling this method, and base validation is complete.