LSST Applications 24.1.6,g063fba187b+56b85ce14a,g0f08755f38+df8a265115,g12f32b3c4e+891a09f10d,g1524ad2192+7a5d7b3fbd,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g28da252d5a+07cb1400be,g2bbee38e9b+ae03bbfc84,g2bc492864f+ae03bbfc84,g3156d2b45e+6e55a43351,g347aa1857d+ae03bbfc84,g35bb328faa+a8ce1bb630,g3a166c0a6a+ae03bbfc84,g3e281a1b8c+c5dd892a6c,g414038480c+6b9177ef31,g41af890bb2+8f257c4c0b,g781aacb6e4+a8ce1bb630,g7af13505b9+7137b3b17d,g80478fca09+6df6903293,g82479be7b0+091ce1d07f,g858d7b2824+df8a265115,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,g9726552aa6+414189b318,ga5288a1d22+4a2bca08d7,gacef1a1666+c9a8ff65f4,gb58c049af0+d64f4d3760,gbcfae0f0a0+de1d42d831,gc28159a63d+ae03bbfc84,gcf0d15dbbd+72117bf34e,gda6a2b7d83+72117bf34e,gdaeeff99f8+1711a396fd,ge500cccec5+c8c9c9af63,ge79ae78c31+ae03bbfc84,gf0baf85859+c1f95f4921,gfa517265be+df8a265115,gfa999e8aa5+17cd334064,gfb92a5be7c+df8a265115
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
lsst::afw::geom::ellipses::BaseCore::Transformer Class Referencefinal

A temporary-only expression object for ellipse core transformations. More...

#include <Transformer.h>

Public Types

using DerivativeMatrix = Eigen::Matrix3d
 Matrix type for derivative with respect to input ellipse parameters.
 
using TransformDerivativeMatrix = Eigen::Matrix<double, 3, 4>
 Matrix type for derivative with respect to transform parameters.
 

Public Member Functions

 Transformer (BaseCore &input_, lsst::geom::LinearTransform const &transform_)
 Standard constructor.
 
std::shared_ptr< BaseCorecopy () const
 Return a new transformed ellipse core.
 
void inPlace ()
 Transform the ellipse core in-place.
 
void apply (BaseCore &result) const
 
DerivativeMatrix d () const
 Return the derivative of transformed core with respect to input core.
 
TransformDerivativeMatrix dTransform () const
 Return the derivative of transformed core with respect to transform parameters.
 

Public Attributes

BaseCoreinput
 input core to be transformed
 
lsst::geom::LinearTransform const & transform
 transform object
 

Detailed Description

A temporary-only expression object for ellipse core transformations.

Transformer simply provides a clean syntax for transform-related operations, including in-place and new-object transformations, derivatives of the transformations, and implicit conversion to a shared_ptr to a new transformed core.

Definition at line 49 of file Transformer.h.

Member Typedef Documentation

◆ DerivativeMatrix

Matrix type for derivative with respect to input ellipse parameters.

Definition at line 52 of file Transformer.h.

◆ TransformDerivativeMatrix

Matrix type for derivative with respect to transform parameters.

Definition at line 55 of file Transformer.h.

Constructor & Destructor Documentation

◆ Transformer()

lsst::afw::geom::ellipses::BaseCore::Transformer::Transformer ( BaseCore & input_,
lsst::geom::LinearTransform const & transform_ )
inline

Standard constructor.

Definition at line 58 of file Transformer.h.

59 : input(input_), transform(transform_) {}
lsst::geom::LinearTransform const & transform
transform object
Definition Transformer.h:76
BaseCore & input
input core to be transformed
Definition Transformer.h:75

Member Function Documentation

◆ apply()

void lsst::afw::geom::ellipses::BaseCore::Transformer::apply ( BaseCore & result) const

Definition at line 41 of file Transformer.cc.

41 {
42 Eigen::Matrix2d m;
43 input._assignToQuadrupole(m(0, 0), m(1, 1), m(0, 1));
44 m(1, 0) = m(0, 1);
45 m = transform.getMatrix() * m * transform.getMatrix().transpose();
46 result._assignFromQuadrupole(m(0, 0), m(1, 1), m(0, 1));
47}
py::object result
Definition _schema.cc:429
int m
Definition SpanSet.cc:48
Matrix const & getMatrix() const noexcept

◆ copy()

std::shared_ptr< BaseCore > lsst::afw::geom::ellipses::BaseCore::Transformer::copy ( ) const

Return a new transformed ellipse core.

Definition at line 33 of file Transformer.cc.

◆ d()

BaseCore::Transformer::DerivativeMatrix lsst::afw::geom::ellipses::BaseCore::Transformer::d ( ) const

Return the derivative of transformed core with respect to input core.

Definition at line 49 of file Transformer.cc.

49 {
50 std::shared_ptr<BaseCore> output(input.clone());
51 Eigen::Matrix2d m;
52 Jacobian rhs = input._dAssignToQuadrupole(m(0, 0), m(1, 1), m(0, 1));
53 m(1, 0) = m(0, 1);
54 m = transform.getMatrix() * m * transform.getMatrix().transpose();
55 Jacobian lhs = output->_dAssignFromQuadrupole(m(0, 0), m(1, 1), m(0, 1));
56 Jacobian mid = Jacobian::Zero();
67 return lhs * mid * rhs;
68}
Eigen::Matrix3d Jacobian
Parameter Jacobian matrix type.
Definition BaseCore.h:64

◆ dTransform()

BaseCore::Transformer::TransformDerivativeMatrix lsst::afw::geom::ellipses::BaseCore::Transformer::dTransform ( ) const

Return the derivative of transformed core with respect to transform parameters.

Definition at line 70 of file Transformer.cc.

70 {
71 std::shared_ptr<BaseCore> output(input.clone());
72 Eigen::Matrix2d m;
73 input._assignToQuadrupole(m(0, 0), m(1, 1), m(0, 1));
74 Eigen::Matrix<double, 3, 4> mid = Eigen::Matrix<double, 3, 4>::Zero();
75 m(1, 0) = m(0, 1);
92 m = transform.getMatrix() * m * transform.getMatrix().transpose();
93 Jacobian lhs = output->_dAssignFromQuadrupole(m(0, 0), m(1, 1), m(0, 1));
94 return lhs * mid;
95}

◆ inPlace()

void lsst::afw::geom::ellipses::BaseCore::Transformer::inPlace ( )

Transform the ellipse core in-place.

Definition at line 39 of file Transformer.cc.

39{ apply(input); }

Member Data Documentation

◆ input

BaseCore& lsst::afw::geom::ellipses::BaseCore::Transformer::input

input core to be transformed

Definition at line 75 of file Transformer.h.

◆ transform

lsst::geom::LinearTransform const& lsst::afw::geom::ellipses::BaseCore::Transformer::transform

transform object

Definition at line 76 of file Transformer.h.


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