Definition at line 806 of file fitsdump.cc.
References FitsDumper::DumpStats(), and i.
808 const size_t numElems = array.size()/
sizeof(T);
811 out <<
"Min: -\nMax: -\nMed: -\nAvg: -\nRms: -" << endl;
815 T *val =
reinterpret_cast<T*
>(array.data());
817 sort(val, val+numElems);
819 out <<
"Min: " << double(val[0]) <<
'\n';
820 out <<
"Max: " << double(val[numElems-1]) <<
'\n';
823 out <<
"Med: " << (double(val[numElems/2-1]) + double(val[numElems/2]))/2 <<
'\n';
825 out <<
"Med: " << double(val[numElems/2]) <<
'\n';
829 for (uint32_t
i=0;
i<numElems;
i++)
831 const long double v = val[
i];
839 rms = rms<0 ? 0 : sqrt(rms);
842 out <<
"Avg: " << avg <<
'\n';
843 out <<
"Rms: " << rms << endl;