24 #ifndef LSST_MEAS_ALGORITHMS_PcaPsf_h_INCLUDED 25 #define LSST_MEAS_ALGORITHMS_PcaPsf_h_INCLUDED 32 namespace algorithms {
59 virtual std::string getPersistenceName()
const {
return "PcaPsf"; }
63 template <
class Archive>
64 void serialize(Archive&,
unsigned int const) {
65 boost::serialization::void_cast_register<PcaPsf, afw::detection::Psf>(
66 static_cast<PcaPsf*
>(0), static_cast<afw::detection::Psf*>(0));
75 namespace serialization {
77 template <
class Archive>
80 ar << make_nvp(
"kernel", kernel);
82 ar << make_nvp(
"averagePositionX", averagePosition.getX());
83 ar << make_nvp(
"averagePositionY", averagePosition.getY());
86 template <
class Archive>
89 ar >> make_nvp(
"kernel", kernel);
90 double x = 0.0,
y = 0.0;
91 ar >> make_nvp(
"averagePositionX", x);
92 ar >> make_nvp(
"averagePositionY",
y);
100 #endif // !LSST_MEAS_ALGORITHMS_PcaPsf_h_INCLUDED
virtual boost::shared_ptr< afw::detection::Psf > resized(int width, int height) const
Return a clone with specified kernel dimensions.
A Psf defined by a Kernel.
virtual boost::shared_ptr< afw::detection::Psf > clone() const
Polymorphic deep copy; should usually be unnecessary as Psfs are immutable.x.
friend class boost::serialization::access
Represent a PSF as a linear combination of PCA (== Karhunen-Loeve) basis functions.
virtual geom::Point2D getAveragePosition() const
Return average position of stars; used as default position.
afw::table::PointKey< double > averagePosition
void load_construct_data(Archive &ar, lsst::afw::math::DeltaFunctionKernel *k, unsigned int const file_version)
void save_construct_data(Archive &ar, lsst::afw::math::DeltaFunctionKernel const *k, unsigned int const file_version)
PcaPsf(boost::shared_ptr< afw::math::LinearCombinationKernel > kernel, geom::Point2D const &averagePosition=geom::Point2D())
Constructor for a PcaPsf.
boost::shared_ptr< afw::math::LinearCombinationKernel const > getKernel() const
PcaPsf always has a LinearCombinationKernel, so we can override getKernel to make it more useful...