LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
lsst::gauss2d::detail::TermsGradient Class Reference

#include <evaluate.h>

Public Member Functions

 TermsGradient (vecdptr ymc_i=nullptr, double xx_weight_i=0, double xy_weight_i=0, double yy_weight_i=0, double rho_factor_i=0, double sig_x_inv_i=0, double sig_y_inv_i=0, double rho_xy_factor_i=0, double sig_x_src_div_conv_i=0, double sig_y_src_div_conv_i=0, double drho_c_dsig_x_src_i=0, double drho_c_dsig_y_src_i=0, double drho_c_drho_s_i=0, double xmc_t_xy_weight_i=0)
 
void set (const Terms &terms, const Ellipse &ell_src, const Ellipse &ell_psf, const Ellipse &ell, vecdptr ymc_)
 

Public Attributes

vecdptr ymc = nullptr
 
double xx_weight = 0
 
double xy_weight = 0
 
double yy_weight = 0
 
double rho_factor = 0
 
double sig_x_inv = 0
 
double sig_y_inv = 0
 
double rho_xy_factor = 0
 
double sig_x_src_div_conv = 0
 
double sig_y_src_div_conv = 0
 
double drho_c_dsig_x_src = 0
 
double drho_c_dsig_y_src = 0
 
double drho_c_drho_s = 0
 
double xmc_t_xy_weight = 0
 

Detailed Description

Definition at line 231 of file evaluate.h.

Constructor & Destructor Documentation

◆ TermsGradient()

lsst::gauss2d::detail::TermsGradient::TermsGradient ( vecdptr ymc_i = nullptr,
double xx_weight_i = 0,
double xy_weight_i = 0,
double yy_weight_i = 0,
double rho_factor_i = 0,
double sig_x_inv_i = 0,
double sig_y_inv_i = 0,
double rho_xy_factor_i = 0,
double sig_x_src_div_conv_i = 0,
double sig_y_src_div_conv_i = 0,
double drho_c_dsig_x_src_i = 0,
double drho_c_dsig_y_src_i = 0,
double drho_c_drho_s_i = 0,
double xmc_t_xy_weight_i = 0 )
inlineexplicit

Definition at line 248 of file evaluate.h.

254 : ymc(std::move(ymc_i)),
255 xx_weight(xx_weight_i),
256 xy_weight(xy_weight_i),
257 yy_weight(yy_weight_i),
258 rho_factor(rho_factor_i),
259 sig_x_inv(sig_x_inv_i),
260 sig_y_inv(sig_y_inv_i),
261 rho_xy_factor(rho_xy_factor_i),
262 sig_x_src_div_conv(sig_x_src_div_conv_i),
263 sig_y_src_div_conv(sig_y_src_div_conv_i),
264 drho_c_dsig_x_src(drho_c_dsig_x_src_i),
265 drho_c_dsig_y_src(drho_c_dsig_y_src_i),
266 drho_c_drho_s(drho_c_drho_s_i),
267 xmc_t_xy_weight(xmc_t_xy_weight_i) {}
T move(T... args)

Member Function Documentation

◆ set()

void lsst::gauss2d::detail::TermsGradient::set ( const Terms & terms,
const Ellipse & ell_src,
const Ellipse & ell_psf,
const Ellipse & ell,
vecdptr ymc_ )
inline

Definition at line 269 of file evaluate.h.

270 {
271 double sig_x = ell.get_sigma_x();
272 double sig_y = ell.get_sigma_y();
273 double rho = ell.get_rho();
274
275 this->ymc = std::move(ymc_);
276 const double sig_xy = sig_x * sig_y;
277 this->xx_weight = terms.xx;
278 this->xy_weight = terms.xy;
279 this->yy_weight = terms.yy;
280 this->rho_factor = rho / (1. - rho * rho);
281 this->sig_x_inv = 1 / sig_x;
282 this->sig_y_inv = 1 / sig_y;
283 this->rho_xy_factor = 1. / (1. - rho * rho) / sig_xy;
284 /*
285 sigma_conv = sqrt(sigma_src^2 + sigma_psf^2)
286 https://www.wolframalpha.com/input/?i=d(sqrt(x%5E2%2By%5E2))%2Fdx
287 dsigma_conv/dsigma_src = sigma_src/sigma_conv
288 df/dsigma_src = df/d_sigma_conv * dsigma_conv/dsigma_src
289
290 rho_conv*sigmaxy_conv = rho_src*sigmaxy_src + rho_psf*sigmaxy_psf
291 rho_conv = (rho_src*sigmaxy_src + rho_psf*sigmaxy_psf)/sigmaxy_conv
292 drho_conv/drho_src = sigmaxy_src/sigmaxy_conv
293
294 drho_conv/dsigmax_src = rho_src*sigmay_src/sigmay_conv*sigmax_psf^2/sigmax_conv^3 (*sigmax_src/sigmax_src)
295 = rho_conv/sigmax_src*(sigmax_psf/sigmax_conv)^2
296 + rho_psf*sigmax_psf*sigmay_psf*sigmax_src/sigmay_conv/sigmax_conv^3
297
298 */
299 double sig_x_src = ell_src.get_sigma_x();
300 double sig_y_src = ell_src.get_sigma_y();
301 double rho_src = ell_src.get_rho();
302 double sig_x_psf = ell_psf.get_sigma_x();
303 double sig_y_psf = ell_psf.get_sigma_y();
304 double rho_psf = ell_psf.get_rho();
305
306 this->sig_x_src_div_conv = sig_x_src / sig_x;
307 this->sig_y_src_div_conv = sig_y_src / sig_y;
308
309 double covar_psf_dsig_xy = rho_psf * sig_x_psf * sig_y_psf / sig_xy;
310 double drho = 0;
311 if (sig_x_psf > 0) {
312 double sig_p_ratio = sig_x_psf / sig_x;
313 drho = rho_src * this->sig_y_src_div_conv * sig_p_ratio * sig_p_ratio / sig_x
314 - covar_psf_dsig_xy * this->sig_x_src_div_conv / sig_x;
315 }
316 this->drho_c_dsig_x_src = drho;
317 if (sig_y_psf > 0) {
318 double sig_p_ratio = sig_y_psf / sig_y;
319 drho = rho_src * this->sig_x_src_div_conv * sig_p_ratio * sig_p_ratio / sig_y
320 - covar_psf_dsig_xy * this->sig_y_src_div_conv / sig_y;
321 }
322 this->drho_c_dsig_y_src = drho;
323 this->drho_c_drho_s = sig_x_src * sig_y_src / sig_xy;
324 }

Member Data Documentation

◆ drho_c_drho_s

double lsst::gauss2d::detail::TermsGradient::drho_c_drho_s = 0

Definition at line 245 of file evaluate.h.

◆ drho_c_dsig_x_src

double lsst::gauss2d::detail::TermsGradient::drho_c_dsig_x_src = 0

Definition at line 243 of file evaluate.h.

◆ drho_c_dsig_y_src

double lsst::gauss2d::detail::TermsGradient::drho_c_dsig_y_src = 0

Definition at line 244 of file evaluate.h.

◆ rho_factor

double lsst::gauss2d::detail::TermsGradient::rho_factor = 0

Definition at line 237 of file evaluate.h.

◆ rho_xy_factor

double lsst::gauss2d::detail::TermsGradient::rho_xy_factor = 0

Definition at line 240 of file evaluate.h.

◆ sig_x_inv

double lsst::gauss2d::detail::TermsGradient::sig_x_inv = 0

Definition at line 238 of file evaluate.h.

◆ sig_x_src_div_conv

double lsst::gauss2d::detail::TermsGradient::sig_x_src_div_conv = 0

Definition at line 241 of file evaluate.h.

◆ sig_y_inv

double lsst::gauss2d::detail::TermsGradient::sig_y_inv = 0

Definition at line 239 of file evaluate.h.

◆ sig_y_src_div_conv

double lsst::gauss2d::detail::TermsGradient::sig_y_src_div_conv = 0

Definition at line 242 of file evaluate.h.

◆ xmc_t_xy_weight

double lsst::gauss2d::detail::TermsGradient::xmc_t_xy_weight = 0

Definition at line 246 of file evaluate.h.

◆ xx_weight

double lsst::gauss2d::detail::TermsGradient::xx_weight = 0

Definition at line 234 of file evaluate.h.

◆ xy_weight

double lsst::gauss2d::detail::TermsGradient::xy_weight = 0

Definition at line 235 of file evaluate.h.

◆ ymc

vecdptr lsst::gauss2d::detail::TermsGradient::ymc = nullptr

Definition at line 233 of file evaluate.h.

◆ yy_weight

double lsst::gauss2d::detail::TermsGradient::yy_weight = 0

Definition at line 236 of file evaluate.h.


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