Changeset 37438
- Timestamp:
- Sep 26, 2014, 10:34:52 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140904/Ohana/src
- Files:
-
- 3 edited
-
libdvo/src/astrom_maps.c (modified) (1 diff)
-
relastro/src/FitChip.c (modified) (4 diffs)
-
relastro/src/fitpoly.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana/src/libdvo/src/astrom_maps.c
r37389 r37438 24 24 } 25 25 26 int -
branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/FitChip.c
r37038 r37438 49 49 // use that count to set order_use below 50 50 51 // 20140925 : the same logic below is used to constrain the dimensions of the image map 52 51 53 // figures to assess the fitting process: 52 54 // x vs dx, x vs dy, y vs dx, y vs dy : … … 65 67 return FALSE; 66 68 } 67 image[0].coords.Npolyterms = order_use; 69 70 // when fitting the map, first fit a linear model (below? change Npolyterms to -1) 71 if (MAP) { 72 image[0].coords.Npolyterms = 1; 73 } else { 74 image[0].coords.Npolyterms = order_use; 75 } 68 76 69 77 if (fit) fit_free (fit); … … 92 100 93 101 for (i = 0; i < Nmatch; i++) { 102 // we have not yet fitted the map, so image[0].coords.Npolyterms needs to 103 // be 1 here... 94 104 XY_to_LM (&raw[i].L, &raw[i].M, raw[i].X, raw[i].Y, &image[0].coords); 95 105 } 96 106 107 // where do we apply the fit all the way b 108 109 if (MAP) { 110 if (image[0].coords.offsetMap == NULL) { 111 AstromOffsetMap *map = AstromOffsetTableNewMap(table, order); 112 image[0].coords.offsetMap = map; 113 } 114 fit_map (image[0].coords.offsetMap, raw, ref); 115 image[0].coords.Npolyterm = -1; 116 } 97 117 } 98 118 … … 254 274 */ 255 275 276 int fit_map (AstromOffsetMap *map) { 277 278 // we are actually fitting the residual after the linear fit has been taken off 279 280 // fit the linear terms as above 281 // calculate dX (raw.X - ref.X) and dY 282 283 AstromOffsetMapFit (map, x, y, dX, Npts, TRUE); 284 AstromOffsetMapFit (map, x, y, dY, Npts, FALSE); 285 286 return TRUE; 287 } -
branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/fitpoly.c
r33652 r37438 277 277 /* this should only apply to the polynomial, not the projection terms */ 278 278 /* compare with psastro supporting code */ 279 // this code will work for linear (Npolyterm == 0 or 1) and linear + map fits 279 280 int fit_apply_coords (CoordFit *fit, Coords *coords, int keepRef) { 280 281
Note:
See TracChangeset
for help on using the changeset viewer.
