IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 10, 2014, 11:14:57 AM (12 years ago)
Author:
eugene
Message:

fix AstromOffsetTableFree, use 1st order only for fakeastro fitting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/fit_fake_stars.c

    r37531 r37575  
    3333    return FALSE;
    3434  }
     35  order_use = 1; // hard-wire linear solutions (nothing higher is needed for now)
    3536
    3637  // I have Nstars with "reference" positions stars[].Rref,Dref and
     
    4041
    4142  int CHIPMAP = (image[0].coords.Npolyterms == -1);
    42   image[0].coords.Npolyterms = CHIPMAP ? 1 : order_use;
    4343
    44   CoordFit *fit = fit_init (image[0].coords.Npolyterms);
     44  // XX1 image[0].coords.Npolyterms = CHIPMAP ? 1 : order_use;
     45  CoordFit *fit = CHIPMAP ? fit_init (1) : fit_init (order_use);
    4546
    4647  double *L, *M;
    4748  ALLOCATE (L, double, Nstars);
    4849  ALLOCATE (M, double, Nstars);
     50
     51  // static int Ntest = 0;
     52  // char name[64];
     53  // snprintf (name, 64, "test.%03d.dat", Ntest); Ntest ++;
     54  // FILE *f = fopen (name, "w");
    4955
    5056  // generate the fit matches
     
    5359    RD_to_XY (&L[i], &M[i], stars[i].Rref, stars[i].Dref, image[0].coords.mosaic);
    5460    fit_add (fit, stars[i].measure.Xccd, stars[i].measure.Yccd, L[i], M[i], 0.05);
     61
     62    // double Lo, Mo, Xo, Yo;
     63    // RD_to_XY (&Lo, &Mo, stars[i].average.R, stars[i].average.D, image[0].coords.mosaic);
     64    // RD_to_XY (&Xo, &Yo, stars[i].average.R, stars[i].average.D, &image[0].coords);
     65    // fprintf (f, "%d : %f %f : %f %f : %f %f : %f %f : %f %f : %f %f\n", i, stars[i].Rref, stars[i].Dref, stars[i].average.R, stars[i].average.D, stars[i].measure.Xccd, stars[i].measure.Yccd, L[i], M[i], Lo, Mo, Xo, Yo);
    5566  }
     67  // fclose (f);
    5668
    5769  // measure the fit, update the coords & object coordinates
     
    6678  }
    6779
     80  image[0].coords.Npolyterms = CHIPMAP ? 1 : order_use;
    6881  if (!fit_apply_coords (fit, &image[0].coords, FALSE)) {
    6982    fprintf (stderr, "failed to fit new model\n");
Note: See TracChangeset for help on using the changeset viewer.