LSST Applications g063fba187b+cac8b7c890,g0f08755f38+6aee506743,g1653933729+a8ce1bb630,g168dd56ebc+a8ce1bb630,g1a2382251a+b4475c5878,g1dcb35cd9c+8f9bc1652e,g20f6ffc8e0+6aee506743,g217e2c1bcf+73dee94bd0,g28da252d5a+1f19c529b9,g2bbee38e9b+3f2625acfc,g2bc492864f+3f2625acfc,g3156d2b45e+6e55a43351,g32e5bea42b+1bb94961c2,g347aa1857d+3f2625acfc,g35bb328faa+a8ce1bb630,g3a166c0a6a+3f2625acfc,g3e281a1b8c+c5dd892a6c,g3e8969e208+a8ce1bb630,g414038480c+5927e1bc1e,g41af890bb2+8a9e676b2a,g7af13505b9+809c143d88,g80478fca09+6ef8b1810f,g82479be7b0+f568feb641,g858d7b2824+6aee506743,g89c8672015+f4add4ffd5,g9125e01d80+a8ce1bb630,ga5288a1d22+2903d499ea,gb58c049af0+d64f4d3760,gc28159a63d+3f2625acfc,gcab2d0539d+b12535109e,gcf0d15dbbd+46a3f46ba9,gda6a2b7d83+46a3f46ba9,gdaeeff99f8+1711a396fd,ge79ae78c31+3f2625acfc,gef2f8181fd+0a71e47438,gf0baf85859+c1f95f4921,gfa517265be+6aee506743,gfa999e8aa5+17cd334064,w.2024.51
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: