changeset 1201:6f7a440b6218 spectrogram-minor-refactor

Fixes to phase display and colour scale for it; tidy up some debug output
author Chris Cannam
date Fri, 05 Aug 2016 14:31:16 +0100
parents 825d0d7641ba
children 3b84f9bd0048
files base/ColumnOp.h base/RangeMapper.cpp data/model/FFTModel.cpp
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/base/ColumnOp.h	Thu Aug 04 14:02:56 2016 +0100
+++ b/base/ColumnOp.h	Fri Aug 05 14:31:16 2016 +0100
@@ -200,7 +200,7 @@
 
 		    float value = in[bin];
 
-		    if (value > out[y]) {
+		    if (bin == by0 || value > out[y]) {
 			out[y] = value;
 		    }
 		}
--- a/base/RangeMapper.cpp	Thu Aug 04 14:02:56 2016 +0100
+++ b/base/RangeMapper.cpp	Fri Aug 05 14:31:16 2016 +0100
@@ -70,7 +70,7 @@
     double value = m_minval +
         ((double(position - m_minpos) / double(m_maxpos - m_minpos))
          * (m_maxval - m_minval));
-    cerr << "getValueForPositionUnclamped(" << position << "): minval " << m_minval << ", maxval " << m_maxval << ", value " << value << endl;
+//    cerr << "getValueForPositionUnclamped(" << position << "): minval " << m_minval << ", maxval " << m_maxval << ", value " << value << endl;
     return value;
 }
 
--- a/data/model/FFTModel.cpp	Thu Aug 04 14:02:56 2016 +0100
+++ b/data/model/FFTModel.cpp	Fri Aug 05 14:31:16 2016 +0100
@@ -109,7 +109,9 @@
     auto cplx = getFFTColumn(x);
     Column col;
     col.reserve(cplx.size());
-    for (auto c: cplx) col.push_back(arg(c));
+    for (auto c: cplx) {
+        col.push_back(arg(c));
+    }
     return move(col);
 }