IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33549


Ignore:
Timestamp:
Mar 16, 2012, 9:54:39 AM (14 years ago)
Author:
eugene
Message:

add some asserts to catch bad things in Mcal

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

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/relphot/src/StarOps.c

    r33458 r33549  
    536536        // set the output calibration
    537537        catalog[i].measure[m].Mcal = Mcal + Mmos + Mgrid;
     538
     539        if (catalog[i].measureT[m].dbFlags & ID_MEAS_PHOTOM_UBERCAL) {
     540          myAssert (isfinite(catalog[i].measure[m].Mcal), "oops, broke an ubercal mag");
     541        }
    538542      }
    539543    }
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/match_zpts_to_images.c

    r33329 r33549  
    4444      image[i].dMcal = NAN;
    4545      image[i].flags &= ~ID_IMAGE_PHOTOM_NOCAL; // clear the NOCAL flag
     46      if (UBERCAL) {
     47        image[i].flags &= ~ID_IMAGE_PHOTOM_UBERCAL; // clear the UBERCAL flag
     48      }
    4649    }
    4750  }
     
    5255    // if (i % 1000 == 0) fprintf (stderr, ".");
    5356    // if (Nz % 100 == 0) fprintf (stderr, "!");
     57
     58    if (!isfinite(zpts[Nz].zpt)) {
     59      Nz++;
     60      continue;
     61    }
    5462
    5563    Ni = index[i];
     
    8189    if (UBERCAL) {
    8290      image[Ni].Mcal = SCALE*code[0].C - zpts[Nz].zpt + 2.5*log10(image[Ni].exptime) + code[0].K*(image[Ni].secz - 1.000);
     91      myAssert (isfinite(image[Ni].Mcal), "oops, ubercal made a nan image");
    8392    } else {
    8493      image[Ni].Mcal = SCALE*code[0].C - zpts[Nz].zpt;
  • branches/eam_branches/ipp-20111122/Ohana/src/uniphot/src/update_catalog_setphot.c

    r33241 r33549  
    2626      catalog[0].measure[m].Mcal = Mcal - Mcal_offset;
    2727      catalog[0].measure[m].dMcal = dMcal;
     28      myAssert(isfinite(catalog[0].measure[m].Mcal), "oops: ubercal made a nan");
    2829
    2930      // if we are setting the zero points from an UBERCAL database, and this detection is from one of those images,
Note: See TracChangeset for help on using the changeset viewer.