LSSTApplications  18.1.0
LSSTDataManagementBasePackage
Public Member Functions | List of all members
lsst::afw::image::pixel::variance_plus_covar< T1 > Struct Template Reference

The variance of the sum of a pair of correlated pixels. More...

#include <Pixel.h>

Public Member Functions

 variance_plus_covar (double alpha=0)
 
T1 operator() (T1 const &, T1 const &, T1 const &vx, T1 const &vy) const
 
T1 operator() (T1 const &, T1 const &, T1 const &vx) const
 

Detailed Description

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

The variance of the sum of a pair of correlated pixels.

The covariance is modelled as alpha*sqrt(var_x*var_y)

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 406 of file Pixel.h.

Constructor & Destructor Documentation

◆ variance_plus_covar()

template<typename T1 >
lsst::afw::image::pixel::variance_plus_covar< T1 >::variance_plus_covar ( double  alpha = 0)
inline

Definition at line 407 of file Pixel.h.

407 : _alpha(alpha) {}

Member Function Documentation

◆ operator()() [1/2]

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

Definition at line 409 of file Pixel.h.

409  {
410  return vx + vy + 2 * _alpha * sqrt(vx * vy);
411  }
T sqrt(T... args)

◆ operator()() [2/2]

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

Definition at line 412 of file Pixel.h.

412 { return vx; }

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