40Schema getSchema(BaseRecord
const &record) {
return record.getSchema(); }
46template <
typename Key>
47inline typename Key::Value getValue(BaseRecord
const &record, Key
const &key) {
48 return record.get(key);
52template <
typename Key>
54 return record->
get(key);
58template <
typename Key>
59inline void setValue(SimpleRecord &record, Key
const &key,
typename Key::Value const &value) {
60 record.set(key, value);
64template <
typename Key>
66 record->set(key, value);
71template <
typename ReferenceCollection>
73 if (refList.empty()) {
76 auto const schema = getSchema(refList[0]);
81 skyList.
reserve(refList.size());
82 for (
auto const &record : refList) {
86 auto pixelPos = pixelList.
cbegin();
87 for (
auto &refObj : refList) {
88 setValue(refObj, centroidKey, *pixelPos);
89 setValue(refObj, hasCentroidKey,
true);
94template <
typename SourceCollection>
96 if (sourceList.empty()) {
99 auto const schema = getSchema(sourceList[0]);
103 pixelList.
reserve(sourceList.size());
104 for (
auto const &
source : sourceList) {
108 auto skyCoord = skyList.
cbegin();
109 for (
auto &
source : sourceList) {
110 setValue(
source, coordKey, *skyCoord);
table::Key< table::Array< std::uint8_t > > wcs
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
A FunctorKey used to get or set celestial coordinates from a pair of lsst::geom::Angle keys.
Key specialization for Flag.
T emplace_back(T... args)
void updateRefCentroids(geom::SkyWcs const &wcs, ReferenceCollection &refList)
Update centroids in a collection of reference objects.
void updateSourceCoords(geom::SkyWcs const &wcs, SourceCollection &sourceList)
Update sky coordinates in a collection of source objects.
SortedCatalogT< SourceRecord > SourceCatalog
SortedCatalogT< SimpleRecord > SimpleCatalog
T Value
the type returned by BaseRecord::get