24 #ifndef LSST_MEAS_BASE_SincCoeffs_h_INCLUDED
25 #define LSST_MEAS_BASE_SincCoeffs_h_INCLUDED
29 #include "lsst/afw/image/Image.h"
30 #include "lsst/afw/geom/ellipses/Axes.h"
32 namespace lsst {
namespace meas {
namespace base {
42 template<
typename PixelT>
46 typedef afw::image::Image<PixelT>
CoeffT;
53 static void cache(
float rInner,
float rOuter);
61 get(afw::geom::ellipses::Axes const & outerEllipse,
float const innerRadiusFactor=0.0);
65 calculate(afw::geom::ellipses::Axes const& outerEllipse,
double const innerFactor=0.0);
72 bool operator()(T
x, T
y)
const {
76 return (x - y < 0) ?
true :
false;
78 bool isEqual(T x, T y)
const {
79 return ::fabs(x - y) < std::numeric_limits<T>::epsilon();
83 typedef std::map<float, PTR(CoeffT), FuzzyCompare<float> > CoeffMap;
84 typedef std::map<float, CoeffMap, FuzzyCompare<float> > CoeffMapMap;
85 SincCoeffs() : _cache() {};
86 SincCoeffs(SincCoeffs
const&);
87 void operator=(SincCoeffs
const&);
89 static SincCoeffs& getInstance();
97 _lookup(afw::geom::ellipses::Axes const & outerEllipse,
double const innerRadiusFactor=0.0) const;
104 #endif // !LSST_MEAS_BASE_SincCoeffs_h_INCLUDED
static boost::shared_ptr< CoeffT const > get(afw::geom::ellipses::Axes const &outerEllipse, float const innerRadiusFactor=0.0)
Get the coefficients for an aperture.
A singleton to calculate and cache the coefficients for sinc photometry.
static void cache(float rInner, float rOuter)
Cache the coefficients for a particular aperture.
static boost::shared_ptr< CoeffT > calculate(afw::geom::ellipses::Axes const &outerEllipse, double const innerFactor=0.0)
Calculate the coefficients for an aperture.
afw::image::Image< PixelT > CoeffT