IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20794


Ignore:
Timestamp:
Nov 18, 2008, 5:49:40 PM (17 years ago)
Author:
eugene
Message:

a bit more rigorous on minimum number of detections for an N-order fit

File:
1 edited

Legend:

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

    r16070 r20794  
    5151
    5252        // modify the order to correspond to the actual number of matched stars:
    53         if ((match->n < 11) && (order >= 3)) order = 2;
    54         if ((match->n <  7) && (order >= 2)) order = 1;
    55         if ((match->n <  4) && (order >= 1)) order = 0;
     53        int Ndof_min = 3;
     54        int order_max = 0.5*(3 + sqrt(4*match->n - 4*Ndof_min + 1));
     55        order = PS_MIN (order, order_max);
     56
     57        // if ((match->n < 11) && (order >= 3)) order = 2;
     58        // if ((match->n <  7) && (order >= 2)) order = 1;
     59        // if ((match->n <  4) && (order >= 1)) order = 0;
     60
    5661        if (order < 1) {
    5762            psLogMsg ("psastro", 3, "insufficient stars or invalid order: %ld stars", match->n);
Note: See TracChangeset for help on using the changeset viewer.