IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2010, 4:17:23 PM (16 years ago)
Author:
eugene
Message:

handle unmatched detections and images; add iteration over chips and objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/relastro.20100326/src/ImageOps.c

    r27496 r27497  
    333333  if (badCoords(im)) return;
    334334
     335  // WRP images need to have an associated mosaic
    335336  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
    338340    moscoords = &mosaic[0].coords;
    339341  }
     
    383385    // complain if the new location is far from the old location
    384386    if (fabs(catalog[c].measure[m].dR - dR) > 2.0) {
    385       fprintf (stderr, "!");
     387      fprintf (stderr, "@");
    386388      setBadCoords (im); // report a failure for this image
    387389      return;
    388390    }
    389391    if (fabs(catalog[c].measure[m].dD - dD) > 2.0) {
    390       fprintf (stderr, "*");
     392      fprintf (stderr, "#");
    391393      setBadCoords (im); // report a failure for this image
    392394      return;
     
    436438  memcpy (&image[im].coords, oldcoords, sizeof(Coords));
    437439
     440  // WRP images need to have an associated mosaic
    438441  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
    441445    moscoords = &mosaic[0].coords;
    442446  }
     
    492496  StarData *raw;
    493497
    494   ALLOCATE (raw, StarData, Nlist[im]);
    495 
    496498  mosaic = NULL;
    497499  moscoords = NULL;
     
    500502    if (mosaic == NULL) {
    501503      fprintf (stderr, "mosaic not found for image %s\n", image[im].name);
    502       abort();
     504      return NULL;
    503505    }
    504506    moscoords = &mosaic[0].coords;
    505507  }
     508
     509  ALLOCATE (raw, StarData, Nlist[im]);
    506510
    507511  for (i = 0; i < Nlist[im]; i++) {
     
    567571  StarData *ref;
    568572
    569   ALLOCATE (ref, StarData, Nlist[im]);
    570 
    571573  mosaic = NULL;
    572574  moscoords = NULL;
     
    575577    if (mosaic == NULL) {
    576578      fprintf (stderr, "mosaic not found for image %s\n", image[im].name);
    577       abort ();
     579      return NULL;
    578580    }
    579581    moscoords = &mosaic[0].coords;
    580582  }
     583
     584  ALLOCATE (ref, StarData, Nlist[im]);
    581585
    582586  for (i = 0; i < Nlist[im]; i++) {
Note: See TracChangeset for help on using the changeset viewer.