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);
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
lsst::geom::Point2D skyToPixel(lsst::geom::SpherePoint const &sky) const
Compute pixel position(s) from sky position(s)
lsst::geom::SpherePoint pixelToSky(lsst::geom::Point2D const &pixel) const
Compute sky position(s) from pixel position(s)
void updateRefCentroids(geom::SkyWcs const &wcs, ReferenceCollection &refList)
Update centroids in a collection of reference objects.
table::Key< table::Array< std::uint8_t > > wcs
void updateSourceCoords(geom::SkyWcs const &wcs, SourceCollection &sourceList)
Update sky coordinates in a collection of source objects.
A base class for image defects.
Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID.
const char * source()
Source function that allows astChannel to source from a Stream.
T Value
the type returned by BaseRecord::get
Key specialization for Flag.
A FunctorKey used to get or set celestial coordinates from a pair of lsst::geom::Angle keys...
T emplace_back(T... args)