41 Schema getSchema(BaseRecord
const &record) {
return record.getSchema(); }
47 template <
typename Key>
48 inline typename Key::Value getValue(BaseRecord
const &record, Key
const &key) {
49 return record.get(key);
53 template <
typename Key>
55 return record->
get(key);
59 template <
typename Key>
60 inline void setValue(SimpleRecord &record, Key
const &key,
typename Key::Value const &value) {
61 record.set(key, value);
65 template <
typename Key>
67 record->set(key, value);
72 template <
typename ReferenceCollection>
74 if (refList.empty()) {
77 auto const schema = getSchema(refList[0]);
82 skyList.
reserve(refList.size());
83 for (
auto const &record : refList) {
87 auto pixelPos = pixelList.
cbegin();
88 for (
auto &refObj : refList) {
89 setValue(refObj, centroidKey, *pixelPos);
90 setValue(refObj, hasCentroidKey,
true);
95 template <
typename SourceCollection>
97 if (sourceList.empty()) {
100 auto const schema = getSchema(sourceList[0]);
104 pixelList.
reserve(sourceList.size());
105 for (
auto const &
source : sourceList) {
109 auto skyCoord = skyList.
cbegin();
110 for (
auto &
source : sourceList) {
111 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)
SortedCatalogT< SourceRecord > SourceCatalog
SortedCatalogT< SimpleRecord > SimpleCatalog
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.
A base class for image defects.
T Value
the type returned by BaseRecord::get