25 #ifndef LSST_AFW_TABLE_MATCH_H
26 #define LSST_AFW_TABLE_MATCH_H
38 namespace lsst {
namespace afw {
namespace table {
54 "i.e. if (s1, s2, d) is reported, then so is (s2, s1, d)");
66 template <
typename Record1,
typename Record2>
72 Match() : first(), second(), distance(0.0) {}
74 Match(
PTR(Record1)
const & r1,
PTR(Record2)
const & r2,
double dist)
77 template <
typename R1,
typename R2>
82 typedef Match<SimpleRecord,SimpleRecord>
SimpleMatch;
84 typedef Match<SourceRecord,SourceRecord>
SourceMatch;
100 MatchControl
const& mc=MatchControl()
111 MatchControl
const& mc=MatchControl()
148 #ifndef SWIG // swig will be confused by the nested names below; repeated with typedefs in match.i
159 template <
typename Cat1,
typename Cat2>
160 std::vector< Match< typename Cat1::Record, typename Cat2::Record> >
matchRaDec(
164 MatchControl
const& mc=MatchControl()
174 template <
typename Cat>
175 std::vector< Match< typename Cat::Record, typename Cat::Record> >
matchRaDec(
178 MatchControl
const& mc=MatchControl()
197 template <
typename Cat1,
typename Cat2>
198 std::vector< Match< typename Cat1::Record, typename Cat2::Record> >
matchRaDec(
201 Angle radius,
bool closest
219 template <
typename Cat>
220 std::vector< Match< typename Cat::Record, typename Cat::Record> >
matchRaDec(
234 template <
typename Record1,
typename Record2>
256 template <
typename Cat1,
typename Cat2>
257 std::vector< Match< typename Cat1::Record, typename Cat2::Record> >
264 #endif // #ifndef LSST_AFW_TABLE_MATCH_H
bool findOnlyClosest
"Return only the closest match if more than one is found " \ "(default: true)" ;
lsst::afw::geom::Angle Angle
boost::shared_ptr< Record1 > first
boost::shared_ptr< Record2 > second
CatalogT< BaseRecord > BaseCatalog
Match< SimpleRecord, SimpleRecord > SimpleMatch
std::vector< ReferenceMatch > ReferenceMatchVector
#define LSST_CONTROL_FIELD(NAME, TYPE, DOC)
Match(Match< R1, R2 > const &other)
Pass parameters to algorithms that match list of sources.
Lightweight representation of a geometric match between two records.
std::vector< SimpleMatch > SimpleMatchVector
std::vector< Match< typename Cat1::Record, typename Cat2::Record > > matchRaDec(Cat1 const &cat1, Cat2 const &cat2, Angle radius, MatchControl const &mc=MatchControl())
Match< SimpleRecord, SourceRecord > ReferenceMatch
BaseCatalog packMatches(std::vector< Match< Record1, Record2 > > const &matches)
Return a table representation of a MatchVector that can be used to persist it.
SortedCatalogT< SourceRecord > SourceCatalog
SourceMatchVector matchXy(SourceCatalog const &cat1, SourceCatalog const &cat2, double radius, MatchControl const &mc=MatchControl())
bool includeMismatches
"Include failed matches (i.e. one 'match' is NULL) " \ "(default: false)" ;
Match< SourceRecord, SourceRecord > SourceMatch
Match(boost::shared_ptr< Record1 > const &r1, boost::shared_ptr< Record2 > const &r2, double dist)
std::vector< Match< typename Cat1::Record, typename Cat2::Record > > unpackMatches(BaseCatalog const &matches, Cat1 const &cat1, Cat2 const &cat2)
Reconstruct a MatchVector from a BaseCatalog representation of the matches and a pair of catalogs...
bool symmetricMatch
"Produce symmetric matches (default: true):\n" \ "i.e. if (s1, s2, d) is reported, then so is (s2, s1, d)" ;
std::vector< SourceMatch > SourceMatchVector