LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
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 Types | |
using | stars_element = decltype(stars)::value_type |
using | pstar = decltype(stars)::const_iterator |
Public Member Functions | |
FastFinder (const BaseStarList &list, unsigned nXSlice=100) | |
Constructor. | |
std::shared_ptr< const BaseStar > | findClosest (const Point &where, double maxDist, bool(*SkipIt)(const BaseStar &)=nullptr) const |
Find the closest with some rejection capability. | |
std::shared_ptr< const BaseStar > | secondClosest (const Point &where, double maxDist, std::shared_ptr< const BaseStar > &closest, bool(*SkipIt)(const BaseStar &)=nullptr) const |
void | print (std::ostream &out) const |
mostly for debugging | |
Iterator | beginScan (const Point &where, double maxDist) const |
void | findRangeInSlice (int iSlice, double yStart, 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 | |
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.
using lsst::jointcal::FastFinder::pstar = decltype(stars)::const_iterator |
Definition at line 70 of file FastFinder.h.
using lsst::jointcal::FastFinder::stars_element = decltype(stars)::value_type |
Definition at line 69 of file FastFinder.h.
lsst::jointcal::FastFinder::FastFinder | ( | const BaseStarList & | list, |
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, |
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 | ( | int | iSlice, |
double | yStart, | ||
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, |
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.
std::vector<std::shared_ptr<const BaseStar> > lsst::jointcal::FastFinder::stars |
Definition at line 64 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.