Class WarpingControl¶
Defined in File warpExposure.h
Class Documentation¶
-
class
WarpingControl
¶ Parameters to control convolution
- Note
padValue is not member of this class to avoid making this a templated class.
Public Functions
-
WarpingControl
(std::string const &warpingKernelName, std::string const &maskWarpingKernelName = "", int cacheSize = 0, int interpLength = 0, lsst::afw::image::MaskPixel growFullMask = 0)¶ - Parameters
warpingKernelName
: name of warping kernel; used as the argument to makeWarpingKernelmaskWarpingKernelName
: name of warping kernel used for the mask plane; if “” then the regular warping kernel is used. Intended so one can use a bilinear kernel or other compact kernel for the mask plane to avoid smearing mask bits too far. The theory is that bad pixels are already interpolated over, so we don’t need to worry about bad values spreading very far.cacheSize
: cache size for warping kernel; no cache if 0 (used as the argument to the warping kernels’ computeCache method)interpLength
: distance over which the WCS can be linearly interpolatedgrowFullMask
: mask bits to grow to full width of image/variance kernel
Construct a WarpingControl object
- Exceptions
pex::exceptions::InvalidParameterError
: if the warping kernel is smaller than the mask warping kernel.
-
virtual
~WarpingControl
()¶
-
int
getCacheSize
() const¶ get the cache size for the interpolation kernel(s)
-
void
setCacheSize
(int cacheSize)¶ - Parameters
cacheSize
: cache size
set the cache size for the interpolation kernel(s)
A value of 0 disables the cache for maximum accuracy. 10,000 typically results in a warping error of a fraction of a count. 100,000 typically results in a warping error of less than 0.01 count. Note the new cache is not computed until getWarpingKernel or getMaskWarpingKernel is called.
-
int
getInterpLength
() const¶ get the interpolation length (pixels)
-
void
setInterpLength
(int interpLength)¶ - Parameters
interpLength
: interpolation length (pixels)
set the interpolation length
Interpolation length is the distance over which the WCS can be linearly interpolated, in pixels:
0 means no interpolation and uses an optimized branch of the code
1 also performs no interpolation but it runs the interpolation code branch (and so is only intended for unit tests)
-
std::shared_ptr<SeparableKernel>
getWarpingKernel
() const¶ get the warping kernel
-
void
setWarpingKernelName
(std::string const &warpingKernelName)¶ - Parameters
warpingKernelName
: name of warping kernel
set the warping kernel by name
-
void
setWarpingKernel
(SeparableKernel const &warpingKernel)¶ - Parameters
warpingKernel
: warping kernel
set the warping kernel
- Exceptions
lsst::pex::exceptions::InvalidParameterError
: if new kernel pointer is empty.
-
std::shared_ptr<SeparableKernel>
getMaskWarpingKernel
() const¶ get the mask warping kernel
-
bool
hasMaskWarpingKernel
() const¶ return true if there is a mask kernel
-
void
setMaskWarpingKernelName
(std::string const &maskWarpingKernelName)¶ - Parameters
maskWarpingKernelName
: name of mask warping kernel; use “” to clear the kernel
set or clear the mask warping kernel by name
-
void
setMaskWarpingKernel
(SeparableKernel const &maskWarpingKernel)¶ - Parameters
maskWarpingKernel
: mask warping kernel
set the mask warping kernel
- Note
To clear the mask warping kernel use setMaskWarpingKernelName(“”).