Mercurial > hg > svcore
comparison data/fft/FFTDataServer.cpp @ 500:83eae5239db6
* Permit viewing (though not editing) colour 3d plot layer data in
the spreadsheet data viewer dialog
* Add somewhat simplistic RDF export for layers
* Fix display of peak frequencies in spectrum layer
* Fix (I hope) sizing of plugin parameter dialog
author | Chris Cannam |
---|---|
date | Tue, 02 Dec 2008 17:17:25 +0000 |
parents | b6dc6c7f402c |
children | bd7c46636bd0 |
comparison
equal
deleted
inserted
replaced
499:b71116d3c180 | 500:83eae5239db6 |
---|---|
914 MutexLocker locker(&m_writeMutex, | 914 MutexLocker locker(&m_writeMutex, |
915 "FFTDataServer::getMagnitudesAt: m_writeMutex"); | 915 "FFTDataServer::getMagnitudesAt: m_writeMutex"); |
916 fillColumn(x, true); | 916 fillColumn(x, true); |
917 } | 917 } |
918 | 918 |
919 float mean = 0.f; | |
919 for (size_t i = 0; i < count; ++i) { | 920 for (size_t i = 0; i < count; ++i) { |
920 values[i] = cache->getMagnitudeAt(col, i * step + minbin); | 921 values[i] = cache->getMagnitudeAt(col, i * step + minbin); |
921 } | 922 mean += values[i]; |
922 | 923 } |
924 if (count > 0) mean /= count; | |
925 | |
926 // std::cerr << "FFTDataServer::getMagnitudeAt: returning " << count << " values of mean " << mean << std::endl; | |
923 return true; | 927 return true; |
924 } | 928 } |
925 | 929 |
926 float | 930 float |
927 FFTDataServer::getNormalizedMagnitudeAt(size_t x, size_t y) | 931 FFTDataServer::getNormalizedMagnitudeAt(size_t x, size_t y) |