2 #if !defined(LSST_MEAS_ASTROM_MATCHOPTIMISTICB_H) 3 #define LSST_MEAS_ASTROM_MATCHOPTIMISTICB_H 9 #include "lsst/pex/config.h" 10 #include "lsst/afw/table/Source.h" 11 #include "lsst/afw/table/Match.h" 22 PTR(lsst::afw::table::SimpleRecord)
record;
28 double getX()
const {
return position.getX(); }
29 double getY()
const {
return position.getY(); }
34 operator PTR(lsst::afw::table::SimpleRecord)()
const {
return record; }
46 PTR(lsst::afw::table::SimpleRecord)
record,
47 lsst::afw::geom::Point2D
const & position
48 ) : record(record), position(position) {}
55 ProxyVector
makeProxies(lsst::afw::table::SourceCatalog
const & sourceCat,
56 afw::image::Wcs
const& distortedWcs,
57 afw::image::Wcs
const& tanWcs
60 ProxyVector
makeProxies(lsst::afw::table::SimpleCatalog
const & posRefCat,
61 afw::image::Wcs
const& tanWcs
75 distance = std::hypot(x2-x1, y2-y1);
76 pa = std::atan2(y2-y1, x2-x1);
81 LSST_CONTROL_FIELD(refFluxField, std::string,
"name of flux field in reference catalog");
82 LSST_CONTROL_FIELD(sourceFluxField, std::string,
"name of flux field in source catalog");
83 LSST_CONTROL_FIELD(numBrightStars,
int,
"maximum number of bright reference stars to use");
84 LSST_CONTROL_FIELD(minMatchedPairs,
int,
"minimum number of matches");
85 LSST_CONTROL_FIELD(matchingAllowancePix,
double,
86 "maximum allowed distance between reference objects and sources (pixels)");
87 LSST_CONTROL_FIELD(maxOffsetPix,
double,
"maximum allowed frame translation (pixels)");
88 LSST_CONTROL_FIELD(maxRotationDeg,
double,
"maximum allowed frame rotation (deg)");
89 LSST_CONTROL_FIELD(allowedNonperpDeg,
double,
"allowed non-perpendicularity of x and y axes (deg)");
90 LSST_CONTROL_FIELD(numPointsForShape,
int,
"number of points in a matching shape");
91 LSST_CONTROL_FIELD(maxDeterminant,
double,
"?");
94 refFluxField(
"r_flux"),
95 sourceFluxField(
"slot_ApFlux_flux"),
98 matchingAllowancePix(10.0),
101 allowedNonperpDeg(3.0),
102 numPointsForShape(6),
108 void validate()
const;
133 lsst::afw::table::SimpleCatalog
const &posRefCat,
134 lsst::afw::table::SourceCatalog
const &sourceCat,
136 afw::image::Wcs
const& wcs,
bool operator==(RecordProxy const &other) const
lsst::afw::geom::Point2D position
bool operator!=(RecordProxy const &other) const
RecordProxy(boost::shared_ptr< lsst::afw::table::SimpleRecord > record, lsst::afw::geom::Point2D const &position)
Construct a RecordProxy.
std::vector< RecordProxy > ProxyVector
ProxyPair(RecordProxy const &s1, RecordProxy const &s2)
~MatchOptimisticBControl()
lsst::afw::table::ReferenceMatchVector matchOptimisticB(lsst::afw::table::SimpleCatalog const &posRefCat, lsst::afw::table::SourceCatalog const &sourceCat, MatchOptimisticBControl const &control, afw::image::Wcs const &wcs, int posRefBegInd=0, bool verbose=false)
Match sources to stars in a position reference catalog using optimistic pattern matching B...
MatchOptimisticBControl()
A wrapper around a SimpleRecord or SourceRecord that allows us to record a pixel position in a way th...
ProxyVector makeProxies(lsst::afw::table::SourceCatalog const &sourceCat, afw::image::Wcs const &distortedWcs, afw::image::Wcs const &tanWcs)
boost::shared_ptr< lsst::afw::table::SimpleRecord > record