Changeset 17026
- Timestamp:
- 08/19/13 16:34:29 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/ratecontrol.cc
r16831 r17026 428 428 { 429 429 // Check if received event is valid 430 if (!CheckEventSize(evt, ( 416+6)*4))430 if (!CheckEventSize(evt, (2*416+8)*4)) 431 431 return GetCurrentState(); 432 432 … … 489 489 avg_dev /= fCurrentsMed.size(); 490 490 491 // One could recalculate the median of all pixels inclu ing the491 // One could recalculate the median of all pixels including the 492 492 // correction for the three crazy pixels, but that is three out 493 493 // of 320. The effect on the median should be negligible anyhow. … … 497 497 { 498 498 const PixelMapEntry &hv = fMap.hv(i); 499 if (!hv) 500 continue; 501 502 // The current is proportional to the rate. To calculate 503 // a measure for the rate, the average current per pixel 504 // is caluclated for the trigger patch. 505 int weight = hv.group() ? 5 : 4; 506 507 // Use only the current in the pixels with the correct 508 // resistor as a reference, ignore the crazy ones. 509 // Effects of these should be corrected by the 510 // rate control later, not the initial setup. 511 if (i==66) 512 weight = 4./(3+10); 513 if (i==191 || i==193) 514 weight = 5./(4+10); 515 516 vec[hv.hw()/9] += it->second[i] * weight; 499 if (hv) 500 vec[hv.hw()/9] += it->second[i]*hv.count(); 517 501 } 518 502 … … 531 515 { 532 516 vec[i] /= fCurrentsVec.size()*9; 517 533 518 avg2 += vec[i]; 534 519
Note:
See TracChangeset
for help on using the changeset viewer.