IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 19859


Ignore:
Timestamp:
Oct 2, 2008, 10:58:08 AM (18 years ago)
Author:
eugene
Message:

correctly respect useState

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080926/psphot/src/psphotReplaceUnfit.c

    r17828 r19859  
    7171}
    7272
    73 // add source, if the source has been subtracted (or if we ignore the state)
     73// add source, if the source has been subtracted; do not modify state
    7474bool psphotAddWithTest (pmSource *source, bool useState, psMaskType maskVal) {
    7575
     
    7878    if (state && useState) return true;
    7979
    80     // replace the model if 1) state says it is missing or 2) useState is false (just do it)
    81     if (!state || !useState) {
    82         pmSourceAdd (source, PM_MODEL_OP_FULL, maskVal);
    83     }
     80    pmSourceAdd (source, PM_MODEL_OP_FULL, maskVal);
    8481    return true;
    8582}
    8683
    87 // sub source, if the source has been added (or if we ignore the state)
     84// sub source, if the source has been added; do not modify state
    8885bool psphotSubWithTest (pmSource *source, bool useState, psMaskType maskVal) {
    8986
     
    9289    if (state && useState) return true;
    9390
    94     // replace the model if 1) state says it is missing or 2) useState is false (just do it)
    95     if (!state || !useState) {
    96         pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
    97     }
     91    pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
    9892    return true;
    9993}
    10094
    101 // add or sub source replace or if the source has
     95// add or sub source to match recorded state: supply current state as true (add) or false (sub)
    10296bool psphotSetState (pmSource *source, bool curState, psMaskType maskVal) {
    10397
Note: See TracChangeset for help on using the changeset viewer.