Changeset 37686
- Timestamp:
- Nov 28, 2014, 12:37:27 PM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140904/Ohana/src/relastro
- Files:
-
- 4 edited
-
include/relastro.h (modified) (1 diff)
-
src/StarMaps.c (modified) (1 diff)
-
src/UpdateChips.c (modified) (3 diffs)
-
src/bcatalog.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140904/Ohana/src/relastro/include/relastro.h
r37684 r37686 503 503 int checkStarMap(int N); 504 504 int createStarMap (Catalog *catalog, int Ncatalog); 505 int printStarMap(int N, char *filename); 505 506 506 507 int GetScatterRawRef(float *dLsig, float *dMsig, float *dRsig, int *nKeep, StarData *raw, StarData *ref, int Nstars, float SigmaLimit); -
branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/StarMaps.c
r36630 r37686 176 176 } 177 177 178 int printStarMap(int N, char *filename) { 179 180 off_t i, Nimages; 181 Image *images = getimages(&Nimages, NULL); 182 double L, M; 183 184 FILE *f = fopen (filename, "w"); 185 186 for (i = 0; i < starmap[N].Npoints; i++) { 187 // set the transformed coordinates 188 XY_to_LM (&L, &M, starmap[N].points[i].X, starmap[N].points[i].Y, &images[N].coords); 189 190 fprintf (f, "%d %7.2f %f : %7.2f %7.2f : %7.2f %7.2f : %7.2f %7.2f\n", (int) i, starmap[N].points[i].X, starmap[N].points[i].Y, starmap[N].points[i].L, starmap[N].points[i].M, L, M, starmap[N].points[i].L - L, starmap[N].points[i].M - M); 191 } 192 fclose (f); 193 return (TRUE); 194 } 195 -
branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/UpdateChips.c
r37684 r37686 107 107 if (VERBOSE) fprintf (stderr, "reject fit for image %s ("OFF_T_FMT") : Nstars: "OFF_T_FMT" of %d\n", image[i].name, i, Nraw, image[i].nstar); 108 108 109 // restore status quo ante (replace truMap with tmpMap) 110 RestoreCoords (&image[i].coords, &oldCoords, &image[i]); 111 image[i].dXpixSys = dXpixSys; 112 image[i].dYpixSys = dYpixSys; 113 image[i].nFitAstrom = nFitAstr; 114 115 saveCenter (image, &Ro[i], &Do[i], i); 116 mode[i] = 1; 117 NoldFit ++; 118 free (raw); 119 free (ref); 120 continue; 109 if (1) { 110 // restore status quo ante (replace truMap with tmpMap) 111 RestoreCoords (&image[i].coords, &oldCoords, &image[i]); 112 image[i].dXpixSys = dXpixSys; 113 image[i].dYpixSys = dYpixSys; 114 image[i].nFitAstrom = nFitAstr; 115 116 saveCenter (image, &Ro[i], &Do[i], i); 117 mode[i] = 1; 118 NoldFit ++; 119 free (raw); 120 free (ref); 121 continue; 122 } 121 123 } 122 124 … … 124 126 if (VERBOSE) fprintf (stderr, "fit diverges too much for image %s ("OFF_T_FMT") : Nstars: "OFF_T_FMT"\n", image[i].name, i, Nraw); 125 127 126 // restore status quo ante (replace truMap with tmpMap) 127 RestoreCoords (&image[i].coords, &oldCoords, &image[i]); 128 image[i].dXpixSys = dXpixSys; 129 image[i].dYpixSys = dYpixSys; 130 image[i].nFitAstrom = nFitAstr; 131 132 saveCenter (image, &Ro[i], &Do[i], i); 133 mode[i] = 2; 134 image[i].flags |= ID_IMAGE_ASTROM_POOR; 135 NoldFit ++; 136 free (raw); 137 free (ref); 138 continue; 128 if (1) { 129 // restore status quo ante (replace truMap with tmpMap) 130 RestoreCoords (&image[i].coords, &oldCoords, &image[i]); 131 image[i].dXpixSys = dXpixSys; 132 image[i].dYpixSys = dYpixSys; 133 image[i].nFitAstrom = nFitAstr; 134 135 saveCenter (image, &Ro[i], &Do[i], i); 136 mode[i] = 2; 137 image[i].flags |= ID_IMAGE_ASTROM_POOR; 138 NoldFit ++; 139 free (raw); 140 free (ref); 141 continue; 142 } 139 143 } 140 144 … … 538 542 539 543 // copy the coords structure data first, then fix the offsetMap pointers 544 // this modifies tgt.coords, but we need to keep the original pointer 540 545 CopyCoords (tgt, src); 546 tgt->offsetMap = truMap; 541 547 542 548 // we want to keep the old solution, which is (maybe) a pointer to a stand-alone -
branches/eam_branches/ipp-20140904/Ohana/src/relastro/src/bcatalog.c
r37655 r37686 199 199 } 200 200 } 201 // we have filtered this object. do not keep it if we now have too few meas 202 if (Nm <= SRC_MEAS_TOOFEW) { 203 Nmeasure -= Nm; 204 continue; 205 } 201 206 subcatalog[0].average[Naverage].Nmeasure = Nm; 202 207 Naverage ++;
Note:
See TracChangeset
for help on using the changeset viewer.
