Function lsst::afw::table::unpackMatches(BaseCatalog const&, SimpleCatalog const&, SimpleCatalog const&)

Function Documentation

template<typename Cat1, typename Cat2>
std::vector<Match<typename Cat1::Record, typename Cat2::Record>> lsst::afw::table::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.

If an ID cannot be found in the given tables, that pointer will be set to null in the returned match vector.

Note

The first and second catalog arguments must be sorted in ascending ID order on input; this will allow us to use binary search algorithms to find the records referred to by the match table.

This is instantiated for Simple-Simple, Simple-Source, and Source-Source catalog combinations.

Parameters
  • [in] matches: A normalized BaseCatalog representation, as produced by packMatches.

  • [in] cat1: A CatalogT containing the records used on the ‘first’ side of the match, sorted by ascending ID.

  • [in] cat2: A CatalogT containing the records used on the ‘second’ side of the match, sorted by ascending ID. May be the same as first.