IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 17, 2005, 9:59:28 AM (21 years ago)
Author:
eugene
Message:

added pmAstromMatchedListFit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/modules/src/pmAstrom.c

    r5272 r5353  
    223223    return (match);
    224224}
     225
     226pmAstromMatchedListFit (psArray *st1, psArray *st2, psArray *match, pmAstromOpt *opt) {
     227
     228  psVector *X = psVectorAlloc (match->n);
     229  psVector *Y = psVectorAlloc (match->n);
     230  psVector *x = psVectorAlloc (match->n);
     231  psVector *y = psVectorAlloc (match->n);
     232 
     233  // take the matched stars, first fit
     234  for (i = 0; i < match->n; i++) {
     235
     236    pair = match->data[i];
     237    ob1 = st1->data[pair->i1];
     238    ob2 = st2->data[pair->i2];
     239
     240    X->data.F64[i] = ob1->P;
     241    Y->data.F64[i] = ob1->Q;
     242
     243    x->data.F64[i] = ob2->P;
     244    y->data.F64[i] = ob2->Q;
     245
     246    // use one or the other...
     247    psPolynomial2D *xt = psVectorFitPolynomial2D (NULL, stats, NULL, 0, X, NULL, x, y)
     248    psPolynomial2D *xt = psVectorClipFitPolynomial2D (NULL, stats, NULL, 0, X, NULL, x, y)
     249
     250    psPolynomial2D *yt = psVectorFitPolynomial2D (NULL, stats, NULL, 0, Y, NULL, x, y)
     251    psPolynomial2D *yt = psVectorClipFitPolynomial2D (NULL, stats, NULL, 0, Y, NULL, x, y)
Note: See TracChangeset for help on using the changeset viewer.