Changeset 37005
- Timestamp:
- Jul 13, 2014, 11:01:58 AM (12 years ago)
- Location:
- branches/eam_branches/ipp-20140610/Ohana/src/addstar/src
- Files:
-
- 5 edited
-
ReadImageHeader.c (modified) (2 diffs)
-
find_matches.c (modified) (5 diffs)
-
find_matches_closest.c (modified) (5 diffs)
-
find_matches_closest_refstars.c (modified) (5 diffs)
-
find_matches_refstars.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/ReadImageHeader.c
r36833 r37005 45 45 image[0].NY = Ny; 46 46 47 image[0].refColor = NAN; 47 image[0].refColorBlue = NAN; 48 image[0].refColorRed = NAN; 48 49 49 50 if (!gfits_scan (header, "TZERO", "%d", 1, &image[0].tzero) && !ACCEPT_TIME) { … … 135 136 136 137 tmp = 0; 137 gfits_scan (header, "FLIMIT", "%lf", 1, &tmp); 138 // gfits_scan (header, "FLIMIT", "%lf", 1, &tmp); 139 gfits_scan (header, "DETEFF.MAGREF", "%lf", 1, &tmp); 138 140 image[0].detection_limit = tmp * 10.0; 139 141 -
branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/find_matches.c
r36910 r37005 36 36 ALLOCATE (Y2, double, NAVE); 37 37 ALLOCATE (N2, off_t, NAVE); 38 ALLOCATE (catalog[0].found , off_t, NAVE);38 ALLOCATE (catalog[0].found_t, off_t, NAVE); 39 39 /* for secfilt j and star i, secfilt[i*Nsecfilt+j] */ 40 40 … … 77 77 if (Nstars < 1) { 78 78 if (VERBOSE) fprintf (stderr, "skipping %s, no overlapping stars\n", catalog[0].filename); 79 free (catalog[0].found);80 79 free (X1); 81 80 free (Y1); … … 92 91 RD_to_XY (&X2[i], &Y2[i], catalog[0].average[i].R, catalog[0].average[i].D, &tcoords); 93 92 N2[i] = i; 94 catalog[0].found [N2[i]] = -1;93 catalog[0].found_t[N2[i]] = -1; 95 94 } 96 95 if (Nave > 1) sort_coords_index (X2, Y2, N2, Nave); … … 219 218 } 220 219 /* this catalog star matches more than one image star */ 221 if (catalog[0].found [n] > -1) {222 catalog[0].measure[catalog[0].found [n]].dbFlags |= ID_MEAS_BLEND_OBJ;220 if (catalog[0].found_t[n] > -1) { 221 catalog[0].measure[catalog[0].found_t[n]].dbFlags |= ID_MEAS_BLEND_OBJ; 223 222 catalog[0].measure[Nmeas].dbFlags |= ID_MEAS_BLEND_OBJ; 224 223 } else { 225 catalog[0].found [n] = Nmeas;224 catalog[0].found_t[n] = Nmeas; 226 225 } 227 226 /* Nm is updated, but not written out in -update mode (for existing entries) … … 329 328 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: "OFF_T_FMT" "OFF_T_FMT" "OFF_T_FMT", ("OFF_T_FMT" matches)\n", Nstars, Nave, Nmeas, Nmatch); 330 329 331 free (catalog[0].found);332 330 free (X1); 333 331 free (Y1); -
branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/find_matches_closest.c
r36922 r37005 36 36 ALLOCATE (Y2, double, NAVE); 37 37 ALLOCATE (N2, off_t, NAVE); 38 ALLOCATE (catalog[0].found , off_t, NAVE);38 ALLOCATE (catalog[0].found_t, off_t, NAVE); 39 39 /* for secfilt j and star i, secfilt[i*Nsecfilt+j] */ 40 40 … … 77 77 if (Nstars < 1) { 78 78 if (VERBOSE) fprintf (stderr, "skipping %s, no overlapping stars\n", catalog[0].filename); 79 free (catalog[0].found);80 79 free (X1); 81 80 free (Y1); … … 92 91 RD_to_XY (&X2[i], &Y2[i], catalog[0].average[i].R, catalog[0].average[i].D, &tcoords); 93 92 N2[i] = i; 94 catalog[0].found [N2[i]] = -1;93 catalog[0].found_t[N2[i]] = -1; 95 94 } 96 95 if (Nave > 1) sort_coords_index (X2, Y2, N2, Nave); … … 261 260 Nm is recalculated in build_meas_links if loaded table is not sorted */ 262 261 stars[N].found = Nmeas; 263 catalog[0].found [n] = Nmeas;262 catalog[0].found_t[n] = Nmeas; 264 263 catalog[0].average[n].Nmeasure ++; 265 264 Nmeas ++; … … 390 389 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas, Nlens: "OFF_T_FMT" "OFF_T_FMT" "OFF_T_FMT" "OFF_T_FMT", ("OFF_T_FMT" matches)\n", Nstars, Nave, Nmeas, Nlens, Nmatch); 391 390 392 free (catalog[0].found);393 391 free (X1); 394 392 free (Y1); -
branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/find_matches_closest_refstars.c
r36903 r37005 31 31 ALLOCATE (Y2, double, NAVE); 32 32 ALLOCATE (N2, off_t, NAVE); 33 ALLOCATE (catalog[0].found , off_t, NAVE);33 ALLOCATE (catalog[0].found_t, off_t, NAVE); 34 34 /* for secfilt j and star i, secfilt[i*Nsecfilt+j] */ 35 35 … … 71 71 if (Nstars < 1) { 72 72 if (VERBOSE) fprintf (stderr, "skipping %s, no overlapping stars\n", catalog[0].filename); 73 free (catalog[0].found);74 73 free (X1); 75 74 free (Y1); … … 86 85 RD_to_XY (&X2[i], &Y2[i], catalog[0].average[i].R, catalog[0].average[i].D, &tcoords); 87 86 N2[i] = i; 88 catalog[0].found [N2[i]] = -1;87 catalog[0].found_t[N2[i]] = -1; 89 88 } 90 89 if (Nave > 1) sort_coords_index (X2, Y2, N2, Nave); … … 220 219 /* this catalog star matches more than one image star */ 221 220 // XXX should this be an average flag? 222 if (catalog[0].found [n] > -1) {223 catalog[0].measure[catalog[0].found [n]].dbFlags |= ID_MEAS_BLEND_OBJ;221 if (catalog[0].found_t[n] > -1) { 222 catalog[0].measure[catalog[0].found_t[n]].dbFlags |= ID_MEAS_BLEND_OBJ; 224 223 catalog[0].measure[Nmeas].dbFlags |= ID_MEAS_BLEND_OBJ; 225 224 } else { 226 catalog[0].found [n] = Nmeas;225 catalog[0].found_t[n] = Nmeas; 227 226 } 228 227 … … 331 330 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: "OFF_T_FMT" "OFF_T_FMT" "OFF_T_FMT", ("OFF_T_FMT" matches)\n", Nstars, Nave, Nmeas, Nmatch); 332 331 333 free (catalog[0].found);334 332 free (X1); 335 333 free (Y1); -
branches/eam_branches/ipp-20140610/Ohana/src/addstar/src/find_matches_refstars.c
r36903 r37005 37 37 ALLOCATE (Y2, double, NAVE); 38 38 ALLOCATE (N2, off_t, NAVE); 39 ALLOCATE (catalog[0].found , off_t, NAVE);39 ALLOCATE (catalog[0].found_t, off_t, NAVE); 40 40 REALLOCATE (catalog[0].average, Average, NAVE); 41 41 REALLOCATE (catalog[0].secfilt, SecFilt, NAVE*catalog[0].Nsecfilt); … … 69 69 RD_to_XY (&X2[i], &Y2[i], catalog[0].average[i].R, catalog[0].average[i].D, &tcoords); 70 70 N2[i] = i; 71 catalog[0].found [N2[i]] = -1;71 catalog[0].found_t[N2[i]] = -1; 72 72 } 73 73 if (Nave > 1) sort_coords_index (X2, Y2, N2, Nave); … … 190 190 } 191 191 /* this catalog star matches more than one image star */ 192 if (catalog[0].found [n] > -1) {193 catalog[0].measure[catalog[0].found [n]].dbFlags |= ID_MEAS_BLEND_OBJ;192 if (catalog[0].found_t[n] > -1) { 193 catalog[0].measure[catalog[0].found_t[n]].dbFlags |= ID_MEAS_BLEND_OBJ; 194 194 catalog[0].measure[Nmeas].dbFlags |= ID_MEAS_BLEND_OBJ; 195 195 } else { 196 catalog[0].found [n] = Nmeas;196 catalog[0].found_t[n] = Nmeas; 197 197 } 198 198 … … 305 305 if (VERBOSE) fprintf (stderr, "Nstars, Nave, Nmeas: %d "OFF_T_FMT" "OFF_T_FMT", ("OFF_T_FMT" matches)\n", Nstars, Nave, Nmeas, Nmatch); 306 306 307 free (catalog[0].found);308 307 free (X1); 309 308 free (Y1);
Note:
See TracChangeset
for help on using the changeset viewer.
