41Schema getSchema(BaseRecord
const &record) {
return record.getSchema(); }
47template <
typename Key>
48inline typename Key::Value getValue(BaseRecord
const &record, Key
const &key) {
49 return record.get(key);
53template <
typename Key>
55 return record->
get(key);
59template <
typename Key>
60inline void setValue(SimpleRecord &record, Key
const &key,
typename Key::Value const &value) {
61 record.set(key, value);
65template <
typename Key>
67 record->set(key, value);
72template <
typename ReferenceCollection>
83 for (
auto const &record :
refList) {
84 skyList.emplace_back(getValue(record, coordKey));
96 Eigen::Matrix2f
err) {
98 return Eigen::Matrix2f::Constant(
NAN);
104 const static double scale = 1.0 / 3600.0;
105 const static Eigen::Matrix2d
cdMatrix{{scale, 0}, {0, scale}};
114 Eigen::Matrix2f
skyCov = d *
err * d.transpose();
124template <
typename SourceCollection>
152 setValue(source, coordKey, *
skyCoord);
167 bool include_covariance);
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...
Tag types used to declare specialized field types.
A FunctorKey used to get or set celestial coordinates from a pair of lsst::geom::Angle keys.
static ErrorKey getErrorKey(Schema const &schema)
std::shared_ptr< SkyWcs > makeSkyWcs(daf::base::PropertySet &metadata, bool strip=false)
Construct a SkyWcs from FITS keywords.
void updateRefCentroids(geom::SkyWcs const &wcs, ReferenceCollection &refList)
Update centroids in a collection of reference objects.
Eigen::Matrix2f calculateCoordCovariance(geom::SkyWcs const &wcs, lsst::geom::Point2D center, Eigen::Matrix2f err)
Calculate covariance for sky coordinates.
void updateSourceCoords(geom::SkyWcs const &wcs, SourceCollection &sourceList, bool include_covariance=true)
Update sky coordinates in a collection of source objects.
T Value
the type returned by BaseRecord::get