IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38699


Ignore:
Timestamp:
Sep 3, 2015, 6:18:08 AM (11 years ago)
Author:
eugene
Message:

add weights to astrom offset fitting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150625/Ohana/src/relastro/src/FitChip.c

    r37807 r38699  
    8181    }
    8282
    83     if (VERBOSE2) fprintf (stderr, "using %d for %s\n", order_use, image[0].name);
     83    if (VERBOSE2) {
     84      fprintf (stderr, "using %d for %s\n", order_use, image[0].name);
     85    }
    8486
    8587    // when fitting the map, first fit a linear model (below? change Npolyterms to -1)
     
    9294    for (i = 0; i < Nmatch; i++) {
    9395      if (raw[i].mask) continue;
    94       fit_add (fit, raw[i].X, raw[i].Y, ref[i].L, ref[i].M, raw[i].dPos);
     96      fit_add (fit, raw[i].X, raw[i].Y, ref[i].L, ref[i].M, ref[i].dPos);
    9597    }
    9698
     
    310312  int i, N;
    311313
    312   float *x, *y, *dX, *dY;
     314  float *x, *y, *dX, *dY, *dP;
    313315  ALLOCATE (x,  float, Npts);
    314316  ALLOCATE (y,  float, Npts);
    315317  ALLOCATE (dX, float, Npts);
    316318  ALLOCATE (dY, float, Npts);
     319  ALLOCATE (dP, float, Npts);
    317320
    318321  N = 0;
     
    323326    dX[N] = ref[i].X - raw[i].X;
    324327    dY[N] = ref[i].Y - raw[i].Y;
     328    dP[N] = ref[i].dPos;
    325329    N++;
    326330  }
     
    329333  // (L,M) = f(X',Y') : (X',Y') = (X,Y) + (dX,dY)
    330334
    331   AstromOffsetMapFit (map, x, y, dX, N, TRUE);
    332   AstromOffsetMapFit (map, x, y, dY, N, FALSE);
     335  AstromOffsetMapFit (map, x, y, dX, dP, N, TRUE);
     336  AstromOffsetMapFit (map, x, y, dY, dP, N, FALSE);
    333337
    334338  AstromOffsetMapRepair (map, TRUE);
     
    339343  free (dX);
    340344  free (dY);
     345  free (dP);
    341346
    342347  return TRUE;
Note: See TracChangeset for help on using the changeset viewer.