Changeset 27497 for branches/eam_branches/relastro.20100326/src/ImageOps.c
- Timestamp:
- Mar 28, 2010, 4:17:23 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/relastro.20100326/src/ImageOps.c
r27496 r27497 333 333 if (badCoords(im)) return; 334 334 335 // WRP images need to have an associated mosaic 335 336 moscoords = NULL; 336 mosaic = getMosaicForImage (im); 337 if (mosaic != NULL) { 337 if (!strcmp(&image[im].coords.ctype[4], "-WRP")) { 338 mosaic = getMosaicForImage (im); 339 if (mosaic == NULL) return; // if we cannot find the associated image, skip it 338 340 moscoords = &mosaic[0].coords; 339 341 } … … 383 385 // complain if the new location is far from the old location 384 386 if (fabs(catalog[c].measure[m].dR - dR) > 2.0) { 385 fprintf (stderr, " !");387 fprintf (stderr, "@"); 386 388 setBadCoords (im); // report a failure for this image 387 389 return; 388 390 } 389 391 if (fabs(catalog[c].measure[m].dD - dD) > 2.0) { 390 fprintf (stderr, " *");392 fprintf (stderr, "#"); 391 393 setBadCoords (im); // report a failure for this image 392 394 return; … … 436 438 memcpy (&image[im].coords, oldcoords, sizeof(Coords)); 437 439 440 // WRP images need to have an associated mosaic 438 441 moscoords = NULL; 439 mosaic = getMosaicForImage (im); 440 if (mosaic != NULL) { 442 if (!strcmp(&image[im].coords.ctype[4], "-WRP")) { 443 mosaic = getMosaicForImage (im); 444 if (mosaic == NULL) return; // if we cannot find the associated image, skip it 441 445 moscoords = &mosaic[0].coords; 442 446 } … … 492 496 StarData *raw; 493 497 494 ALLOCATE (raw, StarData, Nlist[im]);495 496 498 mosaic = NULL; 497 499 moscoords = NULL; … … 500 502 if (mosaic == NULL) { 501 503 fprintf (stderr, "mosaic not found for image %s\n", image[im].name); 502 abort();504 return NULL; 503 505 } 504 506 moscoords = &mosaic[0].coords; 505 507 } 508 509 ALLOCATE (raw, StarData, Nlist[im]); 506 510 507 511 for (i = 0; i < Nlist[im]; i++) { … … 567 571 StarData *ref; 568 572 569 ALLOCATE (ref, StarData, Nlist[im]);570 571 573 mosaic = NULL; 572 574 moscoords = NULL; … … 575 577 if (mosaic == NULL) { 576 578 fprintf (stderr, "mosaic not found for image %s\n", image[im].name); 577 abort ();579 return NULL; 578 580 } 579 581 moscoords = &mosaic[0].coords; 580 582 } 583 584 ALLOCATE (ref, StarData, Nlist[im]); 581 585 582 586 for (i = 0; i < Nlist[im]; i++) {
Note:
See TracChangeset
for help on using the changeset viewer.
