LSST Applications
21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
|
This is an auxillary class for matching objects from starlists. More...
#include <FastFinder.h>
Classes | |
class | Iterator |
Iterator meant to traverse objects within some limiting distance. More... | |
Public Member Functions | |
FastFinder (const BaseStarList &list, const unsigned nXSlice=100) | |
Constructor. More... | |
std::shared_ptr< const BaseStar > | findClosest (const Point &where, const double maxDist, bool(*SkipIt)(const BaseStar &)=nullptr) const |
Find the closest with some rejection capability. More... | |
std::shared_ptr< const BaseStar > | secondClosest (const Point &where, const double maxDist, std::shared_ptr< const BaseStar > &closest, bool(*SkipIt)(const BaseStar &)=nullptr) const |
void | print (std::ostream &out) const |
mostly for debugging More... | |
Iterator | beginScan (const Point &where, double maxDist) const |
void | findRangeInSlice (const int iSlice, const double yStart, const double yEnd, pstar &start, pstar &end) const |
pstar | locateYStart (pstar begin, pstar end, double yVal) const |
pstar | locateYEnd (pstar begin, pstar end, double yVal) const |
Public Attributes | |
decltype(stars) typedef ::value_type | stars_element |
decltype(stars) typedef ::const_iterator | pstar |
const BaseStarList | baselist |
unsigned | count |
std::vector< std::shared_ptr< const BaseStar > > | stars |
unsigned | nslice |
std::vector< unsigned > | index |
double | xmin |
double | xmax |
double | xstep |
This is an auxillary class for matching objects from starlists.
It allows to locate rapidly the closest objects from a given position. The very simple strategy is to sort objects according to 1 coordinate x, and to build an index that allows to select the objects with the x coordinate inside an interval. Then every slice in x is sorted according to y, which enables a fast scan inside a x slice. listMatchCollect takes about 10ms (PC 450 MHz, optimized "-O4") for a match between lists of about 2000 objects each, which is fast enough for our needs. The same "locator" is used in listMatchupShift, to avoid scanning the whole input lists. Timing on listMatchCollect and listMatchupShift indicates a gain in speed by more than one order of magnitude after implementation of this FastFinder. Fast locator in starlists.
Definition at line 54 of file FastFinder.h.
lsst::jointcal::FastFinder::FastFinder | ( | const BaseStarList & | list, |
const unsigned | nXSlice = 100 |
||
) |
Constructor.
Definition at line 38 of file FastFinder.cc.
FastFinder::Iterator lsst::jointcal::FastFinder::beginScan | ( | const Point & | where, |
double | maxDist | ||
) | const |
Definition at line 174 of file FastFinder.cc.
std::shared_ptr< const BaseStar > lsst::jointcal::FastFinder::findClosest | ( | const Point & | where, |
const double | maxDist, | ||
bool(*)(const BaseStar &) | SkipIt = nullptr |
||
) | const |
Find the closest with some rejection capability.
Definition at line 83 of file FastFinder.cc.
void lsst::jointcal::FastFinder::findRangeInSlice | ( | const int | iSlice, |
const double | yStart, | ||
const double | yEnd, | ||
pstar & | start, | ||
pstar & | end | ||
) | const |
Definition at line 168 of file FastFinder.cc.
FastFinder::pstar lsst::jointcal::FastFinder::locateYEnd | ( | pstar | begin, |
pstar | end, | ||
double | yVal | ||
) | const |
Definition at line 152 of file FastFinder.cc.
FastFinder::pstar lsst::jointcal::FastFinder::locateYStart | ( | pstar | begin, |
pstar | end, | ||
double | yVal | ||
) | const |
Definition at line 134 of file FastFinder.cc.
void lsst::jointcal::FastFinder::print | ( | std::ostream & | out | ) | const |
mostly for debugging
Definition at line 77 of file FastFinder.cc.
std::shared_ptr< const BaseStar > lsst::jointcal::FastFinder::secondClosest | ( | const Point & | where, |
const double | maxDist, | ||
std::shared_ptr< const BaseStar > & | closest, | ||
bool(*)(const BaseStar &) | SkipIt = nullptr |
||
) | const |
Definition at line 101 of file FastFinder.cc.
const BaseStarList lsst::jointcal::FastFinder::baselist |
Definition at line 56 of file FastFinder.h.
unsigned lsst::jointcal::FastFinder::count |
Definition at line 58 of file FastFinder.h.
std::vector<unsigned> lsst::jointcal::FastFinder::index |
Definition at line 66 of file FastFinder.h.
unsigned lsst::jointcal::FastFinder::nslice |
Definition at line 65 of file FastFinder.h.
decltype(stars) typedef ::const_iterator lsst::jointcal::FastFinder::pstar |
Definition at line 70 of file FastFinder.h.
std::vector<std::shared_ptr<const BaseStar> > lsst::jointcal::FastFinder::stars |
Definition at line 64 of file FastFinder.h.
decltype(stars) typedef ::value_type lsst::jointcal::FastFinder::stars_element |
Definition at line 69 of file FastFinder.h.
double lsst::jointcal::FastFinder::xmax |
Definition at line 67 of file FastFinder.h.
double lsst::jointcal::FastFinder::xmin |
Definition at line 67 of file FastFinder.h.
double lsst::jointcal::FastFinder::xstep |
Definition at line 67 of file FastFinder.h.