LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
lsst::afw::geom::ellipses::ConformalShear Class Reference

A logarithmic complex ellipticity with magnitude \(|e| = \ln (a/b) \). More...

#include <ConformalShear.h>

Inheritance diagram for lsst::afw::geom::ellipses::ConformalShear:
lsst::afw::geom::ellipses::detail::EllipticityBase

Public Types

enum  ParameterEnum { E1 = 0 , E2 = 1 }
 
using Jacobian = Eigen::Matrix2d
 

Public Member Functions

 ConformalShear (std::complex< double > const &complex)
 
 ConformalShear (double e1=0.0, double e2=0.0)
 
 ConformalShear (ConformalShear const &other)
 
 ConformalShear (ConformalShear &&other)
 
 ~ConformalShear ()=default
 
 ConformalShear (Distortion const &other)
 
 ConformalShear (ReducedShear const &other)
 
ConformalShearoperator= (ConformalShear const &other)
 
ConformalShearoperator= (ConformalShear &&other)
 
ConformalShearoperator= (Distortion const &other)
 
ConformalShearoperator= (ReducedShear const &other)
 
Jacobian dAssign (ConformalShear const &other)
 
Jacobian dAssign (Distortion const &other)
 
Jacobian dAssign (ReducedShear const &other)
 
double getAxisRatio () const
 
void normalize ()
 
std::complex< double > & getComplex ()
 
std::complex< double > const & getComplex () const
 
void setComplex (std::complex< double > const &v)
 
double getE1 () const
 
void setE1 (double e1)
 
double getE2 () const
 
void setE2 (double e2)
 
double getE () const
 
void setE (double e)
 
double getTheta () const
 

Static Public Member Functions

static std::string getName ()
 

Protected Attributes

std::complex< double > _complex
 

Detailed Description

A logarithmic complex ellipticity with magnitude \(|e| = \ln (a/b) \).

For a more complete definition, see Bernstein and Jarvis (2002); this the same as their conformal shear \(\eta\) (eq. 2.3-2.6).

Definition at line 45 of file ConformalShear.h.

Member Typedef Documentation

◆ Jacobian

Definition at line 47 of file EllipticityBase.h.

Member Enumeration Documentation

◆ ParameterEnum

Constructor & Destructor Documentation

◆ ConformalShear() [1/6]

lsst::afw::geom::ellipses::ConformalShear::ConformalShear ( std::complex< double > const &  complex)
inlineexplicit

Definition at line 47 of file ConformalShear.h.

47 : detail::EllipticityBase(complex) {}

◆ ConformalShear() [2/6]

lsst::afw::geom::ellipses::ConformalShear::ConformalShear ( double  e1 = 0.0,
double  e2 = 0.0 
)
inlineexplicit

Definition at line 49 of file ConformalShear.h.

49 : detail::EllipticityBase(e1, e2) {}

◆ ConformalShear() [3/6]

lsst::afw::geom::ellipses::ConformalShear::ConformalShear ( ConformalShear const &  other)
inline

Definition at line 51 of file ConformalShear.h.

51 : detail::EllipticityBase(other.getComplex()) {}

◆ ConformalShear() [4/6]

lsst::afw::geom::ellipses::ConformalShear::ConformalShear ( ConformalShear &&  other)
inline

Definition at line 53 of file ConformalShear.h.

53 : ConformalShear(other) {}
ConformalShear(std::complex< double > const &complex)

◆ ~ConformalShear()

lsst::afw::geom::ellipses::ConformalShear::~ConformalShear ( )
default

◆ ConformalShear() [5/6]

lsst::afw::geom::ellipses::ConformalShear::ConformalShear ( Distortion const &  other)
inlineexplicit

Definition at line 56 of file ConformalShear.h.

56 { this->operator=(other); }
ConformalShear & operator=(ConformalShear const &other)

◆ ConformalShear() [6/6]

lsst::afw::geom::ellipses::ConformalShear::ConformalShear ( ReducedShear const &  other)
inlineexplicit

Definition at line 58 of file ConformalShear.h.

58 { this->operator=(other); }

Member Function Documentation

◆ dAssign() [1/3]

Jacobian lsst::afw::geom::ellipses::ConformalShear::dAssign ( ConformalShear const &  other)
inline

Definition at line 71 of file ConformalShear.h.

71  {
72  _complex = other._complex;
73  return Jacobian::Identity();
74  }

◆ dAssign() [2/3]

detail::EllipticityBase::Jacobian lsst::afw::geom::ellipses::ConformalShear::dAssign ( Distortion const &  other)

Definition at line 62 of file ConformalShear.cc.

62  {
63  Jacobian result = Jacobian::Zero();
64  double delta = other.getE();
65  double alpha, beta;
66  if (delta < 1E-8) {
67  alpha = 1.0 + delta * delta / 3.0;
68  beta = 2.0 / 3.0;
69  } else {
70  double eta = std::atanh(delta);
71  alpha = eta / delta;
72  beta = (1.0 / (1.0 - delta * delta) - alpha) / (delta * delta);
73  }
74  _complex = other.getComplex() * alpha;
75  result(0, 0) = alpha + other.getE1() * other.getE1() * beta;
76  result(1, 1) = alpha + other.getE2() * other.getE2() * beta;
77  result(1, 0) = result(0, 1) = other.getE1() * other.getE2() * beta;
78  return result;
79 }
py::object result
Definition: _schema.cc:429
T atanh(T... args)

◆ dAssign() [3/3]

detail::EllipticityBase::Jacobian lsst::afw::geom::ellipses::ConformalShear::dAssign ( ReducedShear const &  other)

Definition at line 81 of file ConformalShear.cc.

81  {
82  Jacobian result = Jacobian::Zero();
83  double g = other.getE();
84  double alpha, beta;
85  if (g < 1E-8) {
86  alpha = 2.0 * (1.0 + g * g / 3.0);
87  beta = 4.0 / 3.0;
88  } else {
89  double eta = 2.0 * std::atanh(g);
90  alpha = eta / g;
91  beta = 1.0 * (2.0 / (1.0 - g * g) - alpha) / (g * g);
92  }
93  _complex = other.getComplex() * alpha;
94  result(0, 0) = alpha + other.getE1() * other.getE1() * beta;
95  result(1, 1) = alpha + other.getE2() * other.getE2() * beta;
96  result(1, 0) = result(0, 1) = other.getE1() * other.getE2() * beta;
97  return result;
98 }

◆ getAxisRatio()

double lsst::afw::geom::ellipses::ConformalShear::getAxisRatio ( ) const

Definition at line 35 of file ConformalShear.cc.

35  {
36  double e = getE();
37  return std::exp(-e);
38 }
T exp(T... args)

◆ getComplex() [1/2]

std::complex<double>& lsst::afw::geom::ellipses::detail::EllipticityBase::getComplex ( )
inlineinherited

Definition at line 51 of file EllipticityBase.h.

51 { return _complex; }

◆ getComplex() [2/2]

std::complex<double> const& lsst::afw::geom::ellipses::detail::EllipticityBase::getComplex ( ) const
inlineinherited

Definition at line 53 of file EllipticityBase.h.

53 { return _complex; }

◆ getE()

double lsst::afw::geom::ellipses::detail::EllipticityBase::getE ( ) const
inlineinherited

Definition at line 75 of file EllipticityBase.h.

75 { return std::sqrt(std::norm(_complex)); }
T norm(const T &x)
Definition: Integrate.h:160
T sqrt(T... args)

◆ getE1()

double lsst::afw::geom::ellipses::detail::EllipticityBase::getE1 ( ) const
inlineinherited

Definition at line 57 of file EllipticityBase.h.

57 { return _complex.real(); }
T real(T... args)

◆ getE2()

double lsst::afw::geom::ellipses::detail::EllipticityBase::getE2 ( ) const
inlineinherited

Definition at line 66 of file EllipticityBase.h.

66 { return _complex.imag(); }
T imag(T... args)

◆ getName()

static std::string lsst::afw::geom::ellipses::ConformalShear::getName ( )
inlinestatic

Definition at line 84 of file ConformalShear.h.

84 { return "ConformalShear"; }

◆ getTheta()

double lsst::afw::geom::ellipses::detail::EllipticityBase::getTheta ( ) const
inlineinherited

Definition at line 78 of file EllipticityBase.h.

78 { return 0.5 * std::arg(_complex); }

◆ normalize()

void lsst::afw::geom::ellipses::ConformalShear::normalize ( )
inline

Definition at line 82 of file ConformalShear.h.

82 {}

◆ operator=() [1/4]

ConformalShear& lsst::afw::geom::ellipses::ConformalShear::operator= ( ConformalShear &&  other)
inline

Definition at line 65 of file ConformalShear.h.

65 { return *this = other; }

◆ operator=() [2/4]

ConformalShear& lsst::afw::geom::ellipses::ConformalShear::operator= ( ConformalShear const &  other)
inline

Definition at line 60 of file ConformalShear.h.

60  {
61  _complex = other._complex;
62  return *this;
63  }

◆ operator=() [3/4]

ConformalShear & lsst::afw::geom::ellipses::ConformalShear::operator= ( Distortion const &  other)

Definition at line 40 of file ConformalShear.cc.

40  {
41  double delta = other.getE();
42  if (delta < 1E-8) {
43  _complex = other.getComplex() * (1.0 + delta * delta / 3.0);
44  } else {
45  double eta = std::atanh(delta);
46  _complex = other.getComplex() * eta / delta;
47  }
48  return *this;
49 }

◆ operator=() [4/4]

ConformalShear & lsst::afw::geom::ellipses::ConformalShear::operator= ( ReducedShear const &  other)

Definition at line 51 of file ConformalShear.cc.

51  {
52  double g = other.getE();
53  if (g < 1E-8) {
54  _complex = other.getComplex() * 2.0 * (1.0 + g * g / 3.0);
55  } else {
56  double eta = 2.0 * std::atanh(g);
57  _complex = other.getComplex() * eta / g;
58  }
59  return *this;
60 }

◆ setComplex()

void lsst::afw::geom::ellipses::detail::EllipticityBase::setComplex ( std::complex< double > const &  v)
inlineinherited

Definition at line 55 of file EllipticityBase.h.

55 { _complex = v; }

◆ setE()

void lsst::afw::geom::ellipses::detail::EllipticityBase::setE ( double  e)
inlineinherited

Definition at line 76 of file EllipticityBase.h.

76 { _complex *= e / getE(); }

◆ setE1()

void lsst::afw::geom::ellipses::detail::EllipticityBase::setE1 ( double  e1)
inlineinherited

Definition at line 58 of file EllipticityBase.h.

58  {
59 #if __cplusplus < 201103L
61 #else
62  _complex.real(e1);
63 #endif
64  }

◆ setE2()

void lsst::afw::geom::ellipses::detail::EllipticityBase::setE2 ( double  e2)
inlineinherited

Definition at line 67 of file EllipticityBase.h.

67  {
68 #if __cplusplus < 201103L
70 #else
71  _complex.imag(e2);
72 #endif
73  }

Member Data Documentation

◆ _complex

std::complex<double> lsst::afw::geom::ellipses::detail::EllipticityBase::_complex
protectedinherited

Definition at line 91 of file EllipticityBase.h.


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