ImageBasisConvolutionKernel#
- class lsst.images.convolution_kernels.ImageBasisConvolutionKernel(basis, spatial, center_y=None, center_x=None)#
Bases:
ConvolutionKernelA convolution kernel formed by a linear combination of images multiplied by
BaseFieldinstances.- Parameters:
basis (
ndarray) – A 3-d array holding the kernel images each basis function, with shape(n, height, width).spatial (
Iterable[TypeAliasType]) – Iterable offields.BaseFieldof lengthbasis.shape[0], holding the spatial variation of each basis kernel.center_y (
int|None, default:None) – Center of the basis kernels in the x dimension. Defaults toheight//2.center_x (
int|None, default:None) – Center of the basis kernels in the x dimension. Defaults towidth//2.
Attributes Summary
The kernel basis functions, as an array with shape
(n, h, w)(numpy.ndarray).The region where this convolution kernel is valid (
Bounds).Bounding box of all images returned by
compute_kernel_image(Box).The spatial variation of each basis function (
Sequence[BaseField]).Methods Summary
compute_kernel_image(*, x, y)Evaluate the kernel at a point.
from_legacy(legacy_kernel)Convert from a legacy
lsst.afw.math.LinearCombinationKernel.serialize(archive)Serialize the kernel to an output archive.
Convert to a legacy
lsst.afw.math.LinearCombinationKernel.Attributes Documentation
- basis#
The kernel basis functions, as an array with shape
(n, h, w)(numpy.ndarray).
- bounds#
- kernel_bbox#
Methods Documentation
- compute_kernel_image(*, x, y)#
Evaluate the kernel at a point.
- static from_legacy(legacy_kernel)#
Convert from a legacy
lsst.afw.math.LinearCombinationKernel.- Parameters:
legacy_kernel (
TypeAliasType) – The kernel to convert. Must use Chebyshev polynomials for its spatial variation andlsst.afw.math.FixedKernelobjects with a consistent shape and center for its basis functions.- Return type:
- serialize(archive)#
Serialize the kernel to an output archive.
- Parameters:
archive (
OutputArchive[Any]) – Archive to write to.- Return type:
- to_legacy()#
Convert to a legacy
lsst.afw.math.LinearCombinationKernel.This only works if all spatial variation is handled by
lsst.images.ChebyshevField.- Return type:
TypeAliasType