Changeset 27314 for trunk/psphot
- Timestamp:
- Mar 17, 2010, 4:01:19 PM (16 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 2 edited
-
psphotForcedReadout.c (modified) (1 diff)
-
psphotMergeSources.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotForcedReadout.c
r26894 r27314 58 58 psphotGuessModels (config, view); 59 59 60 // merge the newly selected sources into the existing list 61 // NOTE: merge OLD and NEW 62 psphotMergeSources (config, view); 63 60 64 // linear PSF fit to source peaks, subtract the models from the image (in PSF mask) 61 65 psphotFitSourcesLinear (config, view, false); -
trunk/psphot/src/psphotMergeSources.c
r26894 r27314 85 85 86 86 pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS"); 87 psAssert (detections, "missing detections?"); 88 89 // XXX allSources or newSources? 90 psArray *sources = detections->allSources; 87 if (!detections) { 88 detections = pmDetectionsAlloc(); 89 detections->newSources = psArrayAllocEmpty (100); 90 // save detections on the readout->analysis 91 if (!psMetadataAddPtr (readout->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_META_REPLACE | PS_DATA_UNKNOWN, "psphot detections", detections)) { 92 psError (PSPHOT_ERR_CONFIG, false, "problem saving detections on readout"); 93 return false; 94 } 95 } else { 96 psMemIncrRefCounter(detections); // so we can free the detections below 97 } 98 99 psArray *sources = detections->newSources; 91 100 psAssert (sources, "missing sources?"); 92 101 … … 110 119 source->modelPSF = NULL; 111 120 112 psArrayAdd (detections-> allSources, 100, source);121 psArrayAdd (detections->newSources, 100, source); 113 122 } 114 123 } … … 132 141 source->modelPSF = NULL; 133 142 134 psArrayAdd (detections-> allSources, 100, source);143 psArrayAdd (detections->newSources, 100, source); 135 144 } 136 145 } … … 138 147 139 148 finish: 149 150 psFree (detections); 140 151 141 152 if (!extCMF && !extSourcesTXT) {
Note:
See TracChangeset
for help on using the changeset viewer.
