mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-26 00:00:02 +02:00
format GUI
This commit is contained in:
parent
ea4044e4b1
commit
8ff9b0cdac
@ -53,7 +53,6 @@ set(ClangFormat_EXCLUDE_PATTERNS "build/"
|
||||
"slsDetectorServers/"
|
||||
"ctbGui/"
|
||||
"manual/"
|
||||
"slsDetectorGui/"
|
||||
"python/"
|
||||
"sample/"
|
||||
${CMAKE_BINARY_DIR})
|
||||
|
@ -14,7 +14,8 @@ class qCloneWidget : public QMainWindow, private Ui::ClonePlotObject {
|
||||
qCloneWidget(QWidget *parent, SlsQt1DPlot *p1, SlsQt2DPlot *p2,
|
||||
SlsQt1DPlot *gp1, SlsQt2DPlot *gp, QString title,
|
||||
QString filePath, QString fileName, int64_t aIndex,
|
||||
bool displayStats, QString min, QString max, QString sum, bool completeImage);
|
||||
bool displayStats, QString min, QString max, QString sum,
|
||||
bool completeImage);
|
||||
|
||||
~qCloneWidget();
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "ui_form_dac.h"
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
#include "ui_form_dac.h"
|
||||
#include <string>
|
||||
|
||||
class qDacWidget : public QWidget, private Ui::WidgetDacObject {
|
||||
|
@ -6,9 +6,9 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
using std::chrono::duration;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "ui_form_detectormain.h"
|
||||
#include "qDefs.h"
|
||||
#include "Detector.h"
|
||||
#include "qDefs.h"
|
||||
#include "ui_form_detectormain.h"
|
||||
#include <QTabWidget>
|
||||
|
||||
class qDrawPlot;
|
||||
@ -29,7 +29,7 @@ class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
qDetectorMain(int multiId, const std::string& fname, bool isDevel);
|
||||
qDetectorMain(int multiId, const std::string &fname, bool isDevel);
|
||||
~qDetectorMain();
|
||||
|
||||
private slots:
|
||||
@ -51,9 +51,9 @@ class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
||||
|
||||
private:
|
||||
void SetUpWidgetWindow();
|
||||
void SetUpDetector(const std::string& config_file, int multiID);
|
||||
void SetUpDetector(const std::string &config_file, int multiID);
|
||||
void Initialization();
|
||||
void LoadConfigFile(const std::string& config_file);
|
||||
void LoadConfigFile(const std::string &config_file);
|
||||
|
||||
/** enumeration of the tabs */
|
||||
enum {
|
||||
@ -70,7 +70,7 @@ class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
||||
slsDetectorDefs::detectorType detType;
|
||||
std::unique_ptr<sls::Detector> det;
|
||||
qDrawPlot *plot;
|
||||
MyTabWidget* tabs;
|
||||
MyTabWidget *tabs;
|
||||
std::unique_ptr<QScrollArea> scroll[NumberOfTabs];
|
||||
qTabMeasurement *tabMeasurement;
|
||||
qTabDataOutput *tabDataOutput;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "ui_form_plot.h"
|
||||
#include "qDefs.h"
|
||||
#include "Detector.h"
|
||||
#include "qDefs.h"
|
||||
#include "ui_form_plot.h"
|
||||
#include <mutex>
|
||||
|
||||
class SlsQt1DPlot;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_advanced.h"
|
||||
#include "Detector.h"
|
||||
#include "ui_form_tab_advanced.h"
|
||||
|
||||
class qDrawPlot;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_dataoutput.h"
|
||||
#include "Detector.h"
|
||||
#include "ui_form_tab_dataoutput.h"
|
||||
|
||||
class qTabDataOutput : public QWidget, private Ui::TabDataOutputObject {
|
||||
Q_OBJECT
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_debugging.h"
|
||||
#include "Detector.h"
|
||||
#include "ui_form_tab_debugging.h"
|
||||
|
||||
class QTreeWidget;
|
||||
class QTreeWidgetItem;
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_developer.h"
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
#include "ui_form_tab_developer.h"
|
||||
#include <vector>
|
||||
|
||||
class qDacWidget;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_measurement.h"
|
||||
#include "Detector.h"
|
||||
#include "ui_form_tab_measurement.h"
|
||||
|
||||
class qDrawPlot;
|
||||
class QStandardItemModel;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_plot.h"
|
||||
#include "Detector.h"
|
||||
#include "ui_form_tab_plot.h"
|
||||
|
||||
class qDrawPlot;
|
||||
class QButtonGroup;
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
#include "ui_form_tab_settings.h"
|
||||
#include "Detector.h"
|
||||
#include "ui_form_tab_settings.h"
|
||||
|
||||
class qTabSettings : public QWidget, private Ui::TabSettingsObject {
|
||||
Q_OBJECT
|
||||
|
@ -1,8 +1,8 @@
|
||||
#ifndef SLSQT1DPLOT_H
|
||||
#define SLSQT1DPLOT_H
|
||||
|
||||
#include "ansi.h"
|
||||
#include "SlsQt1DZoomer.h"
|
||||
#include "ansi.h"
|
||||
#include <qwt_plot.h>
|
||||
#include <qwt_plot_curve.h>
|
||||
#include <qwt_plot_marker.h>
|
||||
|
@ -1,9 +1,9 @@
|
||||
#ifndef SLSQT2DZOOMER_H
|
||||
#define SLSQT2DZOOMER_H
|
||||
#include "SlsQt2DHist.h"
|
||||
#include <cstdio>
|
||||
#include <qwt_plot_panner.h>
|
||||
#include <qwt_plot_zoomer.h>
|
||||
#include <cstdio>
|
||||
|
||||
class SlsQt2DZoomer : public QwtPlotZoomer {
|
||||
private:
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
/* TODO! short description */
|
||||
#include "SlsQt1DPlot.h"
|
||||
#include <qwt_symbol.h>
|
||||
#include <iostream>
|
||||
#include <qwt_legend.h>
|
||||
#include <qwt_math.h>
|
||||
#include <qwt_painter.h>
|
||||
@ -10,8 +10,8 @@
|
||||
#include <qwt_scale_draw.h>
|
||||
#include <qwt_scale_engine.h>
|
||||
#include <qwt_scale_widget.h>
|
||||
#include <qwt_symbol.h>
|
||||
#include <stdlib.h>
|
||||
#include <iostream>
|
||||
|
||||
#define QwtLog10ScaleEngine QwtLogScaleEngine // hmm
|
||||
|
||||
@ -314,7 +314,8 @@ void SlsQtH1DList::Remove(SlsQtH1D *hist) {
|
||||
hl = hl->the_next;
|
||||
else { // match
|
||||
if (!hl->the_next)
|
||||
hl->the_hist = nullptr; // first the_hist is zero when there's no next
|
||||
hl->the_hist =
|
||||
nullptr; // first the_hist is zero when there's no next
|
||||
else {
|
||||
SlsQtH1DList *t = hl->the_next;
|
||||
hl->the_hist = t->the_hist;
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* TODO! short description */
|
||||
#include "SlsQt1DZoomer.h"
|
||||
#include "SlsQt1DPlot.h"
|
||||
#include <iostream>
|
||||
#include <qwt_plot.h>
|
||||
#include <qwt_scale_div.h>
|
||||
#include <iostream>
|
||||
|
||||
void SlsQt1DZoomer::ResetZoomBase() {
|
||||
SetZoomBase(x0, y0, x1 - x0,
|
||||
|
@ -216,7 +216,7 @@ QwtLinearColorMap *SlsQt2DPlot::myColourMap(QVector<double> colourStops) {
|
||||
}
|
||||
|
||||
QwtLinearColorMap *SlsQt2DPlot::myColourMap(int log) {
|
||||
QVector<double> cs{0.0, 0.34, 0.61 ,0.84, 1.0};
|
||||
QVector<double> cs{0.0, 0.34, 0.61, 0.84, 1.0};
|
||||
if (log) {
|
||||
for (int i = 0; i < cs.size(); ++i)
|
||||
cs[i] = (pow(10, 2 * cs[i]) - 1) / 99.0;
|
||||
@ -224,7 +224,6 @@ QwtLinearColorMap *SlsQt2DPlot::myColourMap(int log) {
|
||||
return myColourMap(cs);
|
||||
}
|
||||
|
||||
|
||||
void SlsQt2DPlot::Update() {
|
||||
if (isLog)
|
||||
hist->SetMinimumToFirstGreaterThanZero();
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "qDacWidget.h"
|
||||
#include "qDefs.h"
|
||||
|
||||
|
||||
qDacWidget::qDacWidget(QWidget *parent, sls::Detector *detector, bool d,
|
||||
std::string n, slsDetectorDefs::dacIndex i)
|
||||
: QWidget(parent), det(detector), isDac(d), index(i) {
|
||||
@ -56,8 +55,8 @@ void qDacWidget::GetDac() {
|
||||
|
||||
void qDacWidget::SetDac() {
|
||||
int val = (int)spinDac->value();
|
||||
LOG(logINFO) << "Setting dac:" << lblDac->text().toAscii().data()
|
||||
<< " : " << val;
|
||||
LOG(logINFO) << "Setting dac:" << lblDac->text().toAscii().data() << " : "
|
||||
<< val;
|
||||
|
||||
try {
|
||||
det->setDAC(index, val, 0, {detectorIndex});
|
||||
|
@ -19,8 +19,8 @@
|
||||
#include <QScrollArea>
|
||||
#include <QSizePolicy>
|
||||
|
||||
#include <string>
|
||||
#include <getopt.h>
|
||||
#include <string>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
@ -57,8 +57,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
case 'f':
|
||||
fname = optarg;
|
||||
LOG(logDEBUG)
|
||||
<< long_options[option_index].name << " " << optarg;
|
||||
LOG(logDEBUG) << long_options[option_index].name << " " << optarg;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
@ -72,7 +71,7 @@ int main(int argc, char **argv) {
|
||||
case 'v':
|
||||
tempval = APIGUI;
|
||||
LOG(logINFO) << "SLS Detector GUI " << GITBRANCH << " (0x"
|
||||
<< std::hex << tempval << ")";
|
||||
<< std::hex << tempval << ")";
|
||||
return 0;
|
||||
|
||||
case 'h':
|
||||
@ -93,7 +92,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
QApplication app(argc, argv);
|
||||
app.setStyle(new QPlastiqueStyle); //style is deleted by QApplication
|
||||
app.setStyle(new QPlastiqueStyle); // style is deleted by QApplication
|
||||
try {
|
||||
qDetectorMain det(multiId, fname, isDeveloper);
|
||||
det.show();
|
||||
@ -105,18 +104,18 @@ int main(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
qDetectorMain::qDetectorMain(int multiId, const std::string& fname, bool isDevel)
|
||||
: QMainWindow(nullptr), detType(slsDetectorDefs::GENERIC), isDeveloper(isDevel),
|
||||
heightPlotWindow(0), heightCentralWidget(0) {
|
||||
qDetectorMain::qDetectorMain(int multiId, const std::string &fname,
|
||||
bool isDevel)
|
||||
: QMainWindow(nullptr), detType(slsDetectorDefs::GENERIC),
|
||||
isDeveloper(isDevel), heightPlotWindow(0), heightCentralWidget(0) {
|
||||
|
||||
setupUi(this);
|
||||
SetUpDetector(fname, multiId);
|
||||
SetUpWidgetWindow();
|
||||
}
|
||||
|
||||
qDetectorMain::~qDetectorMain(){
|
||||
disconnect(tabs, SIGNAL(currentChanged(int)), this,
|
||||
SLOT(Refresh(int)));
|
||||
qDetectorMain::~qDetectorMain() {
|
||||
disconnect(tabs, SIGNAL(currentChanged(int)), this, SLOT(Refresh(int)));
|
||||
}
|
||||
|
||||
void qDetectorMain::SetUpWidgetWindow() {
|
||||
@ -132,8 +131,7 @@ void qDetectorMain::SetUpWidgetWindow() {
|
||||
layoutTabs->addWidget(tabs);
|
||||
|
||||
// creating all the other tab widgets
|
||||
tabMeasurement =
|
||||
new qTabMeasurement(this, det.get(), plot);
|
||||
tabMeasurement = new qTabMeasurement(this, det.get(), plot);
|
||||
tabDataOutput = new qTabDataOutput(this, det.get());
|
||||
tabPlot = new qTabPlot(this, det.get(), plot);
|
||||
tabSettings = new qTabSettings(this, det.get());
|
||||
@ -206,7 +204,7 @@ void qDetectorMain::SetUpWidgetWindow() {
|
||||
Initialization();
|
||||
}
|
||||
|
||||
void qDetectorMain::SetUpDetector(const std::string& config_file, int multiID) {
|
||||
void qDetectorMain::SetUpDetector(const std::string &config_file, int multiID) {
|
||||
|
||||
// instantiate detector and set window title
|
||||
det = sls::make_unique<sls::Detector>(multiID);
|
||||
@ -260,8 +258,8 @@ void qDetectorMain::Initialization() {
|
||||
// Measurement tab
|
||||
connect(tabMeasurement, SIGNAL(EnableTabsSignal(bool)), this,
|
||||
SLOT(EnableTabs(bool)));
|
||||
connect(tabMeasurement, SIGNAL(FileNameChangedSignal(QString)),
|
||||
plot, SLOT(SetSaveFileName(QString)));
|
||||
connect(tabMeasurement, SIGNAL(FileNameChangedSignal(QString)), plot,
|
||||
SLOT(SetSaveFileName(QString)));
|
||||
// Plot tab
|
||||
connect(tabPlot, SIGNAL(DisableZoomSignal(bool)), this,
|
||||
SLOT(SetZoomToolTip(bool)));
|
||||
@ -269,8 +267,7 @@ void qDetectorMain::Initialization() {
|
||||
// Plotting
|
||||
connect(plot, SIGNAL(AcquireFinishedSignal()), tabMeasurement,
|
||||
SLOT(AcquireFinished()));
|
||||
connect(plot, SIGNAL(AbortSignal()), tabMeasurement,
|
||||
SLOT(AbortAcquire()));
|
||||
connect(plot, SIGNAL(AbortSignal()), tabMeasurement, SLOT(AbortAcquire()));
|
||||
|
||||
// menubar
|
||||
// Modes Menu
|
||||
@ -284,7 +281,7 @@ void qDetectorMain::Initialization() {
|
||||
SLOT(ExecuteHelp(QAction *)));
|
||||
}
|
||||
|
||||
void qDetectorMain::LoadConfigFile(const std::string& config_file) {
|
||||
void qDetectorMain::LoadConfigFile(const std::string &config_file) {
|
||||
|
||||
LOG(logINFO) << "Loading config file at start up:" << config_file;
|
||||
|
||||
@ -372,8 +369,7 @@ void qDetectorMain::ExecuteUtilities(QAction *action) {
|
||||
"The Configuration Parameters have been "
|
||||
"configured successfully.",
|
||||
"qDetectorMain::ExecuteUtilities");
|
||||
LOG(logINFO)
|
||||
<< "Configuration Parameters loaded successfully";
|
||||
LOG(logINFO) << "Configuration Parameters loaded successfully";
|
||||
}
|
||||
}
|
||||
|
||||
@ -438,7 +434,7 @@ void qDetectorMain::ExecuteUtilities(QAction *action) {
|
||||
void qDetectorMain::ExecuteHelp(QAction *action) {
|
||||
if (action == actionAbout) {
|
||||
LOG(logINFO) << "About Common GUI for Jungfrau, Eiger, Mythen3, "
|
||||
"Gotthard, Gotthard2 and Moench detectors";
|
||||
"Gotthard, Gotthard2 and Moench detectors";
|
||||
|
||||
std::string guiVersion = std::to_string(APIGUI);
|
||||
std::string clientVersion = "unknown";
|
||||
|
@ -51,16 +51,16 @@ void qDrawPlot::SetupWidgetWindow() {
|
||||
gainMask = (3 << 14);
|
||||
gainOffset = 14;
|
||||
LOG(logINFO) << "Pixel Mask: " << std::hex << pixelMask
|
||||
<< ", Gain Mask:" << gainMask
|
||||
<< ", Gain Offset:" << std::dec << gainOffset;
|
||||
<< ", Gain Mask:" << gainMask
|
||||
<< ", Gain Offset:" << std::dec << gainOffset;
|
||||
break;
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
pixelMask = ((1 << 12) - 1);
|
||||
gainMask = (3 << 12);
|
||||
gainOffset = 12;
|
||||
LOG(logINFO) << "Pixel Mask: " << std::hex << pixelMask
|
||||
<< ", Gain Mask:" << gainMask
|
||||
<< ", Gain Offset:" << std::dec << gainOffset;
|
||||
<< ", Gain Mask:" << gainMask
|
||||
<< ", Gain Offset:" << std::dec << gainOffset;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -277,8 +277,7 @@ void qDrawPlot::SetPlotTitlePrefix(QString title) {
|
||||
}
|
||||
|
||||
void qDrawPlot::SetXAxisTitle(QString title) {
|
||||
LOG(logINFO) << "Setting X Axis Title to "
|
||||
<< title.toAscii().constData();
|
||||
LOG(logINFO) << "Setting X Axis Title to " << title.toAscii().constData();
|
||||
if (is1d) {
|
||||
xTitle1d = title;
|
||||
} else {
|
||||
@ -287,8 +286,7 @@ void qDrawPlot::SetXAxisTitle(QString title) {
|
||||
}
|
||||
|
||||
void qDrawPlot::SetYAxisTitle(QString title) {
|
||||
LOG(logINFO) << "Setting Y Axis Title to "
|
||||
<< title.toAscii().constData();
|
||||
LOG(logINFO) << "Setting Y Axis Title to " << title.toAscii().constData();
|
||||
if (is1d) {
|
||||
yTitle1d = title;
|
||||
} else {
|
||||
@ -297,8 +295,7 @@ void qDrawPlot::SetYAxisTitle(QString title) {
|
||||
}
|
||||
|
||||
void qDrawPlot::SetZAxisTitle(QString title) {
|
||||
LOG(logINFO) << "Setting Z Axis Title to "
|
||||
<< title.toAscii().constData();
|
||||
LOG(logINFO) << "Setting Z Axis Title to " << title.toAscii().constData();
|
||||
zTitle2d = title;
|
||||
}
|
||||
|
||||
@ -309,8 +306,8 @@ void qDrawPlot::SetXYRangeChanged(bool disable, double *xy, bool *isXY) {
|
||||
std::copy(xy, xy + 4, xyRange);
|
||||
std::copy(isXY, isXY + 4, isXYRange);
|
||||
|
||||
LOG(logDEBUG) << "Setting Disable zoom to " << std::boolalpha
|
||||
<< disable << std::noboolalpha;
|
||||
LOG(logDEBUG) << "Setting Disable zoom to " << std::boolalpha << disable
|
||||
<< std::noboolalpha;
|
||||
disableZoom = disable;
|
||||
}
|
||||
|
||||
@ -348,8 +345,8 @@ double qDrawPlot::GetYMaximum() {
|
||||
}
|
||||
|
||||
void qDrawPlot::SetDataCallBack(bool enable) {
|
||||
LOG(logINFO) << "Setting data call back to " << std::boolalpha
|
||||
<< enable << std::noboolalpha;
|
||||
LOG(logINFO) << "Setting data call back to " << std::boolalpha << enable
|
||||
<< std::noboolalpha;
|
||||
try {
|
||||
if (enable) {
|
||||
isPlot = true;
|
||||
@ -360,13 +357,14 @@ void qDrawPlot::SetDataCallBack(bool enable) {
|
||||
det->registerDataCallback(nullptr, this);
|
||||
det->setRxZmqDataStream(false);
|
||||
}
|
||||
} CATCH_DISPLAY("Could not get set rxr data streaming enable.",
|
||||
}
|
||||
CATCH_DISPLAY("Could not get set rxr data streaming enable.",
|
||||
"qDrawPlot::SetDataCallBack")
|
||||
}
|
||||
|
||||
void qDrawPlot::SetBinary(bool enable, int from, int to) {
|
||||
LOG(logINFO) << (enable ? "Enabling" : "Disabling")
|
||||
<< " Binary output from " << from << " to " << to;
|
||||
<< " Binary output from " << from << " to " << to;
|
||||
binaryFrom = from;
|
||||
binaryTo = to;
|
||||
isBinary = enable;
|
||||
@ -380,7 +378,7 @@ void qDrawPlot::SetPersistency(int val) {
|
||||
void qDrawPlot::SetLines(bool enable) {
|
||||
std::lock_guard<std::mutex> lock(mPlots);
|
||||
LOG(logINFO) << "Setting Lines to " << std::boolalpha << enable
|
||||
<< std::noboolalpha;
|
||||
<< std::noboolalpha;
|
||||
isLines = enable;
|
||||
for (int i = 0; i < nHists; ++i) {
|
||||
SlsQtH1D *h = hists1d.at(i);
|
||||
@ -391,7 +389,7 @@ void qDrawPlot::SetLines(bool enable) {
|
||||
void qDrawPlot::SetMarkers(bool enable) {
|
||||
std::lock_guard<std::mutex> lock(mPlots);
|
||||
LOG(logINFO) << "Setting Markers to " << std::boolalpha << enable
|
||||
<< std::noboolalpha;
|
||||
<< std::noboolalpha;
|
||||
isMarkers = enable;
|
||||
for (int i = 0; i < nHists; ++i) {
|
||||
SlsQtH1D *h = hists1d.at(i);
|
||||
@ -402,28 +400,28 @@ void qDrawPlot::SetMarkers(bool enable) {
|
||||
void qDrawPlot::Set1dLogY(bool enable) {
|
||||
std::lock_guard<std::mutex> lock(mPlots);
|
||||
LOG(logINFO) << "Setting Log Y to " << std::boolalpha << enable
|
||||
<< std::noboolalpha;
|
||||
<< std::noboolalpha;
|
||||
plot1d->SetLogY(enable);
|
||||
}
|
||||
|
||||
void qDrawPlot::SetInterpolate(bool enable) {
|
||||
std::lock_guard<std::mutex> lock(mPlots);
|
||||
LOG(logINFO) << "Setting Interpolate to " << std::boolalpha << enable
|
||||
<< std::noboolalpha;
|
||||
<< std::noboolalpha;
|
||||
plot2d->SetInterpolate(enable);
|
||||
}
|
||||
|
||||
void qDrawPlot::SetContour(bool enable) {
|
||||
std::lock_guard<std::mutex> lock(mPlots);
|
||||
LOG(logINFO) << "Setting Countour to " << std::boolalpha << enable
|
||||
<< std::noboolalpha;
|
||||
<< std::noboolalpha;
|
||||
plot2d->SetContour(enable);
|
||||
}
|
||||
|
||||
void qDrawPlot::SetLogz(bool enable) {
|
||||
std::lock_guard<std::mutex> lock(mPlots);
|
||||
LOG(logINFO) << "Setting Log Z to " << std::boolalpha << enable
|
||||
<< std::noboolalpha;
|
||||
<< std::noboolalpha;
|
||||
plot2d->SetLogz(enable, isZRange[0], isZRange[1], zRange[0], zRange[1]);
|
||||
}
|
||||
|
||||
@ -455,7 +453,7 @@ void qDrawPlot::ResetAccumulate() {
|
||||
|
||||
void qDrawPlot::DisplayStatistics(bool enable) {
|
||||
LOG(logINFO) << (enable ? "Enabling" : "Disabling")
|
||||
<< " Statistics Display";
|
||||
<< " Statistics Display";
|
||||
displayStatistics = enable;
|
||||
}
|
||||
|
||||
@ -471,7 +469,7 @@ void qDrawPlot::EnableGainPlot(bool enable) {
|
||||
|
||||
void qDrawPlot::SetSaveFileName(QString val) {
|
||||
LOG(logDEBUG) << "Setting Clone/Save File Name to "
|
||||
<< val.toAscii().constData();
|
||||
<< val.toAscii().constData();
|
||||
fileSaveName = val;
|
||||
}
|
||||
|
||||
@ -570,8 +568,8 @@ void qDrawPlot::ClonePlot() {
|
||||
new qCloneWidget(this, cloneplot1D, cloneplot2D, clonegainplot1D,
|
||||
clonegainplot2D, boxPlot->title(), fileSavePath,
|
||||
fileSaveName, currentAcqIndex, displayStatistics,
|
||||
lblMinDisp->text(), lblMaxDisp->text(),
|
||||
lblSumDisp->text(), completeImage);
|
||||
lblMinDisp->text(), lblMaxDisp->text(), lblSumDisp->text(),
|
||||
completeImage);
|
||||
}
|
||||
|
||||
void qDrawPlot::SavePlot() {
|
||||
@ -673,8 +671,7 @@ void qDrawPlot::AcquireThread() {
|
||||
// exception in acquire will not call acquisition finished call back, so
|
||||
// handle it
|
||||
if (!mess.empty()) {
|
||||
LOG(logERROR) << "Acquisition Finished with an exception: "
|
||||
<< mess;
|
||||
LOG(logERROR) << "Acquisition Finished with an exception: " << mess;
|
||||
qDefs::ExceptionMessage("Acquire unsuccessful.", mess,
|
||||
"qDrawPlot::AcquireFinished");
|
||||
try {
|
||||
@ -720,7 +717,7 @@ void qDrawPlot::AcquisitionFinished(double currentProgress,
|
||||
LOG(logERROR) << "Acquisition finished [Status: ERROR]";
|
||||
} else {
|
||||
LOG(logINFO) << "Acquisition finished [ Status:" << status
|
||||
<< ", Progress: " << currentProgress << " ]";
|
||||
<< ", Progress: " << currentProgress << " ]";
|
||||
}
|
||||
emit AcquireFinishedSignal();
|
||||
}
|
||||
@ -729,27 +726,26 @@ void qDrawPlot::GetData(detectorData *data, uint64_t frameIndex,
|
||||
uint32_t subFrameIndex) {
|
||||
std::lock_guard<std::mutex> lock(mPlots);
|
||||
LOG(logDEBUG) << "* GetData Callback *" << std::endl
|
||||
<< " frame index: " << frameIndex << std::endl
|
||||
<< " sub frame index: "
|
||||
<< (((int)subFrameIndex == -1) ? (int)-1 : subFrameIndex)
|
||||
<< std::endl
|
||||
<< " Data [" << std::endl
|
||||
<< " \t progress: " << data->progressIndex << std::endl
|
||||
<< " \t file name: " << data->fileName << std::endl
|
||||
<< " \t nx: " << data->nx << std::endl
|
||||
<< " \t ny: " << data->ny << std::endl
|
||||
<< " \t data bytes: " << data->databytes << std::endl
|
||||
<< " \t dynamic range: " << data->dynamicRange
|
||||
<< std::endl
|
||||
<< " \t file index: " << data->fileIndex << std::endl
|
||||
<< " \t complete image: " << data->completeImage << std::endl
|
||||
<< " ]";
|
||||
<< " frame index: " << frameIndex << std::endl
|
||||
<< " sub frame index: "
|
||||
<< (((int)subFrameIndex == -1) ? (int)-1 : subFrameIndex)
|
||||
<< std::endl
|
||||
<< " Data [" << std::endl
|
||||
<< " \t progress: " << data->progressIndex << std::endl
|
||||
<< " \t file name: " << data->fileName << std::endl
|
||||
<< " \t nx: " << data->nx << std::endl
|
||||
<< " \t ny: " << data->ny << std::endl
|
||||
<< " \t data bytes: " << data->databytes << std::endl
|
||||
<< " \t dynamic range: " << data->dynamicRange << std::endl
|
||||
<< " \t file index: " << data->fileIndex << std::endl
|
||||
<< " \t complete image: " << data->completeImage << std::endl
|
||||
<< " ]";
|
||||
|
||||
progress = (int)data->progressIndex;
|
||||
currentAcqIndex = data->fileIndex;
|
||||
currentFrame = frameIndex;
|
||||
LOG(logDEBUG) << "[ Progress:" << progress
|
||||
<< ", Frame:" << currentFrame << " ]";
|
||||
LOG(logDEBUG) << "[ Progress:" << progress << ", Frame:" << currentFrame
|
||||
<< " ]";
|
||||
|
||||
// 2d (only image, not gain data, not pedestalvals),
|
||||
// check if npixelsX and npixelsY is the same (quad is different)
|
||||
@ -757,8 +753,8 @@ void qDrawPlot::GetData(detectorData *data, uint64_t frameIndex,
|
||||
static_cast<int>(nPixelsY) != data->ny)) {
|
||||
nPixelsX = data->nx;
|
||||
nPixelsY = data->ny;
|
||||
LOG(logINFO) << "Change in Detector Shape:\n\tnPixelsX:"
|
||||
<< nPixelsX << " nPixelsY:" << nPixelsY;
|
||||
LOG(logINFO) << "Change in Detector Shape:\n\tnPixelsX:" << nPixelsX
|
||||
<< " nPixelsY:" << nPixelsY;
|
||||
|
||||
delete[] data2d;
|
||||
data2d = new double[nPixelsY * nPixelsX];
|
||||
@ -815,8 +811,8 @@ void qDrawPlot::GetData(detectorData *data, uint64_t frameIndex,
|
||||
}
|
||||
// calculate the pedestal value
|
||||
if (pedestalCount == NUM_PEDESTAL_FRAMES) {
|
||||
LOG(logINFO) << "Pedestal Calculated after "
|
||||
<< NUM_PEDESTAL_FRAMES << " frames";
|
||||
LOG(logINFO) << "Pedestal Calculated after " << NUM_PEDESTAL_FRAMES
|
||||
<< " frames";
|
||||
for (unsigned int px = 0; px < nPixels; ++px)
|
||||
tempPedestalVals[px] =
|
||||
tempPedestalVals[px] / (double)NUM_PEDESTAL_FRAMES;
|
||||
@ -1115,7 +1111,7 @@ void qDrawPlot::UpdatePlot() {
|
||||
// notify of incomplete images
|
||||
lblCompleteImage->hide();
|
||||
lblInCompleteImage->hide();
|
||||
if(completeImage) {
|
||||
if (completeImage) {
|
||||
lblCompleteImage->show();
|
||||
} else {
|
||||
lblInCompleteImage->show();
|
||||
|
@ -350,7 +350,7 @@ void qTabAdvanced::GetRxrZMQIP() {
|
||||
|
||||
void qTabAdvanced::SetDetector() {
|
||||
LOG(logDEBUG) << "Set Detector: "
|
||||
<< comboDetector->currentText().toAscii().data();
|
||||
<< comboDetector->currentText().toAscii().data();
|
||||
|
||||
GetControlPort();
|
||||
GetStopPort();
|
||||
@ -531,8 +531,7 @@ void qTabAdvanced::SetROI() {
|
||||
roi.xmax = spinXmax->value();
|
||||
|
||||
// set roi
|
||||
LOG(logINFO) << "Setting ROI: [" << roi.xmin << ", " << roi.xmax
|
||||
<< "]";
|
||||
LOG(logINFO) << "Setting ROI: [" << roi.xmin << ", " << roi.xmax << "]";
|
||||
try {
|
||||
det->setROI(roi, {comboReadout->currentIndex()});
|
||||
}
|
||||
@ -586,8 +585,7 @@ void qTabAdvanced::GetNumStoragecells() {
|
||||
}
|
||||
|
||||
void qTabAdvanced::SetNumStoragecells(int value) {
|
||||
LOG(logINFO) << "Setting number of additional stoarge cells: "
|
||||
<< value;
|
||||
LOG(logINFO) << "Setting number of additional stoarge cells: " << value;
|
||||
try {
|
||||
det->setNumberOfAdditionalStorageCells(value);
|
||||
}
|
||||
@ -621,11 +619,11 @@ void qTabAdvanced::SetSubExposureTime() {
|
||||
auto timeNS = qDefs::getNSTime(std::make_pair(
|
||||
spinSubExpTime->value(),
|
||||
static_cast<qDefs::timeUnit>(comboSubExpTimeUnit->currentIndex())));
|
||||
LOG(logINFO)
|
||||
<< "Setting sub frame acquisition time to " << timeNS.count() << " ns"
|
||||
<< "/" << spinSubExpTime->value()
|
||||
<< qDefs::getUnitString(
|
||||
(qDefs::timeUnit)comboSubExpTimeUnit->currentIndex());
|
||||
LOG(logINFO) << "Setting sub frame acquisition time to " << timeNS.count()
|
||||
<< " ns"
|
||||
<< "/" << spinSubExpTime->value()
|
||||
<< qDefs::getUnitString(
|
||||
(qDefs::timeUnit)comboSubExpTimeUnit->currentIndex());
|
||||
try {
|
||||
det->setSubExptime(timeNS);
|
||||
}
|
||||
@ -661,11 +659,10 @@ void qTabAdvanced::SetSubDeadTime() {
|
||||
spinSubDeadTime->value(),
|
||||
static_cast<qDefs::timeUnit>(comboSubDeadTimeUnit->currentIndex())));
|
||||
|
||||
LOG(logINFO)
|
||||
<< "Setting sub frame dead time to " << timeNS.count() << " ns"
|
||||
<< "/" << spinSubDeadTime->value()
|
||||
<< qDefs::getUnitString(
|
||||
(qDefs::timeUnit)comboSubDeadTimeUnit->currentIndex());
|
||||
LOG(logINFO) << "Setting sub frame dead time to " << timeNS.count() << " ns"
|
||||
<< "/" << spinSubDeadTime->value()
|
||||
<< qDefs::getUnitString(
|
||||
(qDefs::timeUnit)comboSubDeadTimeUnit->currentIndex());
|
||||
try {
|
||||
det->setSubDeadTime(timeNS);
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ void qTabDataOutput::BrowseOutputDir() {
|
||||
void qTabDataOutput::SetOutputDir() {
|
||||
QString path = dispOutputDir->text();
|
||||
LOG(logDEBUG) << "Setting output directory to "
|
||||
<< path.toAscii().constData();
|
||||
<< path.toAscii().constData();
|
||||
|
||||
// empty
|
||||
if (path.isEmpty()) {
|
||||
@ -222,7 +222,7 @@ void qTabDataOutput::GetFileFormat() {
|
||||
|
||||
void qTabDataOutput::SetFileFormat(int format) {
|
||||
LOG(logINFO) << "Setting File Format to "
|
||||
<< comboFileFormat->currentText().toAscii().data();
|
||||
<< comboFileFormat->currentText().toAscii().data();
|
||||
try {
|
||||
det->setFileFormat(static_cast<slsDetectorDefs::fileFormat>(
|
||||
comboFileFormat->currentIndex()));
|
||||
@ -334,15 +334,13 @@ void qTabDataOutput::SetRateCorrection() {
|
||||
// custom dead time
|
||||
if (radioCustomDeadtime->isChecked()) {
|
||||
int64_t deadtime = spinCustomDeadTime->value();
|
||||
LOG(logINFO)
|
||||
<< "Setting Rate Correction with custom dead time: "
|
||||
<< deadtime;
|
||||
LOG(logINFO) << "Setting Rate Correction with custom dead time: "
|
||||
<< deadtime;
|
||||
det->setRateCorrection(sls::ns(deadtime));
|
||||
}
|
||||
// default dead time
|
||||
else {
|
||||
LOG(logINFO)
|
||||
<< "Setting Rate Correction with default dead time";
|
||||
LOG(logINFO) << "Setting Rate Correction with default dead time";
|
||||
det->setDefaultRateCorrection();
|
||||
}
|
||||
}
|
||||
@ -367,7 +365,7 @@ void qTabDataOutput::GetSpeed() {
|
||||
|
||||
void qTabDataOutput::SetSpeed(int speed) {
|
||||
LOG(logINFO) << "Setting Speed to "
|
||||
<< comboEigerClkDivider->currentText().toAscii().data();
|
||||
<< comboEigerClkDivider->currentText().toAscii().data();
|
||||
;
|
||||
try {
|
||||
det->setSpeed(static_cast<slsDetectorDefs::speedLevel>(speed));
|
||||
@ -398,9 +396,8 @@ void qTabDataOutput::SetFlags() {
|
||||
auto mode =
|
||||
comboEigerParallelFlag->currentIndex() == PARALLEL ? true : false;
|
||||
try {
|
||||
LOG(logINFO)
|
||||
<< "Setting Readout Flags to "
|
||||
<< comboEigerParallelFlag->currentText().toAscii().data();
|
||||
LOG(logINFO) << "Setting Readout Flags to "
|
||||
<< comboEigerParallelFlag->currentText().toAscii().data();
|
||||
det->setParallelMode(mode);
|
||||
}
|
||||
CATCH_HANDLE("Could not set readout flags.", "qTabDataOutput::SetFlags",
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "qTabDebugging.h"
|
||||
#include "qDefs.h"
|
||||
#include "ToString.h"
|
||||
#include "qDefs.h"
|
||||
#include <QDesktopWidget>
|
||||
#include <QGridLayout>
|
||||
#include <QTreeWidget>
|
||||
@ -105,8 +105,9 @@ void qTabDebugging::GetInfo() {
|
||||
treeDet->setHeaderLabel("Eiger Detector");
|
||||
// get num modules
|
||||
for (int i = 0; i < comboDetector->count() / 2; ++i)
|
||||
items.append(new QTreeWidgetItem(
|
||||
(QTreeWidget *)nullptr, QStringList(QString("Module %1").arg(i))));
|
||||
items.append(
|
||||
new QTreeWidgetItem((QTreeWidget *)nullptr,
|
||||
QStringList(QString("Module %1").arg(i))));
|
||||
treeDet->insertTopLevelItems(0, items);
|
||||
// gets det names
|
||||
for (int i = 0; i < comboDetector->count(); ++i) {
|
||||
|
@ -297,7 +297,7 @@ void qTabMeasurement::GetTimingMode() {
|
||||
|
||||
void qTabMeasurement::SetTimingMode(int val) {
|
||||
LOG(logINFO) << "Setting timing mode:"
|
||||
<< comboTimingMode->currentText().toAscii().data();
|
||||
<< comboTimingMode->currentText().toAscii().data();
|
||||
try {
|
||||
det->setTimingMode(static_cast<slsDetectorDefs::timingMode>(val));
|
||||
EnableWidgetsforTimingMode();
|
||||
@ -438,7 +438,7 @@ void qTabMeasurement::SetExposureTime() {
|
||||
auto val = spinExpTime->value();
|
||||
auto unit = static_cast<qDefs::timeUnit>(comboExpUnit->currentIndex());
|
||||
LOG(logINFO) << "Setting exposure time to " << val << " "
|
||||
<< qDefs::getUnitString(unit);
|
||||
<< qDefs::getUnitString(unit);
|
||||
try {
|
||||
auto timeNS = qDefs::getNSTime(std::make_pair(val, unit));
|
||||
det->setExptime(timeNS);
|
||||
@ -476,7 +476,7 @@ void qTabMeasurement::SetAcquisitionPeriod() {
|
||||
auto val = spinPeriod->value();
|
||||
auto unit = static_cast<qDefs::timeUnit>(comboPeriodUnit->currentIndex());
|
||||
LOG(logINFO) << "Setting acquisition period to " << val << " "
|
||||
<< qDefs::getUnitString(unit);
|
||||
<< qDefs::getUnitString(unit);
|
||||
try {
|
||||
auto timeNS = qDefs::getNSTime(std::make_pair(val, unit));
|
||||
det->setPeriod(timeNS);
|
||||
@ -537,7 +537,7 @@ void qTabMeasurement::SetDelay() {
|
||||
auto val = spinDelay->value();
|
||||
auto unit = static_cast<qDefs::timeUnit>(comboDelayUnit->currentIndex());
|
||||
LOG(logINFO) << "Setting delay to " << val << " "
|
||||
<< qDefs::getUnitString(unit);
|
||||
<< qDefs::getUnitString(unit);
|
||||
try {
|
||||
auto timeNS = qDefs::getNSTime(std::make_pair(val, unit));
|
||||
det->setDelayAfterTrigger(timeNS);
|
||||
@ -573,7 +573,7 @@ void qTabMeasurement::SetBurstPeriod() {
|
||||
auto unit =
|
||||
static_cast<qDefs::timeUnit>(comboBurstPeriodUnit->currentIndex());
|
||||
LOG(logINFO) << "Setting burst period to " << val << " "
|
||||
<< qDefs::getUnitString(unit);
|
||||
<< qDefs::getUnitString(unit);
|
||||
try {
|
||||
auto timeNS = qDefs::getNSTime(std::make_pair(val, unit));
|
||||
det->setBurstPeriod(timeNS);
|
||||
@ -771,8 +771,7 @@ void qTabMeasurement::AcquireFinished() {
|
||||
if (startingFnumImplemented) {
|
||||
GetStartingFrameNumber();
|
||||
}
|
||||
LOG(logDEBUG) << "Measurement " << currentMeasurement
|
||||
<< " finished";
|
||||
LOG(logDEBUG) << "Measurement " << currentMeasurement << " finished";
|
||||
// next measurement if acq is not stopped
|
||||
if (!isAcquisitionStopped &&
|
||||
((currentMeasurement + 1) < numMeasurements)) {
|
||||
@ -801,8 +800,9 @@ void qTabMeasurement::Enable(bool enable) {
|
||||
frameNotTimeResolved->setEnabled(enable);
|
||||
|
||||
// shortcut each time, else it doesnt work a second time
|
||||
btnStart->setShortcut(QApplication::translate(
|
||||
"TabMeasurementObject", "Shift+Space", nullptr, QApplication::UnicodeUTF8));
|
||||
btnStart->setShortcut(QApplication::translate("TabMeasurementObject",
|
||||
"Shift+Space", nullptr,
|
||||
QApplication::UnicodeUTF8));
|
||||
}
|
||||
|
||||
void qTabMeasurement::Refresh() {
|
||||
|
@ -75,8 +75,8 @@ void qTabMessages::ExecuteCommand() {
|
||||
QString command = param.at(0);
|
||||
param.removeFirst();
|
||||
LOG(logINFO) << "Executing Command:[" << command.toAscii().constData()
|
||||
<< "] with Arguments:["
|
||||
<< param.join(" ").toAscii().constData() << "]";
|
||||
<< "] with Arguments:["
|
||||
<< param.join(" ").toAscii().constData() << "]";
|
||||
|
||||
process->setProcessChannelMode(QProcess::MergedChannels);
|
||||
process->start(command, param);
|
||||
@ -121,7 +121,7 @@ void qTabMessages::SaveLog() {
|
||||
LOG(logINFO) << mess;
|
||||
} else {
|
||||
LOG(logWARNING) << "Attempt to save log file failed: "
|
||||
<< fName.toAscii().constData();
|
||||
<< fName.toAscii().constData();
|
||||
qDefs::Message(qDefs::WARNING, "Attempt to save log file failed.",
|
||||
"qTabMessages::SaveLog");
|
||||
}
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include <QStackedLayout>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
|
||||
QString qTabPlot::defaultPlotTitle("");
|
||||
QString qTabPlot::defaultHistXAxisTitle("Channel Number");
|
||||
QString qTabPlot::defaultHistYAxisTitle("Counts");
|
||||
@ -290,16 +289,14 @@ void qTabPlot::SetBinary() {
|
||||
bool binary1D = chkBinary->isChecked();
|
||||
bool binary2D = chkBinary_2->isChecked();
|
||||
if (is1d) {
|
||||
LOG(logINFO) << "Binary Plot "
|
||||
<< (binary1D ? "enabled" : "disabled");
|
||||
LOG(logINFO) << "Binary Plot " << (binary1D ? "enabled" : "disabled");
|
||||
lblFrom->setEnabled(binary1D);
|
||||
lblTo->setEnabled(binary1D);
|
||||
spinFrom->setEnabled(binary1D);
|
||||
spinTo->setEnabled(binary1D);
|
||||
plot->SetBinary(binary1D, spinFrom->value(), spinTo->value());
|
||||
} else {
|
||||
LOG(logINFO) << "Binary Plot "
|
||||
<< (binary2D ? "enabled" : "disabled");
|
||||
LOG(logINFO) << "Binary Plot " << (binary2D ? "enabled" : "disabled");
|
||||
lblFrom_2->setEnabled(binary2D);
|
||||
lblTo_2->setEnabled(binary2D);
|
||||
spinFrom_2->setEnabled(binary2D);
|
||||
@ -434,10 +431,10 @@ void qTabPlot::SetXYRange() {
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
if (chkVal[i] && !dispVal[i].isEmpty()) {
|
||||
double val = dispVal[i].toDouble();
|
||||
LOG(logDEBUG)
|
||||
<< "Setting "
|
||||
<< qDefs::getRangeAsString(static_cast<qDefs::range>(i))
|
||||
<< " to " << val;
|
||||
LOG(logDEBUG) << "Setting "
|
||||
<< qDefs::getRangeAsString(
|
||||
static_cast<qDefs::range>(i))
|
||||
<< " to " << val;
|
||||
xyRange[i] = val;
|
||||
isRange[i] = true;
|
||||
disablezoom = true;
|
||||
@ -482,10 +479,10 @@ void qTabPlot::MaintainAspectRatio(int dimension) {
|
||||
ranges[qDefs::YMAX] = plot->GetYMaximum();
|
||||
double idealAspectratio = (ranges[qDefs::XMAX] - ranges[qDefs::XMIN]) /
|
||||
(ranges[qDefs::YMAX] - ranges[qDefs::YMIN]);
|
||||
LOG(logDEBUG) << "Ideal Aspect ratio: " << idealAspectratio
|
||||
<< " for x(" << ranges[qDefs::XMIN] << " - "
|
||||
<< ranges[qDefs::XMAX] << "), y(" << ranges[qDefs::YMIN]
|
||||
<< " - " << ranges[qDefs::YMAX] << ")";
|
||||
LOG(logDEBUG) << "Ideal Aspect ratio: " << idealAspectratio << " for x("
|
||||
<< ranges[qDefs::XMIN] << " - " << ranges[qDefs::XMAX]
|
||||
<< "), y(" << ranges[qDefs::YMIN] << " - "
|
||||
<< ranges[qDefs::YMAX] << ")";
|
||||
|
||||
// calculate current aspect ratio
|
||||
ranges[qDefs::XMIN] = dispXMin->text().toDouble();
|
||||
@ -494,10 +491,10 @@ void qTabPlot::MaintainAspectRatio(int dimension) {
|
||||
ranges[qDefs::YMAX] = dispYMax->text().toDouble();
|
||||
double currentAspectRatio = (ranges[qDefs::XMAX] - ranges[qDefs::XMIN]) /
|
||||
(ranges[qDefs::YMAX] - ranges[qDefs::YMIN]);
|
||||
LOG(logDEBUG) << "Current Aspect ratio: " << currentAspectRatio
|
||||
<< " for x(" << ranges[qDefs::XMIN] << " - "
|
||||
<< ranges[qDefs::XMAX] << "), y(" << ranges[qDefs::YMIN]
|
||||
<< " - " << ranges[qDefs::YMAX] << ")";
|
||||
LOG(logDEBUG) << "Current Aspect ratio: " << currentAspectRatio << " for x("
|
||||
<< ranges[qDefs::XMIN] << " - " << ranges[qDefs::XMAX]
|
||||
<< "), y(" << ranges[qDefs::YMIN] << " - "
|
||||
<< ranges[qDefs::YMAX] << ")";
|
||||
|
||||
if (currentAspectRatio != idealAspectratio) {
|
||||
// dimension: 1(x changed: y adjusted), 0(y changed: x adjusted),
|
||||
@ -643,7 +640,7 @@ void qTabPlot::SetStreamingFrequency() {
|
||||
det->setRxZmqFrequency(freqVal);
|
||||
} else {
|
||||
LOG(logINFO) << "Setting Streaming Timer to " << timeVal << " "
|
||||
<< qDefs::getUnitString(timeUnit);
|
||||
<< qDefs::getUnitString(timeUnit);
|
||||
auto timeMS = qDefs::getMSTime(std::make_pair(timeVal, timeUnit));
|
||||
det->setRxZmqTimer(timeMS.count());
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "qTabSettings.h"
|
||||
#include "qDefs.h"
|
||||
#include "ToString.h"
|
||||
#include "qDefs.h"
|
||||
#include <QStandardItemModel>
|
||||
|
||||
qTabSettings::qTabSettings(QWidget *parent, sls::Detector *detector)
|
||||
@ -196,7 +196,7 @@ void qTabSettings::GetDynamicRange() {
|
||||
|
||||
void qTabSettings::SetDynamicRange(int index) {
|
||||
LOG(logINFO) << "Setting dynamic range to "
|
||||
<< comboDynamicRange->currentText().toAscii().data();
|
||||
<< comboDynamicRange->currentText().toAscii().data();
|
||||
try {
|
||||
switch (index) {
|
||||
case DYNAMICRANGE_32:
|
||||
|
@ -344,9 +344,8 @@ uint32_t Listener::ListenToAnImage(char *buf) {
|
||||
// copy packet
|
||||
switch (myDetectorType) {
|
||||
// for gotthard, 1st packet: 4 bytes fnum, CACA
|
||||
// + CACA, 639*2 bytes data 2nd packet: 4 bytes
|
||||
// fnum, previous 1*2 bytes
|
||||
// data + 640*2 bytes data !!
|
||||
// + CACA, 639*2 bytes data 2nd packet: 4
|
||||
// bytes fnum, previous 1*2 bytes data + 640*2 bytes data !!
|
||||
case GOTTHARD:
|
||||
if (!pnum)
|
||||
memcpy(buf + fifohsize, &carryOverPacket[hsize + 4], dsize - 2);
|
||||
@ -515,9 +514,8 @@ uint32_t Listener::ListenToAnImage(char *buf) {
|
||||
// copy packet
|
||||
switch (myDetectorType) {
|
||||
// for gotthard, 1st packet: 4 bytes fnum, CACA
|
||||
// + CACA, 639*2 bytes data 2nd packet: 4 bytes
|
||||
// fnum, previous 1*2 bytes
|
||||
// data + 640*2 bytes data !!
|
||||
// + CACA, 639*2 bytes data 2nd packet: 4
|
||||
// bytes fnum, previous 1*2 bytes data + 640*2 bytes data !!
|
||||
case GOTTHARD:
|
||||
if (!pnum)
|
||||
memcpy(buf + fifohsize + (pnum * dsize),
|
||||
|
Loading…
x
Reference in New Issue
Block a user