IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 26, 2010, 5:10:34 PM (16 years ago)
Author:
eugene
Message:

various API fixes for multi-inputs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/psphot.stack.20100120/src/psphotReplaceUnfit.c

    r26681 r26688  
    5353    // find the currently selected readout
    5454    pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest
    55     psAssert (readout, "missing file?");
     55    psAssert (file, "missing file?");
    5656
    5757    pmReadout *readout = pmFPAviewThisReadout(view, file->fpa);
    5858    psAssert (readout, "missing readout?");
    5959
    60     psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES");
     60    pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS");
     61    psAssert (detections, "missing detections?");
     62
     63    psArray *sources = detections->allSources;
    6164    psAssert (sources, "missing sources?");
    6265
     
    99102    return true;
    100103}
    101 
    102 # if (0)
    103 // add source, if the source has been subtracted; do not modify state
    104 bool psphotAddWithTest (pmSource *source, bool useState, psImageMaskType maskVal) {
    105 
    106     // what is current state? (true : add; false : sub)
    107     bool state = !(source->tmpFlags & PM_SOURCE_TMPF_SUBTRACTED);
    108     if (state && useState) return true;
    109 
    110     pmSourceAdd (source, PM_MODEL_OP_FULL, maskVal);
    111     return true;
    112 }
    113 
    114 // sub source, if the source has been added; do not modify state
    115 bool psphotSubWithTest (pmSource *source, bool useState, psImageMaskType maskVal) {
    116 
    117     // what is current state? (true : sub; false : add)
    118     bool state = (source->tmpFlags & PM_SOURCE_TMPF_SUBTRACTED);
    119     if (state && useState) return true;
    120 
    121     pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
    122     return true;
    123 }
    124 
    125 // add or sub source to match recorded state: supply current state as true (add) or false (sub)
    126 bool psphotSetState (pmSource *source, bool curState, psImageMaskType maskVal) {
    127 
    128     // what is desired state? (true : add; false : sub)
    129     bool newState = !(source->tmpFlags & PM_SOURCE_TMPF_SUBTRACTED);
    130     if (curState == newState) return true;
    131 
    132     if (curState && !newState) {
    133         pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
    134     }
    135     if (newState && !curState) {
    136         pmSourceAdd (source, PM_MODEL_OP_FULL, maskVal);
    137     }
    138     return true;
    139 }
    140 # endif
Note: See TracChangeset for help on using the changeset viewer.