LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
#include <MatchSrcToCatalogue.h>
Public Types | |
typedef boost::shared_ptr < MatchSrcToCatalogue > | Ptr |
typedef boost::shared_ptr < MatchSrcToCatalogue const > | ConstPtr |
Public Member Functions | |
MatchSrcToCatalogue (afw::table::SimpleCatalog const &catSet, afw::table::SourceCatalog const &imgSet, boost::shared_ptr< afw::image::Wcs const > wcs, afw::geom::Angle dist) | |
Create a list of common objects from a catalogue and an image. More... | |
void | setDist (afw::geom::Angle dist) |
Set a new value for the maximum allowed distance between two matching objects (in ra/dec space) More... | |
void | setWcs (boost::shared_ptr< afw::image::Wcs const > wcs) |
Set a different Wcs solution. More... | |
void | setCatSrcSet (afw::table::SimpleCatalog const &catSet) |
void | setImgSrcSet (afw::table::SourceCatalog const &srcSet) |
sourceSet is a vector of pointers to Sources. More... | |
void | findMatches () |
afw::table::ReferenceMatchVector | getMatches () |
Private Member Functions | |
void | _removeOneToMany () |
void | _removeManyToOne () |
Private Attributes | |
afw::table::SimpleCatalog | _catSet |
Copy of input catalog. More... | |
afw::table::SourceCatalog | _imgSet |
Copy of input catalog. More... | |
afw::table::ReferenceMatchVector | _match |
boost::shared_ptr < lsst::afw::image::Wcs const > | _wcs |
List of tuples of matching indices. More... | |
lsst::afw::geom::Angle | _dist |
How close must two objects be to match. More... | |
Match a SourceSet of objects with known ra/dec with a SourceSet of objects with known xy positions Take a catalogue of objects with known positions, a catalogue of objects with known xy, and a wcs to convert one xy <–> ra/dec. This class then finds the set of objects with common ra/dec.
The simplest usage is to create an object of this class, then access the corresponence sets with getMatchedImgSet() and getMatchedCatSet(). Creating the object automatically calculates the sets of corresponences for you. If you are unhappy with these matches, you can change one or more of your input arguments and redo the match with findMatches()
Using this class has the side effect of updating the coord field of the input SourceCatalog (which may be desirable).
Definition at line 58 of file MatchSrcToCatalogue.h.
typedef boost::shared_ptr<MatchSrcToCatalogue const> lsst::meas.astrom.sip::MatchSrcToCatalogue::ConstPtr |
Definition at line 62 of file MatchSrcToCatalogue.h.
typedef boost::shared_ptr<MatchSrcToCatalogue> lsst::meas.astrom.sip::MatchSrcToCatalogue::Ptr |
Definition at line 61 of file MatchSrcToCatalogue.h.
lsst::meas.astrom.sip::MatchSrcToCatalogue::MatchSrcToCatalogue | ( | afw::table::SimpleCatalog const & | catSet, |
afw::table::SourceCatalog const & | imgSet, | ||
boost::shared_ptr< afw::image::Wcs const > | wcs, | ||
afw::geom::Angle | dist | ||
) |
Create a list of common objects from a catalogue and an image.
Take a catSet, i.e a SimpleCatalog giving the true positions of objects in ra/dec space, and an imageSet, i.e. a SourceCatalog of the pixel positions of sources detected on a CCD image. Use the Wcs to calculate the ra/dec of the image source, and then find the subset of objects withcommon positions in the two sets. The returned list of matches is one-to-one, i.e no object in the catalogue is matched twice, and no object in the imageSet is matched twice.
catSet | List of catalogue positions with known ra and dec |
imgSet | List of image positions with known x and y |
wcs | A Wcs object to convert from xy to radec |
dist | How close to objects need to be in order to be considered the same |
Definition at line 45 of file MatchSrcToCatalogue.cc.
|
private |
This function is identical to _removeOneToMany() except first is replaced with second for the match structures
Definition at line 125 of file MatchSrcToCatalogue.cc.
|
private |
We require that out matches be one to one, i.e any element matches no more than once for either the catalogue or the image. However, our implementation of findMatches uses afw::table::matchRaDec() which does not garauntee that. This function does the (slow) search and removal.
Definition at line 100 of file MatchSrcToCatalogue.cc.
void lsst::meas.astrom.sip::MatchSrcToCatalogue::findMatches | ( | ) |
Definition at line 78 of file MatchSrcToCatalogue.cc.
afw::table::ReferenceMatchVector lsst::meas.astrom.sip::MatchSrcToCatalogue::getMatches | ( | ) |
Definition at line 148 of file MatchSrcToCatalogue.cc.
void lsst::meas.astrom.sip::MatchSrcToCatalogue::setCatSrcSet | ( | afw::table::SimpleCatalog const & | catSet | ) |
Definition at line 74 of file MatchSrcToCatalogue.cc.
void lsst::meas.astrom.sip::MatchSrcToCatalogue::setDist | ( | afw::geom::Angle | dist | ) |
Set a new value for the maximum allowed distance between two matching objects (in ra/dec space)
Definition at line 57 of file MatchSrcToCatalogue.cc.
void lsst::meas.astrom.sip::MatchSrcToCatalogue::setImgSrcSet | ( | afw::table::SourceCatalog const & | srcSet | ) |
sourceSet is a vector of pointers to Sources.
Definition at line 70 of file MatchSrcToCatalogue.cc.
void lsst::meas.astrom.sip::MatchSrcToCatalogue::setWcs | ( | boost::shared_ptr< afw::image::Wcs const > | wcs | ) |
Set a different Wcs solution.
Definition at line 65 of file MatchSrcToCatalogue.cc.
|
private |
Copy of input catalog.
Definition at line 83 of file MatchSrcToCatalogue.h.
|
private |
How close must two objects be to match.
Definition at line 87 of file MatchSrcToCatalogue.h.
|
private |
Copy of input catalog.
Definition at line 84 of file MatchSrcToCatalogue.h.
|
private |
Definition at line 85 of file MatchSrcToCatalogue.h.
|
private |
List of tuples of matching indices.
Definition at line 86 of file MatchSrcToCatalogue.h.