IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 15, 2007, 4:18:51 PM (19 years ago)
Author:
Paul Price
Message:

Ensuring seeing, weighting, scale are set to reasonable values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackCamera.c

    r14404 r14520  
    4040        psString weight = psMetadataLookupStr(&mdok, input, "WEIGHT"); // Name of weight map
    4141
    42         float seeing = psMetadataLookupF32(NULL, input, "SEEING"); // Seeing FWHM
    43         if (isnan(seeing)) {
     42        float seeing = psMetadataLookupF32(&mdok, input, "SEEING"); // Seeing FWHM
     43        if (!mdok || isnan(seeing) || seeing == 0.0) {
    4444            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Component %s lacks SEEING of type F32", item->name);
    4545            psFree(iter);
     
    4747        }
    4848
    49         float weighting = psMetadataLookupF32(NULL, input, "WEIGHTING"); // Relative weighting
    50         if (isnan(weighting)) {
     49        float weighting = psMetadataLookupF32(&mdok, input, "WEIGHTING"); // Relative weighting
     50        if (!mdok || isnan(weighting) || weighting == 0.0) {
    5151            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Component %s lacks WEIGHTING of type F32", item->name);
    5252            psFree(iter);
     
    5454        }
    5555
    56         float scale = psMetadataLookupF32(NULL, input, "SCALE"); // Relative scale
    57         if (isnan(scale)) {
     56        float scale = psMetadataLookupF32(&mdok, input, "SCALE"); // Relative scale
     57        if (!mdok || isnan(scale) || scale == 0.0) {
    5858            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Component %s lacks SCALE of type F32", item->name);
    5959            psFree(iter);
Note: See TracChangeset for help on using the changeset viewer.