Changeset 25027 for branches/pap/psastro/src/psastroOneChipFit.c
- Timestamp:
- Aug 7, 2009, 4:08:25 PM (17 years ago)
- Location:
- branches/pap
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/psastro
- Property svn:mergeinfo deleted
-
branches/pap/psastro/src/psastroOneChipFit.c
r21422 r25027 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.
