IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8807


Ignore:
Timestamp:
Sep 13, 2006, 9:22:32 AM (20 years ago)
Author:
rhl
Message:

return error if APTREND has unknown value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotApResid.c

    r8780 r8807  
    124124            return false;
    125125        }
    126     }
    127 
    128     // constant and skybias only
    129     if (!strcasecmp (ApTrendOption, "SKYBIAS")) {
     126    } else if (!strcasecmp (ApTrendOption, "SKYBIAS")) { // constant and skybias only
    130127        // first clip out objects which are too far from the median
    131128        stats->clipIter = 2;
     
    145142            return false;
    146143        }
    147     }
    148 
    149     if (!strcasecmp (ApTrendOption, "SKYSAT")) {
     144    } else if (!strcasecmp (ApTrendOption, "SKYSAT")) {
    150145        // first clip out objects which are too far from the median
    151146        stats->clipIter = 2;
     
    174169            return false;
    175170        }
    176     }
    177 
    178     // constant and linear X,Y only
    179     if (!strcasecmp (ApTrendOption, "XY_LIN")) {
     171    } else if (!strcasecmp (ApTrendOption, "XY_LIN")) { // constant and linear X,Y only
    180172        // first clip out objects which are too far from the median
    181173        stats->clipIter = 2;
     
    195187            return false;
    196188        }
    197     }
    198 
    199     // constant and quadratic X,Y only
    200     if (!strcasecmp (ApTrendOption, "XY_QUAD")) {
     189    } else if (!strcasecmp (ApTrendOption, "XY_QUAD")) { // constant and quadratic X,Y only
    201190        // first clip out objects which are too far from the median
    202191        stats->clipIter = 2;
     
    216205            return false;
    217206        }
    218     }
    219 
    220      // constant and sky, linear X,Y only
    221     if (!strcasecmp (ApTrendOption, "SKY_XY_LIN")) {
     207    } else if (!strcasecmp (ApTrendOption, "SKY_XY_LIN")) { // constant and sky, linear X,Y only
    222208        // first clip out objects which are too far from the median
    223209        stats->clipIter = 2;
     
    237223            return false;
    238224        }
    239     }
    240 
    241      // constant and sky, linear X,Y only
    242     if (!strcasecmp (ApTrendOption, "SKYSAT_XY_LIN")) {
     225    } else if (!strcasecmp (ApTrendOption, "SKYSAT_XY_LIN")) { // constant and sky, linear X,Y only
    243226        // first clip out objects which are too far from the median
    244227        stats->clipIter = 2;
     
    267250            return false;
    268251        }
    269     }
    270 
    271     if (!strcasecmp (ApTrendOption, "ALL")) {
     252    } else if (!strcasecmp (ApTrendOption, "ALL")) {
    272253        // first clip out objects which are too far from the median
    273254        stats->clipIter = 2;
     
    296277            return false;
    297278        }
     279    } else {
     280        psError(PSPHOT_ERR_PHOTOM, true, "Unknown APTREND value: %s", ApTrendOption);
     281        return false;
    298282    }
    299283
Note: See TracChangeset for help on using the changeset viewer.