Changeset 24035
- Timestamp:
- May 1, 2009, 5:12:08 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/psastro/src/psastroOneChipFit.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psastro/src/psastroOneChipFit.c
r21422 r24035 64 64 // modify the order to correspond to the actual number of matched stars: 65 65 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); 67 67 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); 68 80 69 81 // if ((match->n < 11) && (order >= 3)) order = 2;
Note:
See TracChangeset
for help on using the changeset viewer.
