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(); }
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) {}
56 afw::image::Wcs
const& distortedWcs,
57 afw::image::Wcs
const& tanWcs
61 afw::image::Wcs
const& tanWcs
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");
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)");
133 lsst::afw::table::SimpleCatalog
const &posRefCat,
134 lsst::afw::table::SourceCatalog
const &sourceCat,
135 MatchOptimisticBControl
const &control,
136 afw::image::Wcs
const& wcs,
lsst::afw::geom::Point2D position
int numPointsForShape
"number of points in a matching shape" ;
double matchingAllowancePix
"maximum allowed distance between reference objects and sources (pixels)" ;
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()
bool operator!=(RecordProxy const &other) const
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...
double maxDeterminant
"?" ;
MatchOptimisticBControl()
double maxOffsetPix
"maximum allowed frame translation (pixels)" ;
int numBrightStars
"maximum number of bright reference stars to use" ;
std::string refFluxField
"name of flux field in reference catalog" ;
A wrapper around a SimpleRecord or SourceRecord that allows us to record a pixel position in a way th...
bool operator==(RecordProxy const &other) const
double maxRotationDeg
"maximum allowed frame rotation (deg)" ;
ProxyVector makeProxies(lsst::afw::table::SourceCatalog const &sourceCat, afw::image::Wcs const &distortedWcs, afw::image::Wcs const &tanWcs)
std::string sourceFluxField
"name of flux field in source catalog" ;
double allowedNonperpDeg
"allowed non-perpendicularity of x and y axes (deg)" ;
int minMatchedPairs
"minimum number of matches" ;
boost::shared_ptr< lsst::afw::table::SimpleRecord > record