Changeset 37575 for branches/eam_branches/ipp-20140904/Ohana/src/fakeastro
- Timestamp:
- Nov 10, 2014, 11:14:57 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/fit_fake_stars.c
r37531 r37575 33 33 return FALSE; 34 34 } 35 order_use = 1; // hard-wire linear solutions (nothing higher is needed for now) 35 36 36 37 // I have Nstars with "reference" positions stars[].Rref,Dref and … … 40 41 41 42 int CHIPMAP = (image[0].coords.Npolyterms == -1); 42 image[0].coords.Npolyterms = CHIPMAP ? 1 : order_use;43 43 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); 45 46 46 47 double *L, *M; 47 48 ALLOCATE (L, double, Nstars); 48 49 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"); 49 55 50 56 // generate the fit matches … … 53 59 RD_to_XY (&L[i], &M[i], stars[i].Rref, stars[i].Dref, image[0].coords.mosaic); 54 60 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); 55 66 } 67 // fclose (f); 56 68 57 69 // measure the fit, update the coords & object coordinates … … 66 78 } 67 79 80 image[0].coords.Npolyterms = CHIPMAP ? 1 : order_use; 68 81 if (!fit_apply_coords (fit, &image[0].coords, FALSE)) { 69 82 fprintf (stderr, "failed to fit new model\n");
Note:
See TracChangeset
for help on using the changeset viewer.
