- Timestamp:
- Apr 9, 2010, 4:40:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/stackphot.20100406/psModules/src/objects/pmPhotObj.c
r26893 r27648 17 17 #include <pslib.h> 18 18 #include "pmPhotObj.h" 19 #include "pmSource.h" 19 20 20 21 static void pmPhotObjFree (pmPhotObj *tmp) … … 38 39 } 39 40 41 bool pmPhotObjAddSource(pmPhotObj *object, pmSource *source) { 42 43 psAssert (source, "programming error: NULL source"); 44 if (!source->peak) { 45 psError(PS_ERR_UNKNOWN, true, "source missing peak"); 46 return false; 47 } 48 if (!finite(source->peak->xf)) { 49 psError(PS_ERR_UNKNOWN, true, "NAN peak coordinate"); 50 return false; 51 } 52 if (!finite(source->peak->yf)) { 53 psError(PS_ERR_UNKNOWN, true, "NAN peak coordinate"); 54 return false; 55 } 56 57 // XXX we should probably use the fitted position if it exists 58 if (!object->sources) { 59 object->sources = psArrayAllocEmpty(1); 60 object->x = source->peak->xf; 61 object->y = source->peak->yf; 62 } 63 psArrayAdd (object->sources, 1, source); 64 return true; 65 }
Note:
See TracChangeset
for help on using the changeset viewer.
