Loading [MathJax]/extensions/tex2jax.js
LSST Applications g04a91732dc+a3f7a6a005,g07dc498a13+5ab4d22ec3,g0fba68d861+870ee37b31,g1409bbee79+5ab4d22ec3,g1a7e361dbc+5ab4d22ec3,g1fd858c14a+11200c7927,g20f46db602+25d63fd678,g35bb328faa+fcb1d3bbc8,g4d2262a081+cc8af5cafb,g4d39ba7253+6b9d64fe03,g4e0f332c67+5d362be553,g53246c7159+fcb1d3bbc8,g60b5630c4e+6b9d64fe03,g78460c75b0+2f9a1b4bcd,g786e29fd12+cf7ec2a62a,g7b71ed6315+fcb1d3bbc8,g8048e755c2+a1301e4c20,g8852436030+a750987b4a,g89139ef638+5ab4d22ec3,g89e1512fd8+a86d53a4aa,g8d6b6b353c+6b9d64fe03,g9125e01d80+fcb1d3bbc8,g989de1cb63+5ab4d22ec3,g9f33ca652e+38ca901d1a,ga9baa6287d+6b9d64fe03,gaaedd4e678+5ab4d22ec3,gabe3b4be73+1e0a283bba,gb1101e3267+aa269f591c,gb58c049af0+f03b321e39,gb90eeb9370+af74afe682,gc741bbaa4f+7f5db660ea,gcf25f946ba+a750987b4a,gd315a588df+b78635c672,gd6cbbdb0b4+c8606af20c,gd9a9a58781+fcb1d3bbc8,gde0f65d7ad+5839af1903,ge278dab8ac+932305ba37,ge82c20c137+76d20ab76d,w.2025.11
LSST Data Management Base Package
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
PsfTrampoline< Base > Class Template Reference

"Trampoline" for Psf to let it be used as a base class in Python. More...

#include <python.h>

Inheritance diagram for PsfTrampoline< Base >:
lsst::afw::typehandling::StorableHelper< Base > lsst::afw::typehandling::Storable lsst::afw::table::io::Persistable lsst::meas::algorithms::ImagePsfTrampoline< Base >

Public Types

using Image = typename Base::Image
 

Public Member Functions

template<typename... Args>
 PsfTrampoline (Args... args)
 Delegating constructor for wrapped class.
 
std::shared_ptr< Psf > clone () const override
 
std::shared_ptr< Psf > resized (int width, int height) const override
 
lsst::geom::Point2D getAveragePosition () const override
 
std::shared_ptr< ImagedoComputeImage (lsst::geom::Point2D const &position, image::Color const &color) const override
 
lsst::geom::Box2I doComputeImageBBox (lsst::geom::Point2D const &position, image::Color const &color) const override
 
std::shared_ptr< ImagedoComputeKernelImage (lsst::geom::Point2D const &position, image::Color const &color) const override
 
double doComputeApertureFlux (double radius, lsst::geom::Point2D const &position, image::Color const &color) const override
 
geom::ellipses::Quadrupole doComputeShape (lsst::geom::Point2D const &position, image::Color const &color) const override
 
lsst::geom::Box2I doComputeBBox (lsst::geom::Point2D const &position, image::Color const &color) const override
 

Detailed Description

template<typename Base = Psf>
class PsfTrampoline< Base >

"Trampoline" for Psf to let it be used as a base class in Python.

Subclasses of Psf that are wrapped in pybind11 should have a similar helper that subclasses PsfTrampoline<subclass>. This helper can be skipped if the subclass neither adds any virtual methods nor implements any abstract methods.

Template Parameters
Basethe exact (most specific) class being wrapped
See also
pybind11 documentation

Definition at line 50 of file python.h.

Member Typedef Documentation

◆ Image

template<typename Base = Psf>
using lsst::afw::detection::PsfTrampoline< Base >::Image = typename Base::Image

Definition at line 52 of file python.h.

Constructor & Destructor Documentation

◆ PsfTrampoline()

template<typename Base = Psf>
template<typename... Args>
lsst::afw::detection::PsfTrampoline< Base >::PsfTrampoline ( Args... args)
inlineexplicit

Delegating constructor for wrapped class.

While we would like to simply inherit base class constructors, when doing so, we cannot change their access specifiers. One consequence is that it's not possible to use inheritance to expose a protected constructor to python. The alternative, used here, is to create a new public constructor that delegates to the base class public or protected constructor with the same signature.

Template Parameters
ArgsVariadic type specification
Parameters
...argsArguments to forward to the Base class constructor.

Definition at line 1 of file python.h.

"Trampoline" for Psf to let it be used as a base class in Python.
Definition python.h:50
StorableHelper(Args... args)
Delegating constructor for wrapped class.
Definition python.h:71

Member Function Documentation

◆ clone()

template<typename Base = Psf>
std::shared_ptr< Psf > lsst::afw::detection::PsfTrampoline< Base >::clone ( ) const
inlineoverride

Definition at line 69 of file python.h.

69 {
70 /* __deepcopy__ takes an optional dict, but PYBIND11_OVERLOAD_* won't
71 * compile unless you give it arguments that work for the C++ method
72 */
74 }
std::shared_ptr< Psf > clone() const override
Definition python.h:69

◆ doComputeApertureFlux()

template<typename Base = Psf>
double lsst::afw::detection::PsfTrampoline< Base >::doComputeApertureFlux ( double radius,
lsst::geom::Point2D const & position,
image::Color const & color ) const
inlineoverride

Definition at line 112 of file python.h.

115 {
117 double, Base, "_doComputeApertureFlux", doComputeApertureFlux, radius, position, color
118 );
119 }
double doComputeApertureFlux(double radius, lsst::geom::Point2D const &position, image::Color const &color) const override
Definition python.h:112

◆ doComputeBBox()

template<typename Base = Psf>
lsst::geom::Box2I lsst::afw::detection::PsfTrampoline< Base >::doComputeBBox ( lsst::geom::Point2D const & position,
image::Color const & color ) const
inlineoverride

Definition at line 130 of file python.h.

133 {
136 );
137 }
lsst::geom::Box2I doComputeBBox(lsst::geom::Point2D const &position, image::Color const &color) const override
Definition python.h:130

◆ doComputeImage()

template<typename Base = Psf>
std::shared_ptr< Image > lsst::afw::detection::PsfTrampoline< Base >::doComputeImage ( lsst::geom::Point2D const & position,
image::Color const & color ) const
inlineoverride

Definition at line 85 of file python.h.

88 {
91 );
92 }
std::shared_ptr< Image > doComputeImage(lsst::geom::Point2D const &position, image::Color const &color) const override
Definition python.h:85

◆ doComputeImageBBox()

template<typename Base = Psf>
lsst::geom::Box2I lsst::afw::detection::PsfTrampoline< Base >::doComputeImageBBox ( lsst::geom::Point2D const & position,
image::Color const & color ) const
inlineoverride

Definition at line 94 of file python.h.

97 {
99 lsst::geom::Box2I, Base, "_doComputeImageBBox", doComputeImageBBox, position, color
100 );
101 }
lsst::geom::Box2I doComputeImageBBox(lsst::geom::Point2D const &position, image::Color const &color) const override
Definition python.h:94

◆ doComputeKernelImage()

template<typename Base = Psf>
std::shared_ptr< Image > lsst::afw::detection::PsfTrampoline< Base >::doComputeKernelImage ( lsst::geom::Point2D const & position,
image::Color const & color ) const
inlineoverride

Definition at line 103 of file python.h.

106 {
109 );
110 }
std::shared_ptr< Image > doComputeKernelImage(lsst::geom::Point2D const &position, image::Color const &color) const override
Definition python.h:103

◆ doComputeShape()

template<typename Base = Psf>
geom::ellipses::Quadrupole lsst::afw::detection::PsfTrampoline< Base >::doComputeShape ( lsst::geom::Point2D const & position,
image::Color const & color ) const
inlineoverride

Definition at line 121 of file python.h.

124 {
127 );
128 }
geom::ellipses::Quadrupole doComputeShape(lsst::geom::Point2D const &position, image::Color const &color) const override
Definition python.h:121

◆ getAveragePosition()

template<typename Base = Psf>
lsst::geom::Point2D lsst::afw::detection::PsfTrampoline< Base >::getAveragePosition ( ) const
inlineoverride

Definition at line 80 of file python.h.

80 {
82 }
lsst::geom::Point2D getAveragePosition() const override
Definition python.h:80

◆ resized()

template<typename Base = Psf>
std::shared_ptr< Psf > lsst::afw::detection::PsfTrampoline< Base >::resized ( int width,
int height ) const
inlineoverride

Definition at line 76 of file python.h.

76 {
78 }
std::shared_ptr< Psf > resized(int width, int height) const override
Definition python.h:76

The documentation for this class was generated from the following file: