IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 12, 2010, 3:54:46 PM (16 years ago)
Author:
eugene
Message:

re-org so we can do radial apertures and extended sources by object, not image

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/psphot.20100506/src/psphotSourceMatch.c

    r27909 r27939  
    11# include "psphotInternal.h"
    22
    3 bool psphotMatchSourcesGenerate (pmConfig *config, const pmFPAview *view, const char *filerule, psArray *objects);
     3bool psphotMatchSourcesAddMissing (pmConfig *config, const pmFPAview *view, const char *filerule, psArray *objects);
     4bool psphotMatchSourcesSetIDs (psArray *objects);
    45 
    56psArray *psphotMatchSources (pmConfig *config, const pmFPAview *view, const char *filerule)
     
    2122    }
    2223
    23     psphotMatchSourcesGenerate (config, view, filerule, objects);
     24    // create sources for images where an object has been detected in the other images
     25    psphotMatchSourcesAddMissing (config, view, filerule, objects);
     26
     27    // choose a consistent position; set common sequence values
     28    psphotMatchSourcesSetIDs (objects);
    2429
    2530    return objects;
     
    145150}
    146151
    147 bool psphotMatchSourcesGenerate (pmConfig *config, const pmFPAview *view, const char *filerule, psArray *objects) {
     152bool psphotMatchSourcesAddMissing (pmConfig *config, const pmFPAview *view, const char *filerule, psArray *objects) {
    148153
    149154    bool status = false;
     
    255260    return true;
    256261}
     262
     263bool psphotMatchSourcesSetIDs (psArray *objects) {
     264
     265    for (int i = 0; i < objects->n; i++) {
     266        pmPhotObj *obj = objects->data[i];
     267
     268        // set the source->seq values
     269        for (int j = 0; j < obj->sources->n; j++) {
     270            pmSource *src = obj->sources->data[j];
     271            src->seq = i;
     272        }
     273    }
     274    return true;
     275}
Note: See TracChangeset for help on using the changeset viewer.