Changeset 28695
- Timestamp:
- Jul 22, 2010, 7:50:52 AM (16 years ago)
- Location:
- branches/eam_branches/ipp-20100621/Ohana/src/relastro/src
- Files:
-
- 6 edited
-
ImageOps.c (modified) (2 diffs)
-
StarMaps.c (modified) (3 diffs)
-
UpdateChips.c (modified) (1 diff)
-
UpdateMeasures.c (modified) (1 diff)
-
load_catalogs.c (modified) (1 diff)
-
relastro.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20100621/Ohana/src/relastro/src/ImageOps.c
r28241 r28695 372 372 373 373 // complain if the new location is far from the average location 374 // XXX warning or error here?? 374 375 if (fabs(dR) > 2.0) { 375 376 fprintf (stderr, "!"); … … 414 415 415 416 saveOffsets (dPos, nPos, im); 417 418 // XXX this function should probably update the average positions as well. 416 419 417 420 return; -
branches/eam_branches/ipp-20100621/Ohana/src/relastro/src/StarMaps.c
r28685 r28695 1 1 # include "relastro.h" 2 3 // XXX mark the image grid based on the loaded detections 4 // XXX modify tcatalog to exclude any photcode or other choices that 5 // only affect image selection? 6 7 // XXX this stuff is only going to work for SIMPLE and CHIP; need to 8 // use parentID to get from imageID to the mosaic pseudo-image 9 10 typedef struct { 11 double L; 12 double M; 13 double X; 14 double Y; 15 double dL; 16 double dM; 17 } StarMapPoint; 2 18 3 19 typedef struct { … … 5 21 int Ny; 6 22 int *stars; 23 StarMapPoint *points; 24 int Npoints; 7 25 } StarMap; 8 26 … … 58 76 return (TRUE); 59 77 } 78 79 int createStarMapPoints() { 80 81 Image *images; 82 off_t i, Nimages; 83 84 images = getimages(&Nimages); 85 86 for (i = 0; i < Nimages; i++) { 87 88 ALLOCATE (starmap[i].points, StarMapPoint, NX_MAP*NY_MAP); 89 starmap[i].Npoints = 0; 90 91 for (ix = 0; ix < NX_MAP; ix++) { 92 for (iy = 0; iy < NY_MAP; iy++) { 93 if (starmap[i].stars[iybin*NX_BAP + ixbin] < 1) continue; 94 StarMapPoint *point = &starmap[i].points[starmap[i].Npoints]; 95 starmap[i].Npoints++; 96 97 // set the pixel coordinates 98 point[0].X = ixbin * NX_MAP; // XXX fix 0.5 pixel offset 99 point[0].Y = iybin * NY_MAP; // XXX fix 0.5 pixel offset 100 101 // set the transformed coordinates 102 XY_to_LM (&point[0].L, &point[0].M, point[0].X, point[0].Y, &image[i].coords); 103 104 point[0].dL = 0.0; 105 point[0].dM = 0.0; 106 } 107 } 108 } 109 110 return (TRUE); 111 } 112 113 int checkStarMap(int N) { 114 115 Image *images; 116 off_t i, Nimages; 117 double L, M, dLmax, dMmax; 118 119 images = getimages(&Nimages); 120 121 dLmax = dMmax = 0.0; 122 123 for (i = 0; i < starmap[N].Npoints; i++) { 124 125 // set the transformed coordinates 126 XY_to_LM (&L, &M, starmap[N].point[i].X, starmap[N].point[i].Y, &image[N].coords); 127 128 starmap[N].point[i].dL = starmap[N].point[i].L - L; 129 starmap[N].point[i].dM = starmap[N].point[i].M - M; 130 131 dLmax = MAX(starmap[N].point[i].dL, dLmax); 132 dMmax = MAX(starmap[N].point[i].dM, dMmax); 133 } 134 135 if (dLmax > XXX) return (FALSE); 136 if (dMmax > XXX) return (FALSE); 137 return (TRUE); 138 } 139 -
branches/eam_branches/ipp-20100621/Ohana/src/relastro/src/UpdateChips.c
r28241 r28695 35 35 oldCoords = getCoords (i); 36 36 memcpy (&image[i].coords, oldCoords, sizeof(Coords)); 37 // XXX need to set some flag to note failure here 38 free (raw); 39 free (ref); 40 continue; 41 } 42 43 if (!checkStarMap (i)) { 44 fprintf (stderr, "fit diverges too much for image %s ("OFF_T_FMT") : Nstars: "OFF_T_FMT"\n", image[i].name, i, Nraw); 45 oldCoords = getCoords (i); 46 memcpy (&image[i].coords, oldCoords, sizeof(Coords)); 47 // XXX need to set some flag to note failure here 37 48 } 38 49 -
branches/eam_branches/ipp-20100621/Ohana/src/relastro/src/UpdateMeasures.c
r27435 r28695 13 13 if (!strcmp(&image[i].coords.ctype[4], "-DIS")) continue; 14 14 15 // skip images that have failed solutions (divergent or otherwise) 16 15 17 /* convert measure coordinates to raw entries */ 16 18 fixImageRaw (catalog, Ncatalog, i); -
branches/eam_branches/ipp-20100621/Ohana/src/relastro/src/load_catalogs.c
r28685 r28695 37 37 } 38 38 39 // XXX mark the image grid based on the loaded detections40 // XXX modify tcatalog to exclude any photcode or other choices that only affect image selection?41 39 updateStarMaps (&tcatalog); 42 40 -
branches/eam_branches/ipp-20100621/Ohana/src/relastro/src/relastro.c
r28683 r28695 66 66 } 67 67 68 // set test points based on the starmap 69 createStarMapPoints(); 70 68 71 /* major modes */ 69 72 switch (FIT_TARGET) { … … 104 107 105 108 // iterate over catalogs to make detection coordinates consistant 106 FixProblemImages (skylist);109 // FixProblemImages (skylist); 107 110 108 111 // save the updated image parameters
Note:
See TracChangeset
for help on using the changeset viewer.
