Searching...
No Matches
lsst::afw::image::pixel::variance_divides< T1 > Struct Template Reference

Calculate the variance when we divide two Pixels. More...

#include <Pixel.h>

Public Member Functions

T1 operator() (T1 const &x, T1 const &y, T1 const &vx, T1 const &vy) const

T1 operator() (T1 const &, T1 const &y, T1 const &vx) const

Detailed Description

template<typename T1>
struct lsst::afw::image::pixel::variance_divides< T1 >

Calculate the variance when we divide two Pixels.

Note
We provide a single-operand version for when the right-hand-side of an expression is a scalar, not a masked pixel,

Definition at line 359 of file Pixel.h.

◆ operator()() [1/2]

template<typename T1 >
 T1 lsst::afw::image::pixel::variance_divides< T1 >::operator() ( T1 const & , T1 const & y, T1 const & vx ) const
inline

Definition at line 367 of file Pixel.h.

367{ return vx / (y * y); }
int y
Definition SpanSet.cc:48

◆ operator()() [2/2]

template<typename T1 >
 T1 lsst::afw::image::pixel::variance_divides< T1 >::operator() ( T1 const & x, T1 const & y, T1 const & vx, T1 const & vy ) const
inline

Definition at line 360 of file Pixel.h.

360 {
361 T1 const x2 = x * x;
362 T1 const y2 = y * y;
363 T1 const iy2 = 1.0 / y2;
364 return x2 * vy * iy2 * iy2 + vx * iy2;
365 }

The documentation for this struct was generated from the following file:
• /j/snowflake/release/lsstsw/stack/lsst-scipipe-8.0.0/Linux64/afw/g5a732f18d5+53520f316c/include/lsst/afw/image/Pixel.h