2 #if !defined(LSST_DEBLENDER_BASELINE_H)
3 #define LSST_DEBLENDER_BASELINE_H
19 template <
typename ImagePixelT,
29 typedef typename lsst::afw::
image::Mask<MaskPixelT>
MaskT;
34 typedef typename lsst::afw::detection::HeavyFootprint<ImagePixelT, MaskPixelT, VariancePixelT>
HeavyFootprintT;
36 typedef typename
PTR(lsst::afw::detection::HeavyFootprint<ImagePixelT, MaskPixelT, VariancePixelT>)
HeavyFootprintPtrT;
44 std::pair<MaskedImagePtrT, FootprintPtrT>
46 lsst::afw::detection::
Footprint const& foot,
47 lsst::afw::detection::Peak const& pk,
60 lsst::afw::detection::Peak const& pk);
72 std::vector<typename
PTR(lsst::afw::
image::MaskedImage<ImagePixelT, MaskPixelT, VariancePixelT>)>
74 lsst::afw::detection::
Footprint const& foot,
75 std::vector<typename
PTR(lsst::afw::
image::MaskedImage<ImagePixelT, MaskPixelT, VariancePixelT>)> templates,
79 std::vector<
bool> const&
ispsf,
80 std::vector<
int> const&
pkx,
81 std::vector<
int> const&
pky,
82 std::vector<boost::shared_ptr<typename lsst::afw::detection::HeavyFootprint<ImagePixelT,MaskPixelT,VariancePixelT> > > &
strays,
90 boost::shared_ptr<lsst::afw::detection::
Footprint>,
91 ImagePixelT threshold);
94 boost::shared_ptr<lsst::afw::detection::Footprint>
96 boost::shared_ptr<lsst::afw::detection::Footprint>,
97 ImagePixelT threshold);
110 int strayFluxOptions,
111 std::vector<boost::shared_ptr<lsst::afw::detection::Footprint> > tfoots,
112 std::vector<
bool> const& ispsf,
113 std::vector<
int> const& pkx,
114 std::vector<
int> const& pky,
115 double clipStrayFluxFraction,
116 std::vector<boost::shared_ptr<typename lsst::afw::detection::HeavyFootprint<ImagePixelT,MaskPixelT,VariancePixelT> > > & strays);
static boost::shared_ptr< lsst::afw::detection::Footprint > getSignificantEdgePixels(ImagePtrT, boost::shared_ptr< lsst::afw::detection::Footprint >, ImagePixelT threshold)
boost::uint16_t MaskPixel
static void _find_stray_flux(lsst::afw::detection::Footprint const &foot, ImagePtrT tsum, MaskedImageT const &img, int strayFluxOptions, std::vector< boost::shared_ptr< lsst::afw::detection::Footprint > > tfoots, std::vector< bool > const &ispsf, std::vector< int > const &pkx, std::vector< int > const &pky, double clipStrayFluxFraction, std::vector< boost::shared_ptr< typename lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > > > &strays)
static void makeMonotonic(MaskedImageT &img, lsst::afw::detection::Peak const &pk)
static const int ASSIGN_STRAYFLUX
static bool hasSignificantFluxAtEdge(ImagePtrT, boost::shared_ptr< lsst::afw::detection::Footprint >, ImagePixelT threshold)
lsst::afw::detection::Footprint Footprint
static const int STRAYFLUX_NEAREST_FOOTPRINT
boost::shared_ptr< lsst::afw::detection::Footprint > FootprintPtrT
boost::shared_ptr< lsst::afw::image::Mask< MaskPixelT > > MaskPtrT
static std::vector< typename boost::shared_ptr< lsst::afw::image::MaskedImage< ImagePixelT > MaskPixelT, VariancePixelT >)> std::vector< boost::shared_ptr< lsst::afw::detection::Footprint > > ImagePtrT std::vector< bool > const std::vector< int > const std::vector< int > const std::vector< boost::shared_ptr< typename lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > > > int strayFluxOptions
lsst::afw::image::MaskedImage< ImagePixelT, MaskPixelT, VariancePixelT > MaskedImageT
table::Key< table::Array< Kernel::Pixel > > image
boost::shared_ptr< lsst::afw::image::Image< ImagePixelT > > ImagePtrT
static std::vector< typename boost::shared_ptr< lsst::afw::image::MaskedImage< ImagePixelT > MaskPixelT, VariancePixelT >)> std::vector< boost::shared_ptr< lsst::afw::detection::Footprint > > ImagePtrT std::vector< bool > const std::vector< int > const std::vector< int > const & pky
static void medianFilter(MaskedImageT const &img, MaskedImageT &outimg, int halfsize)
Represent a 2-dimensional array of bitmask pixels.
static std::vector< typename boost::shared_ptr< lsst::afw::image::MaskedImage< ImagePixelT > MaskPixelT, VariancePixelT >)> std::vector< boost::shared_ptr< lsst::afw::detection::Footprint > > templ_footprints
static std::vector< typename boost::shared_ptr< lsst::afw::image::MaskedImage< ImagePixelT > MaskPixelT, VariancePixelT >)> apportionFlux(MaskedImageT const &img, lsst::afw::detection::Footprint const &foot, std::vector< typename boost::shared_ptr< lsst::afw::image::MaskedImage< ImagePixelT > MaskPixelT, VariancePixelT >)> templates
A class to manipulate images, masks, and variance as a single object.
boost::shared_ptr< lsst::afw::detection::HeavyFootprint< ImagePixelT > MaskPixelT, VariancePixelT > HeavyFootprintPtrT
float VariancePixel
! default type for Masks and MaskedImage Masks
Support for peaks in images.
static std::pair< MaskedImagePtrT, FootprintPtrT > buildSymmetricTemplate(MaskedImageT const &img, lsst::afw::detection::Footprint const &foot, lsst::afw::detection::Peak const &pk, double sigma1, bool minZero, bool patchEdges, bool *patchedEdges)
static const int STRAYFLUX_R_TO_FOOTPRINT
afw::table::Key< double > sigma1
static boost::shared_ptr< lsst::afw::detection::Footprint > symmetrizeFootprint(lsst::afw::detection::Footprint const &foot, int cx, int cy)
static std::vector< typename boost::shared_ptr< lsst::afw::image::MaskedImage< ImagePixelT > MaskPixelT, VariancePixelT >)> std::vector< boost::shared_ptr< lsst::afw::detection::Footprint > > ImagePtrT std::vector< bool > const std::vector< int > const & pkx
boost::shared_ptr< lsst::afw::image::MaskedImage< ImagePixelT > MaskPixelT, VariancePixelT > MaskedImagePtrT
static std::vector< typename boost::shared_ptr< lsst::afw::image::MaskedImage< ImagePixelT > MaskPixelT, VariancePixelT >)> std::vector< boost::shared_ptr< lsst::afw::detection::Footprint > > ImagePtrT templ_sum
static const int STRAYFLUX_TO_POINT_SOURCES_WHEN_NECESSARY
Implementation of the Class MaskedImage.
static std::vector< typename boost::shared_ptr< lsst::afw::image::MaskedImage< ImagePixelT > MaskPixelT, VariancePixelT >)> std::vector< boost::shared_ptr< lsst::afw::detection::Footprint > > ImagePtrT std::vector< bool > const std::vector< int > const std::vector< int > const std::vector< boost::shared_ptr< typename lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > > > int double clipStrayFluxFraction
static std::vector< typename boost::shared_ptr< lsst::afw::image::MaskedImage< ImagePixelT > MaskPixelT, VariancePixelT >)> std::vector< boost::shared_ptr< lsst::afw::detection::Footprint > > ImagePtrT std::vector< bool > const std::vector< int > const std::vector< int > const std::vector< boost::shared_ptr< typename lsst::afw::detection::HeavyFootprint< ImagePixelT, MaskPixelT, VariancePixelT > > > & strays
static std::vector< typename boost::shared_ptr< lsst::afw::image::MaskedImage< ImagePixelT > MaskPixelT, VariancePixelT >)> std::vector< boost::shared_ptr< lsst::afw::detection::Footprint > > ImagePtrT std::vector< bool > const & ispsf
static void _sum_templates(std::vector< MaskedImagePtrT > timgs, ImagePtrT tsum)
static const int STRAYFLUX_TO_POINT_SOURCES_ALWAYS