IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 24035


Ignore:
Timestamp:
May 1, 2009, 5:12:08 PM (17 years ago)
Author:
eugene
Message:

astrometry was allowing too high orders for the number of stars

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroOneChipFit.c

    r21422 r24035  
    6464        // modify the order to correspond to the actual number of matched stars:
    6565        int Ndof_min = 3;
    66         int order_max = 0.5*(3 + sqrt(4*match->n - 4*Ndof_min + 1));
     66        int order_max = 0.5*(sqrt(4*match->n - 4*Ndof_min + 1) - 3);
    6767        order = PS_MIN (order, order_max);
     68
     69        // order 0 : Ro -> nterms = 1 * 2;
     70        // order 1 : Ro, Rx, Ry -> nterms = 3 * 2;
     71        // order 2 : Ro, Rx, Ry, Rxx, Rxy, Ryy -> nterms = 6 * 2;
     72        // order 3 : Ro, Rx, Ry, Rxx, Rxy, Ryy, Rxxx, Rxxy, Rxyy, Ryyy -> nterms = 10 * 2
     73        // 2*(N+1)*(N+2)/2 = (N+1)*(N+2) = nterms;
     74        // (order+1)(order+2) + ndof = nvalues
     75        // order^2 + 3*order + 2 + ndof = nvalue;
     76        // order^2 + 3*order + 2 + ndof - nvalue = 0;
     77        // 2*order = -3 +/- sqrt (9 - 4*(2 - nvalue + ndof));
     78        // 2*order = -3 +/- sqrt (9 - 8 + 4*nvalue - 4*ndof);
     79        // 2*order = (sqrt (1 + 4*nvalue - 4*ndof) - 3);
    6880
    6981        // if ((match->n < 11) && (order >= 3)) order = 2;
Note: See TracChangeset for help on using the changeset viewer.