- Timestamp:
- 09/19/13 16:27:27 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/smartfact.cc
r17172 r17192 18 18 #include "DimWriteStatistics.h" 19 19 #include "externals/PixelMap.h" 20 #include "externals/Interpolator2D.h"21 20 22 21 #include "tools.h" … … 601 600 if (!col.empty()) 602 601 out << col; 603 for (auto it=vec. begin(); it!=vec.end(); it++)602 for (auto it=vec.cbegin(); it!=vec.cend(); it++) 604 603 { 605 604 // The valid range is from 1 to 127 … … 684 683 avg = accumulate (t.begin(), t.end(), 0.)/t.size(); 685 684 686 const size_t p = t.size()/2;687 med = p%2 ? copy[p] : (copy[p-1]+copy[p])/2.;685 const size_t p = copy.size()/2; 686 med = copy.size()%2 ? copy[p] : (copy[p-1]+copy[p])/2.; 688 687 } 689 688 }; … … 1751 1750 int HandleFscBiasTemp(const EventImp &d) 1752 1751 { 1753 if (!CheckDataSize(d, "FscControl:BiasTemp", 32 1*4))1752 if (!CheckDataSize(d, "FscControl:BiasTemp", 323*4)) 1754 1753 return GetCurrentState(); 1755 1754 1756 1755 const float *ptr = d.Ptr<float>(4); 1756 const float avg = d.Get<float>(321*4); 1757 //const float rms = d.Get<float>(322*4); 1757 1758 1758 1759 vector<double> tout(320); 1759 double pavg = 0;1760 1760 for (int i=0; i<320; i++) 1761 1761 { 1762 1762 const int idx = (fPixelMap.hv(i).hw()/9)*2+fPixelMap.hv(i).group(); 1763 1763 tout[idx] = ptr[i]; 1764 pavg += ptr[i]; 1765 } 1766 1767 WriteCam(d, "cam-fsccontrol-temperature", tout, 3, pavg/320-1.75); 1764 } 1765 1766 WriteCam(d, "cam-fsccontrol-temperature", tout, 3, avg-1.75); 1768 1767 1769 1768 return GetCurrentState();
Note:
See TracChangeset
for help on using the changeset viewer.