Changeset 28013 for trunk/psphot/src/psphotSourceMatch.c
- Timestamp:
- May 18, 2010, 4:11:53 PM (16 years ago)
- Location:
- trunk/psphot
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/psphotSourceMatch.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
-
Property svn:mergeinfo
set to
/branches/eam_branches/psphot.20100506 merged eligible
-
Property svn:mergeinfo
set to
-
trunk/psphot/src/psphotSourceMatch.c
r27657 r28013 1 1 # include "psphotInternal.h" 2 2 3 bool psphotMatchSourcesGenerate (pmConfig *config, const pmFPAview *view, psArray *objects); 4 5 psArray *psphotMatchSources (pmConfig *config, const pmFPAview *view) 3 bool psphotMatchSourcesAddMissing (pmConfig *config, const pmFPAview *view, const char *filerule, psArray *objects); 4 bool psphotMatchSourcesSetIDs (psArray *objects); 5 6 psArray *psphotMatchSources (pmConfig *config, const pmFPAview *view, const char *filerule) 6 7 { 7 8 bool status = true; … … 14 15 // loop over the available readouts 15 16 for (int i = 0; i < num; i++) { 16 if (!psphotMatchSourcesReadout (objects, config, view, "PSPHOT.INPUT", i)) {17 if (!psphotMatchSourcesReadout (objects, config, view, filerule, i)) { 17 18 psError (PSPHOT_ERR_CONFIG, false, "failed to merge sources for PSPHOT.INPUT entry %d", i); 18 19 psFree (objects); … … 21 22 } 22 23 23 psphotMatchSourcesGenerate (config, view, 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); 24 29 25 30 return objects; 26 31 } 27 32 28 bool psphotMatchSourcesReadout (psArray *objects, pmConfig *config, const pmFPAview *view, c har *filename, int index) {33 bool psphotMatchSourcesReadout (psArray *objects, pmConfig *config, const pmFPAview *view, const char *filerule, int index) { 29 34 30 35 bool status = false; … … 38 43 39 44 // find the currently selected readout 40 pmFPAfile *file = pmFPAfileSelectSingle(config->files, file name, index); // File of interest45 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filerule, index); // File of interest 41 46 psAssert (file, "missing file?"); 42 47 … … 145 150 } 146 151 147 bool psphotMatchSources Generate (pmConfig *config, const pmFPAview *view, psArray *objects) {152 bool psphotMatchSourcesAddMissing (pmConfig *config, const pmFPAview *view, const char *filerule, psArray *objects) { 148 153 149 154 bool status = false; … … 167 172 168 173 // find the currently selected readout 169 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PSPHOT.INPUT", i); // File of interest174 pmFPAfile *file = pmFPAfileSelectSingle(config->files, filerule, i); // File of interest 170 175 psAssert (file, "missing file?"); 171 176 … … 255 260 return true; 256 261 } 262 263 bool 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.
