IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29786


Ignore:
Timestamp:
Nov 16, 2010, 12:59:27 PM (15 years ago)
Author:
eugene
Message:

fix dvoverify

Location:
branches/eam_branches/ipp-20101103/Ohana/src/dvomerge/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101103/Ohana/src/dvomerge/src/ReadDeleteList.c

    r29779 r29786  
    55  int j, index, Nindex, NINDEX, *indexList, Nline;
    66  int Nstart, Nbytes, Nread, status;
    7   char *c0, *c1, *space, *indexPoint, *buffer;
     7  char *c0, *c1, *space, *buffer;
    88
     9  char *indexPoint = NULL;
    910  FILE *f = fopen (filename, "r");
    1011  myAssert(f, "failed to open delete list");
  • branches/eam_branches/ipp-20101103/Ohana/src/dvomerge/src/dvorepairDeleteImageList.c

    r29779 r29786  
    109109  Dmin = +90.0;
    110110  Dmax = -90.0;
     111  Qmin = 360.0;
     112  Qmax =   0.0;
    111113  for (i = 0; i < NdeleteIDs; i++) {
    112114    index = deleteIDs[i];
  • branches/eam_branches/ipp-20101103/Ohana/src/dvomerge/src/dvoverify.c

    r29785 r29786  
    99
    1010int VerifyTableFile (char *filename);
     11
     12# define DEBUG 0
    1113
    1214int main (int argc, char **argv) {
     
    7981    if (!inlist[0].regions[i][0].table) continue;
    8082
    81     sprintf (filename, "%s/%s.cpm", catdir, inlist[0].regions[i][0].name);
    82     if (!VerifyTableFile (filename)) {
    83       Nbad ++;
    84     }
    85 
    86     sprintf (filename, "%s/%s.cpm", catdir, inlist[0].regions[i][0].name);
     83    // if (i % 1000 == 0) fprintf (stderr, ".");
     84
     85    sprintf (filename, "%s/%s.cpt", catdir, inlist[0].regions[i][0].name);
     86    if (!VerifyTableFile (filename)) {
     87      Nbad ++;
     88    }
     89
     90    sprintf (filename, "%s/%s.cps", catdir, inlist[0].regions[i][0].name);
    8791    if (!VerifyTableFile (filename)) {
    8892      Nbad ++;
     
    120124    switch (errno) {
    121125      case ENOENT:
    122         // fprintf (stderr, "file does not exist, skipping %s\n", filename);
     126        if (DEBUG) fprintf (stderr, "file does not exist, skipping %s\n", filename);
    123127        return TRUE;
    124128      case ENOMEM:
     
    164168  // scan all extentions
    165169  Nbytes = 0;
    166   while (Nbytes > fileStats.st_size) {
     170  if (DEBUG) fprintf (stderr, "sizes: ("OFF_T_FMT" vs "OFF_T_FMT")\n", Nbytes, fileStats.st_size);
     171  while (Nbytes < fileStats.st_size) {
    167172
    168173    // Check on the PHU
     
    175180    // move to TBL header
    176181    Nbytes += header.datasize + gfits_data_size (&header);
     182    if (DEBUG) fprintf (stderr, "sizes: ("OFF_T_FMT" vs "OFF_T_FMT")\n", Nbytes, fileStats.st_size);
    177183    if (Nbytes > fileStats.st_size) {
    178       fprintf (stderr, "file is short ("OFF_T_FMT" vs "OFF_T_FMT")\n", Nbytes, fileStats.st_size);
     184      fprintf (stderr, "file is short ("OFF_T_FMT" vs "OFF_T_FMT"): %s\n", Nbytes, fileStats.st_size, filename);
    179185      gfits_free_header(&header);
    180186      fclose (file);
     
    201207    }
    202208  }
    203   // fprintf (stderr, "file is good: %s\n", filename);
     209  if (DEBUG) fprintf (stderr, "file is good: %s\n", filename);
    204210  fclose (file);
    205211  return TRUE;
Note: See TracChangeset for help on using the changeset viewer.