generateAlardLuptonBasisList¶
- lsst.ip.diffim.generateAlardLuptonBasisList(config, targetFwhmPix=None, referenceFwhmPix=None, basisDegGauss=None, basisSigmaGauss=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:
- configlsst.ip.diffim.PsfMatchConfigAL
- Configuration object for the Alard-Lupton algorithm. 
- targetFwhmPixfloat, optional
- Fwhm width (pixel) of the template exposure characteristic psf. This is the _target_ that will be matched to the science exposure. 
- referenceFwhmPixfloat, optional
- Fwhm width (pixel) of the science exposure characteristic psf. 
- basisDegGausslistofint, optional
- Polynomial degree of each Gaussian (sigma) basis. If None, defaults to - config.alardDegGauss.
- basisSigmaGausslistofint, optional
- Sigmas of each Gaussian basis. If None, defaults to - config.alardSigGauss.
- metadatalsst.daf.base.PropertySet, optional
- If specified, object to collect metadata fields about the kernel basis list. 
 
- config
- Returns:
- basisListlistoflsst.afw.math.kernel.FixedKernel
- List of basis kernels. For each degree value - nin- config.basisDegGauss(n+2)(n+1)/2 kernels are generated and appended to the list in the order of the polynomial parameter number. See- lsst.afw.math.polynomialFunction2Ddocumentation for more details.
 
- basisList
- Raises:
- RuntimeError
- if - config.kernelBasisSetis not equal to “alard-lupton”
 
- 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 
 
 
 - Notes - The polynomial functions ( - f) are always evaluated in the -1.0, +1.0 range in both x, y directions, edge to edge, with- f(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==Falsethen- basisSigmaGaussis used. If- basisSigmaGaussis not provided, then- config.alardSigGaussis used. In both cases, the length of sigmas must be equal to- config.alardNGauss.
- If - targetFwhmPix<referenceFwhmPix(normal convolution): First sigma- Sig_Kis determined to satisfy:- Sig_reference**2 = Sig_target**2 + Sig_K**2. If it’s larger than- config.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): Compute the basis list with a significantly smaller- config.alardMinSig.
 
 - Metadata fields - ALBasisNGaussint
- The number of base Gaussians in the AL basis functions. 
- ALBasisDegGausslistofint
- Polynomial order of spatial modification of the base Gaussian functions. 
- ALBasisSigGausslistoffloat
- Sigmas in pixels of the base Gaussians. 
- ALKernelSizeint
- Kernel stamp size is (ALKernelSize pix, ALKernelSize pix). 
- ALBasisModestr, either ofconfig,convolution,deconvolution
- Indicates whether the config file values, the convolution or deconvolution algorithm was used to determine the base Gaussian sigmas and the kernel stamp size. 
 - References [1]- 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