22 #include "pybind11/pybind11.h" 23 #include "pybind11/stl.h" 40 static void declareRecordProxy(
py::module &mod) {
41 py::class_<RecordProxy, std::shared_ptr<RecordProxy>>
cls(mod,
"RecordProxy");
43 cls.def_readwrite(
"record", &RecordProxy::record);
44 cls.def_readwrite(
"position", &RecordProxy::position);
45 cls.def_readwrite(
"used", &RecordProxy::used);
52 cls.def(
"__eq__", &RecordProxy::operator==, py::is_operator());
53 cls.def(
"__ne__", &RecordProxy::operator!=, py::is_operator());
55 cls.def(
"getX", &RecordProxy::getX);
56 cls.def(
"getY", &RecordProxy::getY);
59 static void declareProxyPair(
py::module &mod) {
60 py::class_<ProxyPair, std::shared_ptr<ProxyPair>>
cls(mod,
"ProxyPair");
65 cls.def_readwrite(
"pa", &ProxyPair::pa);
67 cls.def(py::init<RecordProxy const &, RecordProxy const &>(),
"s1"_a,
"s2"_a);
70 static void declareMatchOptimisticBControl(
py::module &mod) {
71 py::class_<MatchOptimisticBControl>
cls(mod,
"MatchOptimisticBControl");
73 cls.def(py::init<>());
92 declareRecordProxy(mod);
93 declareProxyPair(mod);
94 declareMatchOptimisticBControl(mod);
96 mod.def(
"makeProxies",
100 "sourceCat"_a,
"distortedWcs"_a,
"tanWcs"_a);
101 mod.def(
"makeProxies",
103 "posRefCat"_a,
"tanWcs"_a);
105 mod.def(
"matchOptimisticB", &
matchOptimisticB,
"posRefCat"_a,
"sourceCat"_a,
"control"_a,
"wcs"_a,
106 "posRefBegInd"_a = 0,
"verbose"_a =
false);
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
afw::table::ReferenceMatchVector matchOptimisticB(afw::table::SimpleCatalog const &posRefCat, afw::table::SourceCatalog const &sourceCat, MatchOptimisticBControl const &control, afw::geom::SkyWcs const &wcs, int posRefBegInd=0, bool verbose=false)
Match sources to stars in a position reference catalog using optimistic pattern matching B...
std::vector< RecordProxy > ProxyVector
Point< double, 2 > Point2D
A base class for image defects.
Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID.
#define LSST_DECLARE_CONTROL_FIELD(WRAPPER, CLASS, NAME)
Macro used to wrap fields declared by LSST_CONTROL_FIELD using Pybind11.
ProxyVector makeProxies(afw::table::SourceCatalog const &sourceCat, afw::geom::SkyWcs const &distortedWcs, afw::geom::SkyWcs const &tanWcs)
PYBIND11_MODULE(matchOptimisticB, mod)