32 template<
typename MatchT>
38 if (matchList.
empty()) {
44 for (
auto const & match: matchList) {
50 template<
typename MatchT>
57 if (matchList.
empty()) {
63 for (
auto const & match: matchList) {
64 auto refPtr = match.first;
65 auto srcPtr = match.second;
66 auto srcX = srcPtr->getX();
67 auto srcY = srcPtr->getY();
68 auto refPos = wcs.
skyToPixel(refPtr->getCoord());
69 auto refX = refPos[0];
70 auto refY = refPos[1];
71 val.
push_back(::hypot(srcX - refX, srcY - refY));
76 template<
typename MatchT>
83 if (matchList.
empty()) {
89 for (
auto const & match: matchList) {
90 auto refPtr = match.first;
91 auto srcPtr = match.second;
92 auto refCoord = refPtr->getCoord();
93 auto srcCoord = wcs.
pixelToSky(srcPtr->getCentroid());
100 #define INSTANTIATE(MATCH) \ 101 template afw::math::Statistics makeMatchStatistics<MATCH>( \ 102 std::vector<MATCH> const & matchList, \ 104 afw::math::StatisticsControl const & sctrl \ 106 template afw::math::Statistics makeMatchStatisticsInPixels<MATCH>( \ 107 afw::geom::SkyWcs const & wcs, \ 108 std::vector<MATCH> const & matchList, \ 110 afw::math::StatisticsControl const & sctrl \ 112 template afw::math::Statistics makeMatchStatisticsInRadians<MATCH>( \ 113 afw::geom::SkyWcs const & wcs, \ 114 std::vector<MATCH> const & matchList, \ 116 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.
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
#define INSTANTIATE(MATCH)
A class to evaluate image statistics.
Pass parameters to a Statistics object.
A base class for image defects.
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())
Handle a watered-down front-end to the constructor (no variance)
Match< SimpleRecord, SourceRecord > ReferenceMatch
lsst::afw::geom::Angle angularSeparation(Coord const &c) const
compute the angular separation between two Coords
coord::IcrsCoord pixelToSky(Point2D const &pixel) const
Compute sky position(s) from pixel position(s)
Point2D skyToPixel(coord::IcrsCoord const &sky) const
Compute pixel position(s) from sky position(s)
#define LSST_EXCEPT(type,...)
Create an exception with a given type and message and optionally other arguments (dependent on the ty...
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