Changeset 26936
- Timestamp:
- Feb 12, 2010, 4:44:06 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ppSub/src/ppSubMatchPSFs.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSubMatchPSFs.c
r26899 r26936 123 123 pmReadout *inSourceRO = pmFPAfileThisReadout(config->files, view, "PPSUB.INPUT.SOURCES"); 124 124 pmReadout *refSourceRO = pmFPAfileThisReadout(config->files, view, "PPSUB.REF.SOURCES"); 125 // XXX assert on inSourcesRO and refSourcesRO? 125 if (!inSourceRO || !refSourceRO) { 126 psWarning("Unable to scale kernel, since no sources were provided."); 127 return true; 128 } 126 129 127 130 pmDetections *inDetections = psMetadataLookupPtr(NULL, inSourceRO->analysis, "PSPHOT.DETECTIONS"); // Input sources … … 214 217 pmDetections *detections = NULL; // Merged detection set 215 218 if (inDetections && refDetections) { 216 psArray *inSources = inDetections->allSources;217 psArray *refSources = refDetections->allSources;218 219 psAssert (inSources, "missing in sources?");220 psAssert (refSources, "missing ref sources?");221 222 detections = pmDetectionsAlloc();219 psArray *inSources = inDetections->allSources; 220 psArray *refSources = refDetections->allSources; 221 222 psAssert (inSources, "missing in sources?"); 223 psAssert (refSources, "missing ref sources?"); 224 225 detections = pmDetectionsAlloc(); 223 226 float radius = psMetadataLookupF32(NULL, recipe, "SOURCE.RADIUS"); // Matching radius 224 227 psArray *lists = psArrayAlloc(2); // Source lists … … 229 232 if (!detections->allSources) { 230 233 psError(PS_ERR_UNKNOWN, false, "Unable to merge source lists"); 231 psFree(detections);234 psFree(detections); 232 235 return false; 233 236 } 234 } 237 } 235 238 if (!detections && inDetections) { 236 239 detections = psMemIncrRefCounter(inDetections); 237 } 240 } 238 241 if (!detections && refDetections) { 239 242 detections = psMemIncrRefCounter(refDetections);
Note:
See TracChangeset
for help on using the changeset viewer.
