- Timestamp:
- Apr 6, 2010, 6:41:06 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/stackphot.20100406/ppSim/src/ppSimInsertGalaxies.c
r18011 r27630 74 74 int dY = PM_CELL_TO_CHIP (0.0, y0Cell, yParityCell, binning); 75 75 76 // psMetadataLookupPtr (readout->analysis, "PSPHOT.SOURCES", 0); 77 78 psArray *sources = psArrayAllocEmpty (galaxies->n); 79 76 pmDetections *detections = psMetadataLookupPtr (readout->analysis, "PSPHOT.DETECTIONS", 0); 77 if (!detections) { 78 detections = pmDetectionsAlloc(); 79 detection->allSources = psArrayAllocEmpty (galaxies->n); 80 psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_DATA_ARRAY | PS_META_REPLACE, "psphot detections", detections); 81 } else { 82 psMemIncrRefCounter (detections); 83 } 84 psArray *sources = sources = detection->allSources; 80 85 81 86 // add sources to the readout image & weight … … 181 186 } 182 187 183 // NOTE: readout must be part of the pmFPAfile named "PPSIM.OUTPUT"184 // psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY | PS_META_REPLACE, "psphot sources", sources);188 // XXX many leaks in here, i think 189 psFree (detections); 185 190 186 // XXX many leaks in here, i think187 191 return true; 188 192 }
Note:
See TracChangeset
for help on using the changeset viewer.
