IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19826


Ignore:
Timestamp:
Oct 2, 2008, 8:11:46 AM (18 years ago)
Author:
eugene
Message:

subtract guess position when calculating sums

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.data/starfuncs.c

    r16040 r19826  
    4444  dsky2 = dsky2 / Npts - sky*sky;
    4545  free (ring);
     46
     47  float dx, dy;
    4648
    4749  peak = 0;
     
    5254      value = gfits_get_matrix_value (matrix, i, j);
    5355      offset = value - sky;
    54       x  += i*offset;
    55       y  += j*offset;
    56       x2 += i*i*offset;
    57       y2 += j*j*offset;
    58       xy += i*j*offset;
     56      dx = i - X;
     57      dy = j - Y;
     58      x  += dx*offset;
     59      y  += dy*offset;
     60      x2 += dx*dx*offset;
     61      y2 += dy*dy*offset;
     62      xy += dx*dy*offset;
    5963      I  += offset;
    6064      Npts ++;
Note: See TracChangeset for help on using the changeset viewer.