generateAlardLuptonBasisList¶
- 
lsst.ip.diffim.generateAlardLuptonBasisList(config, targetFwhmPix=None, referenceFwhmPix=None, basisDegGauss=None, metadata=None)¶ Generate an Alard-Lupton kernel basis list based upon the Config and the input FWHM of the science and template images.
Parameters: - config : 
lsst.ip.diffim.PsfMatchConfigAL Configuration object for the Alard-Lupton algorithm.
- targetFwhmPix : 
float, optional Fwhm width (pixel) of the template exposure characteristic psf. This is the _target_ that will be matched to the science exposure.
- referenceFwhmPix : 
float, optional Fwhm width (pixel) of the science exposure characteristic psf.
- basisDegGauss : 
listofint, optional Polynomial degree of each Gaussian (sigma) basis. If None, defaults to
config.alardDegGauss.- metadata : 
lsst.daf.base.PropertySet, optional If specified, object to collect metadata fields about the kernel basis list.
Returns: - basisList : 
listoflsst.afw.math.kernel.FixedKernel List of basis kernels. For each degree value
ninconfig.basisDegGauss(n+2)(n+1)/2 kernels are generated and appended to the list in the order of the polynomial parameter number. Seelsst.afw.math.polynomialFunction2Ddocumentation for more details.
Raises: - RuntimeError
 - if 
config.kernelBasisSetis not equal to “alard-lupton” 
- if 
 - ValueError
 - if 
config.kernelSizeis even - if the number of Gaussians and the number of given sigma values are not equal or
 - if the number of Gaussians and the number of given polynomial degree values are not equal
 
- if 
 
Notes
The polynomial functions (
f) are always evaluated in the -1.0, +1.0 range in both x, y directions, edge to edge, withf(0,0)evaluated at the kernel center pixel,f(-1.0,-1.0)at the kernel(0,0)pixel. They are not scaled by the sigmas of the Gaussians.- Base Gaussian widths (sigmas in pixels) of the kernels are determined as:
 - If not all fwhm parameters are provided or 
config.scaleByFwhm==Falsethenconfig.alardNGaussandconfig.alardSigGaussare used. - If 
targetFwhmPix<referenceFwhmPix(normal convolution): First sigmaSig_Kis determined to satisfy:Sig_reference**2 = Sig_target**2 + Sig_K**2. If it’s larger thanconfig.alardMinSig * config.alardGaussBeta, make it the second kernel. Else make it the smallest kernel, unless only 1 kernel is asked for. - If 
referenceFwhmPix < targetFwhmPix(deconvolution): Define the progression of Gaussians using a method to derive a deconvolution sum-of-Gaussians from it’s convolution counterpart. [1] Only use 3 since the algorithm assumes 3 components. 
- If not all fwhm parameters are provided or 
 
References
[1] (1, 2) Ulmer, W.: Inverse problem of linear combinations of Gaussian convolution kernels (deconvolution) and some applications to proton/photon dosimetry and image processing. http://iopscience.iop.org/0266-5611/26/8/085002 Equation 40 - config :