IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39243 for trunk


Ignore:
Timestamp:
Dec 10, 2015, 2:48:58 PM (11 years ago)
Author:
watersc1
Message:

Fix typo where lambda was being dropped incorrectly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/cmd.astro/fitplx_irls.c

    r39236 r39243  
    387387  double ax, ay;
    388388  double bx, by;
    389   double lambda;
     389  double lambda_x, lambda_y;
    390390  double sigma_robust_x, sigma_robust_y;
    391391  double sigma_final_x,  sigma_final_y;
     
    396396  ax = 0.0; ay = 0.0;
    397397  bx = 0.0; by = 0.0;
    398   lambda = 0.0;
     398
    399399  for (i = 0; i < Npts; i++) {
    400400    Wx[i] = weight_cauchy(rx[i] / dX[i]);
     
    415415  by /= 1.0 * (Npts - p);
    416416
    417   sigma_robust_x = lambda * sqrt(bx) * sigma_hat * 2.385 / ax;
    418   sigma_robust_y = lambda * sqrt(by) * sigma_hat * 2.385 / ay;
     417  lambda_x = 1.0 + (p / Npts) * (1 - ax) / ax;
     418  lambda_y = 1.0 + (p / Npts) * (1 - ay) / ay;
     419 
     420  sigma_robust_x = lambda_x * sqrt(bx) * sigma_hat * 2.385 / ax;
     421  sigma_robust_y = lambda_y * sqrt(by) * sigma_hat * 2.385 / ay;
    419422
    420423  // This is actually sigma^2, as that's the factor in the covariance (dumouchel 4.1)
Note: See TracChangeset for help on using the changeset viewer.