32 #include "boost/format.hpp" 41 template<
typename WeightPixelT>
52 (
boost::format(
"coaddMask and weightMap dimensions differ: %dx%d != %dx%d") %
60 for (
int y = 0, endY = weightMap.
getHeight();
y != endY; ++
y) {
61 WeightMapConstXIter weightMapPtr = weightMap.
row_begin(
y);
62 WeightMapConstXIter
const weightMapEndPtr = weightMap.
row_end(
y);
63 MaskXIter coaddMaskPtr = coaddMask.
row_begin(
y);
64 for (; weightMapPtr != weightMapEndPtr; ++weightMapPtr, ++coaddMaskPtr) {
65 if (*weightMapPtr == 0) {
66 (*coaddMaskPtr) = (*coaddMaskPtr) | edgeMask;
76 #define INSTANTIATE(WEIGHTPIXEL) \ 77 template void coaddUtils::setCoaddEdgeBits<WEIGHTPIXEL>( \ 78 afwImage::Mask<afwImage::MaskPixel> &coaddMask, \ 79 afwImage::Image<WEIGHTPIXEL> const &weightMap \ int getHeight() const
Return the number of rows in the image.
void setCoaddEdgeBits(lsst::afw::image::Mask< lsst::afw::image::MaskPixel > &coaddMask, lsst::afw::image::Image< WeightPixelT > const &weightMap)
set edge bits of coadd mask based on weight map
x_iterator row_begin(int y) const
Return an x_iterator to the start of the y'th row.
Represent a 2-dimensional array of bitmask pixels.
def format(config, name=None, writeSourceLine=True, prefix="", verbose=False)
static MaskPixelT getPlaneBitMask(const std::vector< std::string > &names)
Return the bitmask corresponding to a vector of plane names OR'd together.
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
int getWidth() const
Return the number of columns in the image.
Reports invalid arguments.
x_iterator row_end(int y) const
Return an x_iterator to the end of the y'th row.
lsst::geom::Extent2I getDimensions() const
Return the image's size; useful for passing to constructors.
Backwards-compatibility support for depersisting the old Calib (FluxMag0/FluxMag0Err) objects...
A class to represent a 2-dimensional array of pixels.
#define INSTANTIATE(FROMSYS, TOSYS)