LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
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>
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>
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);
Field< T >::Value get(Key< T > const &key) const
Return the value of a field for the given key.
table::Key< table::Array< std::uint8_t > > wcs
A FunctorKey used to get or set celestial coordinates from a pair of lsst::geom::Angle keys.
SortedCatalogT< SimpleRecord > SimpleCatalog
SortedCatalogT< SourceRecord > SourceCatalog
const char * source()
Source function that allows astChannel to source from a Stream.
void updateSourceCoords(geom::SkyWcs const &wcs, SourceCollection &sourceList)
Update sky coordinates in a collection of source objects.
A base class for image defects.
T emplace_back(T... args)
Schema getSchema() const
Return the Schema that holds this record's fields and keys.
void updateRefCentroids(geom::SkyWcs const &wcs, ReferenceCollection &refList)
Update centroids in a collection of reference objects.
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Key specialization for Flag.