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
MatchSrcToCatalogue.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 
3 /*
4  * LSST Data Management System
5  * Copyright 2008, 2009, 2010 LSST Corporation.
6  *
7  * This product includes software developed by the
8  * LSST Project (http://www.lsst.org/).
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the LSST License Statement and
21  * the GNU General Public License along with this program. If not,
22  * see <http://www.lsstcorp.org/LegalNotices/>.
23  */
24 
25 
26 #ifndef MATCH_SRC_TO_CATALOGUE
27 #define MATCH_SRC_TO_CATALOGUE
28 
29 #include <iostream>
30 #include <cmath>
31 
32 #include "lsst/base.h"
34 #include "lsst/afw/table/Match.h"
35 #include "lsst/afw/geom/Angle.h"
36 
37 namespace lsst {
38  namespace afw {
39  namespace image {
40  class Wcs;
41  }
42  }
43 namespace meas {
44 namespace astrom {
45 namespace sip {
46 
59 public:
60 
61  typedef boost::shared_ptr<MatchSrcToCatalogue> Ptr;
62  typedef boost::shared_ptr<MatchSrcToCatalogue const> ConstPtr;
63 
65  afw::table::SourceCatalog const& imgSet,
67  afw::geom::Angle dist
68  );
69 
70  //Mutators
71  void setDist(afw::geom::Angle dist);
73  void setCatSrcSet(afw::table::SimpleCatalog const & catSet);
74  void setImgSrcSet(afw::table::SourceCatalog const & srcSet);
75 
76  void findMatches();
77 
78  //Accessors
80 
81 
82 private:
87  lsst::afw::geom::Angle _dist;
88 
89  void _removeOneToMany();
90  void _removeManyToOne();
91 };
92 
93 
94 
95 }}}}
96 
97 #endif
98 
99 
100 
boost::shared_ptr< MatchSrcToCatalogue const > ConstPtr
afw::table::SimpleCatalog _catSet
Copy of input catalog.
lsst::afw::geom::Angle Angle
Definition: misc.h:39
lsst::afw::geom::Angle _dist
How close must two objects be to match.
afw::table::ReferenceMatchVector _match
tbl::Key< int > wcs
std::vector< ReferenceMatch > ReferenceMatchVector
Definition: fwd.h:97
Implementation of the WCS standard for a any projection.
Definition: Wcs.h:107
void setWcs(boost::shared_ptr< afw::image::Wcs const > wcs)
Set a different Wcs solution.
table::Key< table::Array< Kernel::Pixel > > image
Definition: FixedKernel.cc:117
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.
boost::shared_ptr< lsst::afw::image::Wcs const > _wcs
List of tuples of matching indices.
Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID.
Definition: fwd.h:55
void setDist(afw::geom::Angle dist)
Set a new value for the maximum allowed distance between two matching objects (in ra/dec space) ...
afw::table::ReferenceMatchVector getMatches()
boost::shared_ptr< MatchSrcToCatalogue > Ptr
void setImgSrcSet(afw::table::SourceCatalog const &srcSet)
sourceSet is a vector of pointers to Sources.
#define CONST_PTR(...)
Definition: base.h:47
afw::table::SourceCatalog _imgSet
Copy of input catalog.
void setCatSrcSet(afw::table::SimpleCatalog const &catSet)