IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38654


Ignore:
Timestamp:
Jul 30, 2015, 6:01:10 PM (11 years ago)
Author:
eugene
Message:

correctly handle missing radial aperture entry

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/src/ReadXradFITS.c

    r38570 r38654  
    1414  /* load the table data */
    1515  if (!gfits_fread_ftable_data (f, &table, FALSE)) {
    16     fprintf (stderr, "ERROR: can't read table header\n");
    17     exit (1);
     16    fprintf (stderr, "WARNING: no xrad data, skipping\n");
     17    return TRUE;
     18  }
     19
     20  if (theader[0].Naxis[1] == 0) {
     21    fprintf (stderr, "WARNING: no xrad data, skipping\n");
     22    return TRUE;
    1823  }
    1924
     
    6570  for (i = 0; i < catalog->Nmeasure; i++) {
    6671    if (catalog->measure[i].detID < RadID[Nap]) {
    67       Nap ++;
    6872      continue;
     73      // this is a psf measurement which does not have a radial aperture
    6974    }
    7075    if (catalog->measure[i].detID > RadID[Nap]) {
    7176      myAbort("radial apertures out of order?  seems like a bug\n");
     77      // this would be a radial aperture which does not have a radial aperture
    7278    }
    7379
     
    95101    Nap ++;
    96102  }
    97   catalog->Nlensing = Nap;
     103  myAssert (Nap == Nrow, "did we go too far???");
    98104
    99105  gfits_free_table (&table);
Note: See TracChangeset for help on using the changeset viewer.