GaussianPsfFactory#

class lsst.meas.algorithms.GaussianPsfFactory(*args, **kw)#

Bases: Config

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.

Attributes Summary

addWing

Add a Gaussian to represent wings? (bool, default True)

defaultFwhm

Default FWHM of Gaussian model of core of star (pixels) (float, default 3.0)

maxSize

Maximum kernel size if using sizeFactor (pixels); ignored if size is not None (int, default None)

minSize

Minimum kernel size if using sizeFactor (pixels); ignored if size is not None (int, default 5)

size

Kernel size (width and height) (pixels); if None then sizeFactor is used (int, default None)

sizeFactor

Kernel size as a factor of fwhm (dimensionless); size = sizeFactor * fwhm; ignored if size is not None (float, default 3.0)

wingAmplitude

wing amplitude, as a multiple of core amplitude (dimensionless); ignored if addWing false (float, default 0.1)

wingFwhmFactor

wing width, as a multiple of core width (dimensionless); ignored if addWing false (float, default 2.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, default True)

defaultFwhm#

Default FWHM of Gaussian model of core of star (pixels) (float, default 3.0)

maxSize#

Maximum kernel size if using sizeFactor (pixels); ignored if size is not None (int, default None)

minSize#

Minimum kernel size if using sizeFactor (pixels); ignored if size is not None (int, default 5)

size#

Kernel size (width and height) (pixels); if None then sizeFactor is used (int, default None)

sizeFactor#

Kernel size as a factor of fwhm (dimensionless); size = sizeFactor * fwhm; ignored if size is not None (float, default 3.0)

wingAmplitude#

wing amplitude, as a multiple of core amplitude (dimensionless); ignored if addWing false (float, default 0.1)

wingFwhmFactor#

wing width, as a multiple of core width (dimensionless); ignored if addWing false (float, default 2.5)

Methods Documentation

apply(fwhm=None)#

Construct a GaussianPsf

Parameters#

fwhmfloat

FWHM of core of star (pixels); if None then self.defaultFwhm is used

Returns#

DoubleGaussianPsflsst.meas.algorithms.DoubleGaussianPsf

Returns if self.addWing is True

SingleGaussianPsflsst.meas.algorithms.SingleGaussianPsf

Returns if self.addWing is False

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#

fwhmfloat

FWHM of core star (pixels); if None then defaultFwhm is used

Returns#

sizeint

Kernel size (width == height) in pixels

sigmafloat

Sigma equivalent to supplied FWHM, assuming a Gaussian (pixels)

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 validate methods.

Complex single-field validation can be defined by deriving new Field types. For convenience, some derived lsst.pex.config.Field-types (ConfigField and ConfigChoiceField) are defined in lsst.pex.config that handle recursing into subconfigs.

Inter-field relationships should only be checked in derived Config classes after calling this method, and base validation is complete.