LSST Applications g04e9c324dd+8c5ae1fdc5,g134cb467dc+b203dec576,g18429d2f64+358861cd2c,g199a45376c+0ba108daf9,g1fd858c14a+dd066899e3,g262e1987ae+ebfced1d55,g29ae962dfc+72fd90588e,g2cef7863aa+aef1011c0b,g35bb328faa+8c5ae1fdc5,g3fd5ace14f+b668f15bc5,g4595892280+3897dae354,g47891489e3+abcf9c3559,g4d44eb3520+fb4ddce128,g53246c7159+8c5ae1fdc5,g67b6fd64d1+abcf9c3559,g67fd3c3899+1f72b5a9f7,g74acd417e5+cb6b47f07b,g786e29fd12+668abc6043,g87389fa792+8856018cbb,g89139ef638+abcf9c3559,g8d7436a09f+bcf525d20c,g8ea07a8fe4+9f5ccc88ac,g90f42f885a+6054cc57f1,g97be763408+06f794da49,g9dd6db0277+1f72b5a9f7,ga681d05dcb+7e36ad54cd,gabf8522325+735880ea63,gac2eed3f23+abcf9c3559,gb89ab40317+abcf9c3559,gbf99507273+8c5ae1fdc5,gd8ff7fe66e+1f72b5a9f7,gdab6d2f7ff+cb6b47f07b,gdc713202bf+1f72b5a9f7,gdfd2d52018+8225f2b331,ge365c994fd+375fc21c71,ge410e46f29+abcf9c3559,geaed405ab2+562b3308c0,gf9a733ac38+8c5ae1fdc5,w.2025.35
LSST Data Management Base Package
Loading...
Searching...
No Matches
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: