LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
|
Parameters to control convolution. More...
#include <warpExposure.h>
Public Member Functions | |
WarpingControl (std::string const &warpingKernelName, std::string const &maskWarpingKernelName="", int cacheSize=0, int interpLength=0, lsst::afw::gpu::DevicePreference devicePreference=lsst::afw::gpu::DEFAULT_DEVICE_PREFERENCE, lsst::afw::image::MaskPixel growFullMask=0) | |
Construct a WarpingControl object. More... | |
WarpingControl (SeparableKernel &warpingKernel, int interpLength=0, lsst::afw::gpu::DevicePreference devicePreference=lsst::afw::gpu::DEFAULT_DEVICE_PREFERENCE) | |
This constructor supports the deprecated legacy warping API. More... | |
virtual | ~WarpingControl () |
int | getCacheSize () const |
get the cache size for the interpolation kernel(s) More... | |
void | setCacheSize (int cacheSize) |
set the cache size for the interpolation kernel(s) More... | |
int | getInterpLength () const |
get the interpolation length (pixels) More... | |
void | setInterpLength (int interpLength) |
set the interpolation length More... | |
lsst::afw::gpu::DevicePreference | getDevicePreference () const |
get the GPU device preference More... | |
void | setDevicePreference (lsst::afw::gpu::DevicePreference devicePreference) |
set the GPU device preference More... | |
boost::shared_ptr < SeparableKernel > | getWarpingKernel () const |
get the warping kernel More... | |
void | setWarpingKernelName (std::string const &warpingKernelName) |
set the warping kernel by name More... | |
void | setWarpingKernel (SeparableKernel const &warpingKernel) |
set the warping kernel More... | |
boost::shared_ptr < SeparableKernel > | getMaskWarpingKernel () const |
get the mask warping kernel More... | |
bool | hasMaskWarpingKernel () const |
return true if there is a mask kernel More... | |
void | setMaskWarpingKernelName (std::string const &maskWarpingKernelName) |
set or clear the mask warping kernel by name More... | |
void | setMaskWarpingKernel (SeparableKernel const &maskWarpingKernel) |
set the mask warping kernel More... | |
lsst::afw::image::MaskPixel | getGrowFullMask () const |
get mask bits to grow to full width of image/variance kernel More... | |
void | setGrowFullMask (lsst::afw::image::MaskPixel growFullMask) |
set mask bits to grow to full width of image/variance kernel More... | |
Private Member Functions | |
void | _testWarpingKernels (SeparableKernel const &warpingKernel, SeparableKernel const &maskWarpingKernel) const |
Throw an exception if the two kernels are not compatible in shape. More... | |
void | _testDevicePreference (lsst::afw::gpu::DevicePreference const &devicePreference, boost::shared_ptr< SeparableKernel const > const &warpingKernelPtr) const |
test if GPU device preference and main warping kernel are compatible More... | |
Private Attributes | |
boost::shared_ptr < SeparableKernel > | _warpingKernelPtr |
boost::shared_ptr < SeparableKernel > | _maskWarpingKernelPtr |
int | _cacheSize |
int | _interpLength |
lsst::afw::gpu::DevicePreference | _devicePreference |
choose CPU or GPU acceleration More... | |
lsst::afw::image::MaskPixel | _growFullMask |
Parameters to control convolution.
Definition at line 239 of file warpExposure.h.
|
inlineexplicit |
Construct a WarpingControl object.
pex_exceptions | InvalidParameterError if the warping kernel is smaller than the mask warping kernel. |
pex_exceptions | InvalidParameterError if GPU is required and maskWarpingKernelName supplied. |
warpingKernelName | name of warping kernel; used as the argument to makeWarpingKernel |
maskWarpingKernelName | 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 interpolated |
devicePreference | use GPU acceleration? |
growFullMask | mask bits to grow to full width of image/variance kernel |
Definition at line 253 of file warpExposure.h.
|
inlineexplicit |
This constructor supports the deprecated legacy warping API.
warpingKernel | warping kernel |
interpLength | distance over which the WCS can be linearly interpolated; 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) |
devicePreference | use GPU acceleration? |
Definition at line 283 of file warpExposure.h.
|
inlinevirtual |
Definition at line 304 of file warpExposure.h.
|
private |
test if GPU device preference and main warping kernel are compatible
lsst::pex::exceptions::InvalidParameterError | if the parameters are incompatible |
devicePreference | GPU device preference |
warpingKernelPtr | warping kernel |
Definition at line 288 of file warpExposure.cc.
|
private |
Throw an exception if the two kernels are not compatible in shape.
lsst::pex::exceptions::InvalidParameterError | if the two kernels are not compatible in shape |
warpingKernel | warping kernel |
maskWarpingKernel | mask warping kernel |
Definition at line 270 of file warpExposure.cc.
|
inline |
|
inline |
get the GPU device preference
Definition at line 343 of file warpExposure.h.
|
inline |
get mask bits to grow to full width of image/variance kernel
Definition at line 406 of file warpExposure.h.
|
inline |
boost::shared_ptr< afwMath::SeparableKernel > lsst.afw.math::WarpingControl::getMaskWarpingKernel | ( | ) | const |
get the mask warping kernel
Definition at line 242 of file warpExposure.cc.
boost::shared_ptr< afwMath::SeparableKernel > lsst.afw.math::WarpingControl::getWarpingKernel | ( | ) | const |
get the warping kernel
Definition at line 216 of file warpExposure.cc.
|
inline |
return true if there is a mask kernel
Definition at line 384 of file warpExposure.h.
|
inline |
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.
cacheSize | cache size |
Definition at line 319 of file warpExposure.h.
|
inline |
set the GPU device preference
devicePreference | device preference |
Definition at line 348 of file warpExposure.h.
|
inline |
set mask bits to grow to full width of image/variance kernel
growFullMask | device preference |
Definition at line 411 of file warpExposure.h.
|
inline |
set the interpolation length
Interpolation length is the distance over which the WCS can be linearly interpolated, in pixels:
interpLength | interpolation length (pixels) |
Definition at line 336 of file warpExposure.h.
void lsst.afw.math::WarpingControl::setMaskWarpingKernel | ( | SeparableKernel const & | maskWarpingKernel | ) |
set the mask warping kernel
maskWarpingKernel | mask warping kernel |
Definition at line 262 of file warpExposure.cc.
void lsst.afw.math::WarpingControl::setMaskWarpingKernelName | ( | std::string const & | maskWarpingKernelName | ) |
set or clear the mask warping kernel by name
maskWarpingKernelName | name of mask warping kernel; use "" to clear the kernel |
Definition at line 251 of file warpExposure.cc.
void lsst.afw.math::WarpingControl::setWarpingKernel | ( | SeparableKernel const & | warpingKernel | ) |
set the warping kernel
lsst::pex::exceptions::InvalidParameterError | if new kernel pointer is empty. |
warpingKernel | warping kernel |
Definition at line 230 of file warpExposure.cc.
void lsst.afw.math::WarpingControl::setWarpingKernelName | ( | std::string const & | warpingKernelName | ) |
set the warping kernel by name
warpingKernelName | name of warping kernel |
Definition at line 223 of file warpExposure.cc.
|
private |
Definition at line 439 of file warpExposure.h.
|
private |
choose CPU or GPU acceleration
Definition at line 441 of file warpExposure.h.
|
private |
Definition at line 442 of file warpExposure.h.
|
private |
Definition at line 440 of file warpExposure.h.
|
private |
Definition at line 438 of file warpExposure.h.
|
private |
Definition at line 437 of file warpExposure.h.