Changeset 30189 for trunk/ippToPsps/src/DetectionBatch.c
- Timestamp:
- Dec 27, 2010, 2:41:43 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/src/DetectionBatch.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/DetectionBatch.c
r30147 r30189 82 82 83 83 // stuff for detections table 84 uint32_t s,d, invalidDvoRows, smfJumps,unmatched, totalDetections = 0;84 uint32_t s,d, invalidDvoRows, unmatched, totalDetections = 0; 85 85 86 86 long longnull = -999; … … 123 123 long i; 124 124 bool isDuplicate; 125 uint32_t numOfDuplicates, numInvalidFlux ;125 uint32_t numOfDuplicates, numInvalidFlux, numOfInvalidIppIDet; 126 126 long numDetectionsOut, totalDetectionsOut = 0, numPhotoRef, totalNumPhotoRef = 0; 127 127 long* removeList = (long*)calloc(this->MAXDETECT, sizeof(long)); … … 184 184 numDvoDetections = dvoGetDetections(skylist, image->imageID, &dvoDetections, &maxDvoDetId); 185 185 186 187 186 if (numDvoDetections > this->MAXDETECT ) { 188 187 … … 227 226 228 227 // loop round detections to populate some extra stuff 229 s = d = totalDetections = invalidDvoRows = smfJumps =unmatched = 0;228 s = d = totalDetections = invalidDvoRows = unmatched = 0; 230 229 231 230 // determine column numbers for certain IPP detection columns … … 254 253 numOfDuplicates = 0; 255 254 numInvalidFlux = 0; 255 numOfInvalidIppIDet = 0; 256 256 for (long s = 0; s<nDet; s++) { 257 257 258 258 isDuplicate = false; 259 259 260 // count jumps in smf file 261 if (s>0 && (ippIDet[s] != (ippIDet[s-1] + 1))) smfJumps++; 262 263 while (ippIDet[s] > dvoDetections[d].meas.detID && dvoDetections[d].meas.detID <= maxDvoDetId) { 264 265 d++; 266 if (!dvoDetections[d].valid) invalidDvoRows++; 260 // catch crazy large or negative IPP_IDET 261 if (ippIDet[s] < 0 || ippIDet[s] > maxDvoDetId) { 262 263 removeList[numOfDuplicates+numInvalidFlux+numOfInvalidIppIDet] = s+1; 264 numOfInvalidIppIDet++; 267 265 } 268 266 else { 267 while (ippIDet[s] > dvoDetections[d].meas.detID && dvoDetections[d].meas.detID <= maxDvoDetId) { 268 269 d++; 270 if (!dvoDetections[d].valid) invalidDvoRows++; 271 } 272 } 269 273 if (ippIDet[s] == dvoDetections[d].meas.detID ) { 270 274 … … 273 277 for (i=0; i<totalDetections; i++) { 274 278 if (thisObjId == objID[i]) { 275 removeList[numOfDuplicates+numInvalidFlux ] = s+1;279 removeList[numOfDuplicates+numInvalidFlux+numOfInvalidIppIDet] = s+1; 276 280 numOfDuplicates++; 277 281 isDuplicate=true; … … 296 300 // check for invalid flux values (if not already labelled as a duplicate) 297 301 if ( (!peakFluxOk || !instFluxOk) && !isDuplicate) { 298 removeList[numOfDuplicates+numInvalidFlux ] = s+1;302 removeList[numOfDuplicates+numInvalidFlux+numOfInvalidIppIDet] = s+1; 299 303 numInvalidFlux++; 300 304 } … … 501 505 } 502 506 503 this->MAXDETECT = 150000;507 this->MAXDETECT = 200000; 504 508 505 509 this->print = print;
Note:
See TracChangeset
for help on using the changeset viewer.
