Changeset 38533
- Timestamp:
- Jun 24, 2015, 9:21:59 AM (11 years ago)
- Location:
- branches/eam_branches/ipp-20150616/Ohana/src/addstar/src
- Files:
-
- 2 edited
-
LoadData.c (modified) (2 diffs)
-
find_matches_closest.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/LoadData.c
r38525 r38533 10 10 11 11 Catalog *catalog = NULL; 12 // ALLOCATE (catalog, Catalog, 1); 13 // dvo_catalog_init (catalog, TRUE); 12 ALLOCATE (catalog, Catalog, 1); 13 dvo_catalog_init (catalog, TRUE); 14 ALLOCATE (catalog->average, Average, 1); 15 ALLOCATE (catalog->secfilt, SecFilt, 1); 16 ALLOCATE (catalog->measure, Measure, 1); 17 ALLOCATE (catalog->lensing, Lensing, 1); 14 18 15 19 if (images[0] == NULL) { … … 103 107 // replace full input catalog newcat with subset version 104 108 newcat = FilterStars (newcat, &images[0][Nvalid], Nvalid, options); 105 catalog = newcat;106 109 107 // XXX I need to use find_matches_closest here, but for testing: 108 // find_matches_closest (region, catalog, newcat, options); 109 // dvo_catalog_free (newcat); 110 // free (newcat); 110 double Rref, Dref; 111 XY_to_RD (&Rref, &Dref, 0.0, 0.0, &images[0][Nvalid].coords); 112 SkyRegion region; 113 region.Rmin = Rref - 180.0; 114 region.Rmax = Rref + 180.0; 115 region.Dmin = Dref - 90.0; 116 region.Dmax = Dref + 90.0; 117 118 AddstarClientOptions matchOptions = *options; 119 matchOptions.radius = 0.1; // tight radius at this stage 120 matchOptions.calibrate = FALSE; 121 matchOptions.only_match = FALSE; 122 matchOptions.nosort = FALSE; 123 124 find_matches_closest (®ion, newcat, catalog, matchOptions); 125 dvo_catalog_free (newcat); 126 free (newcat); 111 127 112 128 Nvalid++; -
branches/eam_branches/ipp-20150616/Ohana/src/addstar/src/find_matches_closest.c
r38525 r38533 270 270 /* these new entries are all written out in UPDATE mode */ 271 271 for (i = 0; (i < Nstars) && !options.only_match; i += NSTAR_GROUP) { 272 fprintf (stderr, "loop %d\n", (int) i); 272 273 /* make sure there is space for next entry */ 273 274 if (Nmeas >= NMEAS - NSTAR_GROUP) { … … 299 300 catalog[0].average[Nave].catID = catID; 300 301 302 ohana_memcheck(1); 303 301 304 if (PSPS_ID) { 302 305 catalog[0].average[Nave].extID = CreatePSPSObjectID(catalog[0].average[Nave].R, catalog[0].average[Nave].D); … … 306 309 307 310 for (j = 0; j < Nsecfilt; j++) { 311 // XXXX inconsistent with my alloc above 308 312 dvo_secfilt_init (&catalog[0].secfilt[Nave*Nsecfilt+j], SECFILT_RESET_ALL); 309 313 } 314 315 ohana_memcheck(1); 310 316 311 317 for (j = 0; j < NSTAR_GROUP; j++) { … … 335 341 next_meas[Nmeas - NSTAR_GROUP + j] = Nmeas - NSTAR_GROUP + j + 1; 336 342 } 343 344 ohana_memcheck(1); 337 345 338 346 // if we have lensing data, insert that as well … … 357 365 } 358 366 } 367 ohana_memcheck(1); 359 368 360 369 Nave ++;
Note:
See TracChangeset
for help on using the changeset viewer.
