Skip to content
Snippets Groups Projects
Commit 47f3884d authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

fixed avg bunch spectrum x axis: removed axisScaleEngine.setBase(2) make -j8...

fixed avg bunch spectrum x axis: removed axisScaleEngine.setBase(2) make -j8 && tput clear && ./bin/lmbf-gui lmbf/delay/l lmbf/rfampl/l  lmbf/processor/l
parent b8036a8a
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ public:
void fill_x_data(int siz) {
x_data.clear();
for(int i = 0; i < siz; i++) {
x_data.push_back((i + 1)/num_turns);
x_data.push_back((i + 1)/num_turns/10);
}
}
};
......@@ -28,7 +28,7 @@ FFTPlot::FFTPlot(QWidget* parent, CumbiaPool *cu_p, const CuControlsFactoryPool&
d->plot_common = new QuPlotCommon(cu_p, fp);
d->num_turns = 1024;
setXLowerBound(0.0);
setXUpperBound(0.5);
setXUpperBound(0.05);
}
FFTPlot::~FFTPlot()
......@@ -78,7 +78,6 @@ void FFTPlot::onUpdate(const CuData &da) {
if(y.size() != d->x_data.size() && y.size() > 0) {
d->fill_x_data(y.size());
setXUpperBound(d->x_data.last());
printf("FFTPlot.update: xl %f xu%f cuz %d != %d\n", xLowerBound(), xUpperBound(), y.size(), d->x_data.size());
}
setData(src, d->x_data, y);
}
......
......@@ -9,6 +9,7 @@
// cumbia
#include <qwt_plot_item.h>
#include <QPen>
#include "ui_lmbf.h"
#include <QDebug>
......@@ -29,7 +30,7 @@ LmbfGui::LmbfGui(CumbiaPool *cumbia_pool, QWidget *parent) :
// fftScale = new fftScaleDraw();
// ui->fftplot->setAxisScaleDraw(QwtPlot::xBottom, fftScale);
ui->fftplot->axisScaleEngine(QwtPlot::xBottom)->setBase(2);
// ui->fftplot->axisScaleEngine(QwtPlot::xBottom)->setBase(2);
num_turns=1024; //fake value for starting
......@@ -113,7 +114,6 @@ void LmbfGui::update_num_turns(double nturns)
int bound= static_cast<int>(num_turns/20);
ui->fftplot->setXUpperBound( bound );
ui->fftplot->setAxisScale(QwtPlot::xBottom, 0.0, bound, 0);
ui->fftplot->axisScaleEngine(QwtPlot::xBottom)->setBase(2);
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment