32 template <
typename MatchT>
35 if (matchList.
empty()) {
41 for (
auto const& match : matchList) {
47 template <
typename MatchT>
51 if (matchList.
empty()) {
57 for (
auto const& match : matchList) {
58 auto refPtr = match.first;
59 auto srcPtr = match.second;
60 auto srcX = srcPtr->getX();
61 auto srcY = srcPtr->getY();
62 auto refPos = wcs.
skyToPixel(refPtr->getCoord());
63 auto refX = refPos[0];
64 auto refY = refPos[1];
65 val.
push_back(::hypot(srcX - refX, srcY - refY));
70 template <
typename MatchT>
74 if (matchList.
empty()) {
80 for (
auto const& match : matchList) {
81 auto refPtr = match.first;
82 auto srcPtr = match.second;
83 auto refCoord = refPtr->getCoord();
84 auto srcCoord = wcs.
pixelToSky(srcPtr->getCentroid());
91 #define INSTANTIATE(MATCH) \ 92 template afw::math::Statistics makeMatchStatistics<MATCH>(std::vector<MATCH> const& matchList, \ 94 afw::math::StatisticsControl const& sctrl); \ 95 template afw::math::Statistics makeMatchStatisticsInPixels<MATCH>( \ 96 afw::geom::SkyWcs const& wcs, std::vector<MATCH> const& matchList, int const flags, \ 97 afw::math::StatisticsControl const& sctrl); \ 98 template afw::math::Statistics makeMatchStatisticsInRadians<MATCH>( \ 99 afw::geom::SkyWcs const& wcs, std::vector<MATCH> const& matchList, int const flags, \ 100 afw::math::StatisticsControl const& sctrl); afw::math::Statistics makeMatchStatistics(std::vector< MatchT > const &matchList, int const flags, afw::math::StatisticsControl const &sctrl=afw::math::StatisticsControl())
Compute statistics of the distance field of a match list.
lsst::geom::Point2D skyToPixel(lsst::geom::SpherePoint const &sky) const
lsst::geom::SpherePoint pixelToSky(lsst::geom::Point2D const &pixel) const
#define INSTANTIATE(MATCH)
afw::math::Statistics makeMatchStatisticsInPixels(afw::geom::SkyWcs const &wcs, std::vector< MatchT > const &matchList, int const flags, afw::math::StatisticsControl const &sctrl=afw::math::StatisticsControl())
Compute statistics of on-detector radial separation for a match list, in pixels.
Statistics makeStatistics(lsst::afw::image::Image< Pixel > const &img, lsst::afw::image::Mask< image::MaskPixel > const &msk, int const flags, StatisticsControl const &sctrl=StatisticsControl())
Match< SimpleRecord, SourceRecord > ReferenceMatch
Angle separation(SpherePoint const &other) const noexcept
#define LSST_EXCEPT(type,...)
afw::math::Statistics makeMatchStatisticsInRadians(afw::geom::SkyWcs const &wcs, std::vector< MatchT > const &matchList, int const flags, afw::math::StatisticsControl const &sctrl=afw::math::StatisticsControl())
Compute statistics of on-sky radial separation for a match list, in radians.
Match< SourceRecord, SourceRecord > SourceMatch