Changeset 31513 for trunk/ppStack/src/ppStackPrepare.c
- Timestamp:
- May 10, 2011, 4:12:14 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStackPrepare.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStackPrepare.c
r31158 r31513 144 144 int numCols = 0, numRows = 0; // Size of image 145 145 options->sumExposure = 0.0; 146 int numWithSources = 0; 146 147 for (int i = 0; i < num; i++) { 147 148 pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPSTACK.INPUT", i); // File of interest … … 188 189 pmReadout *ro = pmFPAviewThisReadout(view, file->fpa); // Readout with sources 189 190 detections = psMetadataLookupPtr(NULL, ro->analysis, "PSPHOT.DETECTIONS"); // Sources 190 if (!detections || !detections->allSources ) {191 if (!detections || !detections->allSources || !detections->allSources->n) { 191 192 psWarning("No detections found for image %d --- rejecting.", i); 192 193 options->inputMask->data.PS_TYPE_VECTOR_MASK_DATA[i] = PPSTACK_MASK_CAL; … … 196 197 197 198 options->sourceLists->data[i] = psMemIncrRefCounter(detections->allSources); 199 numWithSources++; 198 200 } 199 201 … … 230 232 ppStackFileActivation(config, PPSTACK_FILES_PREPARE, true); 231 233 } 234 } 235 if (numWithSources < 2) { 236 // This can happen if the inputs have been destreaked 237 psErrorStackPrint(stderr, "Not enough inputs have sources"); 238 psWarning("No inputs have sources --- suspect bad data quality."); 239 if (options->quality == 0) { 240 options->quality = PPSTACK_ERR_DATA; 241 } 242 psErrorClear(); 243 psFree(view); 244 return false; 232 245 } 233 246 … … 308 321 psFree(psfs); 309 322 if (!options->psf) { 323 #if 1 310 324 psError(psErrorCodeLast(), false, "Unable to determine output PSF."); 325 #else 326 // This will repair the problem reproted in ticket 1427 but we aren't yet sure 327 // why ppStackPSF is failing so we are going to continue to fault for now 328 int errorCode = psErrorCodeLast(); 329 if (errorCode == PPSTACK_ERR_PSF) { 330 psErrorStackPrint(stderr, "Unable to determine output PSF."); 331 psWarning("Unable to determine output PSF --- suspect bad data quality."); 332 if (options->quality == 0) { 333 options->quality = errorCode; 334 } 335 psErrorClear(); 336 } else { 337 psError(psErrorCodeLast(), false, "Unable to determine output PSF."); 338 } 339 #endif // notyet 311 340 psFree(view); 312 341 return false;
Note:
See TracChangeset
for help on using the changeset viewer.
