- 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/ppSimPhotomReadout.c
r26900 r27630 6 6 PS_ASSERT_PTR_NON_NULL (readout, NULL); 7 7 8 psArray *sources = psMetadataLookupPtr (NULL, readout->analysis, "PSPHOT.SOURCES"); 8 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); 9 psAssert (detections, "missing detections?"); 10 11 psArray *sources = detections->allSources; 9 12 return sources; 10 13 } … … 151 154 152 155 // create the exported-metadata and free local data 153 // XXX this places the sources on readout->analysis as PSPHOT.SOURCES. modify?154 // (or don't supply the sources, and do this with a different function)155 156 psphotReadoutCleanup(config, readout, recipe, NULL, psf, NULL); 156 157 … … 167 168 psAssert (forceReadout, "no forceReadout?"); 168 169 pmChipSetDataStatus (forceChip, true); 169 psMetadataAddArray (forceReadout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_META_REPLACE, "forced photometry ", forceSources); 170 psFree (forceSources); 170 171 pmDetections *detectionsForce = pmDetectionsAlloc(); 172 detectionForce->allSources = forceSources; 173 174 // save detections on the readout->analysis 175 if (!psMetadataAddPtr (readout->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_META_REPLACE | PS_DATA_UNKNOWN, "force sources", detectionsForce)) { 176 psError (PSPHOT_ERR_CONFIG, false, "problem saving detections on readout"); 177 return false; 178 } 179 psFree(detectionsForce); 171 180 172 181 pmCell *fakeCell = pmFPAfileThisCell (config->files, view, "PPSIM.FAKE.SOURCES"); psAssert (fakeCell, "no cell?"); … … 179 188 psAssert (fakeReadout, "no fakeReadout?"); 180 189 pmChipSetDataStatus (fakeChip, true); 181 psMetadataAddArray (fakeReadout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_META_REPLACE, "fake photometry ", fakeSources); 190 191 pmDetections *detectionsFake = pmDetectionsAlloc(); 192 detectionFake->allSources = fakeSources; 193 194 // save detections on the readout->analysis 195 if (!psMetadataAddPtr (readout->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_META_REPLACE | PS_DATA_UNKNOWN, "fake sources", detectionsFake)) { 196 psError (PSPHOT_ERR_CONFIG, false, "problem saving detections on readout"); 197 return false; 198 } 199 psFree(detectionsFake); 182 200 183 201 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
