IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 26, 2010, 4:43:50 PM (16 years ago)
Author:
eugene
Message:

updates to handle image coordinate failures

File:
1 edited

Legend:

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

    r27478 r27488  
    286286  Coords *moscoords, *imcoords;
    287287
     288  // check if this image is bad and should be skipped
     289  if (badCoords(im)) return;
     290
    288291  moscoords = NULL;
    289292  mosaic = getMosaicForImage (im);
     
    292295  }
    293296  imcoords = &image[im].coords;
     297
     298  // accumulate the rms position offsets.  if this value, or any specific entry, is too
     299  // large, we will reset the image to the original coords at the end of the analysis
     300
     301  dPos = 0.0;
     302  nPos = 0;
    294303
    295304  for (i = 0; i < Nlist[im]; i++) {
     
    317326
    318327    if (fabs(catalog[c].measure[m].dR - dR) > 10.0) {
    319       // XXXXX running into this still for last megacam exposure: wrong mosaic?
    320       // ???? inconsistently hitting this????
    321328      fprintf (stderr, "!");
    322       // abort ();
     329      setBadCoords (im); // report a failure for this image
     330      return;
    323331    }
    324332    if (fabs(catalog[c].measure[m].dD - dD) > 10.0) {
    325333      fprintf (stderr, "*");
    326       // abort ();
    327     }
     334      setBadCoords (im); // report a failure for this image
     335      return;
     336    }
     337
     338    dPos += SQ(catalog[c].measure[m].dR - dR) + SQ(catalog[c].measure[m].dD - dD);
     339    nPos ++;
    328340
    329341    catalog[c].measure[m].dR = dR;
     
    341353    }
    342354  }
     355
     356  saveOffsets (dPos, nPos, im);
     357
    343358  return;
    344359}
Note: See TracChangeset for help on using the changeset viewer.