This commit is contained in:
maliakal_d 2019-07-04 16:40:25 +02:00
parent 6a60f7d222
commit c582ba15d5
16 changed files with 421 additions and 250 deletions

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>775</width>
<height>345</height>
<width>819</width>
<height>377</height>
</rect>
</property>
<property name="sizePolicy">
@ -48,7 +48,7 @@
<enum>QTabWidget::North</enum>
</property>
<property name="currentIndex">
<number>0</number>
<number>4</number>
</property>
<property name="elideMode">
<enum>Qt::ElideLeft</enum>
@ -80,7 +80,7 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>450</width>
<width>550</width>
<height>20</height>
</size>
</property>
@ -95,6 +95,12 @@
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinSetAllTrimbits">
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="minimum">
<number>-1</number>
</property>
@ -109,12 +115,12 @@
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>190</height>
<height>250</height>
</size>
</property>
</spacer>
@ -273,8 +279,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>735</width>
<height>235</height>
<width>779</width>
<height>267</height>
</rect>
</property>
<layout class="QGridLayout" name="gridRoi">
@ -306,7 +312,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -342,7 +348,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="maximumSize">
@ -392,7 +398,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -400,7 +406,7 @@
#rx_udpip#</string>
</property>
<property name="text">
<string>none</string>
<string>0</string>
</property>
</widget>
</item>
@ -415,7 +421,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -423,7 +429,7 @@
#rx_udpmac#</string>
</property>
<property name="text">
<string>none</string>
<string>0</string>
</property>
</widget>
</item>
@ -457,7 +463,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -465,7 +471,7 @@
#detectormac#</string>
</property>
<property name="text">
<string/>
<string>0</string>
</property>
</widget>
</item>
@ -480,7 +486,7 @@
<property name="minimumSize">
<size>
<width>127</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -524,7 +530,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -532,7 +538,7 @@
#online#</string>
</property>
<property name="text">
<string/>
<string>Offline</string>
</property>
<property name="readOnly">
<bool>true</bool>
@ -550,7 +556,7 @@
<property name="minimumSize">
<size>
<width>127</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -620,7 +626,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -628,7 +634,7 @@
#detectorip#</string>
</property>
<property name="text">
<string/>
<string>0</string>
</property>
</widget>
</item>
@ -643,7 +649,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -713,7 +719,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -770,7 +776,7 @@
<property name="minimumSize">
<size>
<width>127</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -814,7 +820,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -822,7 +828,7 @@
#rx_udpip#</string>
</property>
<property name="text">
<string/>
<string>0</string>
</property>
</widget>
</item>
@ -844,9 +850,12 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<width>60</width>
<height>20</height>
</size>
</property>
@ -863,7 +872,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -871,7 +880,7 @@
#r_online#</string>
</property>
<property name="text">
<string/>
<string>Offline</string>
</property>
<property name="readOnly">
<bool>true</bool>
@ -902,7 +911,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
</widget>
@ -1002,7 +1011,7 @@
<property name="minimumSize">
<size>
<width>180</width>
<height>0</height>
<height>25</height>
</size>
</property>
<property name="toolTip">
@ -1010,7 +1019,7 @@
#detectorip#</string>
</property>
<property name="text">
<string/>
<string>0</string>
</property>
</widget>
</item>
@ -1069,7 +1078,7 @@
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@ -1090,6 +1099,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Number of additional storage cells. For Jungfrau only. &lt;/p&gt;&lt;p&gt;Default: 0. &lt;/p&gt;&lt;p&gt;Number of Images received: #frames * #cycles * (#storagecells+1) &lt;/p&gt;&lt;p&gt; #storagecells#&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@ -1130,6 +1145,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="toolTip">
<string>&lt;nobr&gt;
Exposure Time of a sub frame. Only for Eiger in 32 bit mode
@ -1187,6 +1208,12 @@ Default value is 0. A value less than the required minimum is ignored.
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="toolTip">
<string>&lt;nobr&gt;
Period between sub frames. Only for Eiger in 32 bit mode.
@ -1244,6 +1271,12 @@ Exposure Time of a sub frame. Only for Eiger in 32 bit mode
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="toolTip">
<string>&lt;nobr&gt;
Period between sub frames. Only for Eiger in 32 bit mode.
@ -1302,6 +1335,12 @@ Default value is 0. A value less than the required minimum is ignored.
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="toolTip">
<string>&lt;nobr&gt;
Exposure Time of a sub frame. Only for Eiger in 32 bit mode
@ -1369,6 +1408,36 @@ Exposure Time of a sub frame. Only for Eiger in 32 bit mode
</item>
</layout>
</widget>
<tabstops>
<tabstop>tabAdvancedSettings</tabstop>
<tabstop>spinSetAllTrimbits</tabstop>
<tabstop>btnAddRoi</tabstop>
<tabstop>btnSetRoi</tabstop>
<tabstop>btnGetRoi</tabstop>
<tabstop>btnClearRoi</tabstop>
<tabstop>scrollArea</tabstop>
<tabstop>comboDetector</tabstop>
<tabstop>dispOnline</tabstop>
<tabstop>spinControlPort</tabstop>
<tabstop>spinStopPort</tabstop>
<tabstop>dispDetectorUDPIP</tabstop>
<tabstop>dispDetectorUDPMAC</tabstop>
<tabstop>spinZMQPort</tabstop>
<tabstop>dispZMQIP</tabstop>
<tabstop>dispRxrHostname</tabstop>
<tabstop>dispRxrOnline</tabstop>
<tabstop>spinRxrTCPPort</tabstop>
<tabstop>spinRxrUDPPort</tabstop>
<tabstop>dispRxrUDPIP</tabstop>
<tabstop>dispRxrUDPMAC</tabstop>
<tabstop>spinRxrZMQPort</tabstop>
<tabstop>dispRxrZMQIP</tabstop>
<tabstop>spinNumStoragecells</tabstop>
<tabstop>spinSubExpTime</tabstop>
<tabstop>comboSubExpTimeUnit</tabstop>
<tabstop>spinSubDeadTime</tabstop>
<tabstop>comboSubDeadTimeUnit</tabstop>
</tabstops>
<resources>
<include location="../include/icons.qrc"/>
</resources>

View File

@ -718,6 +718,21 @@ Compression using Root. Available only for Gotthard in Expert Mode.
</item>
</layout>
</widget>
<tabstops>
<tabstop>comboDetector</tabstop>
<tabstop>dispOutputDir</tabstop>
<tabstop>btnOutputBrowse</tabstop>
<tabstop>comboFileFormat</tabstop>
<tabstop>chkOverwriteEnable</tabstop>
<tabstop>chkTenGiga</tabstop>
<tabstop>chkRate</tabstop>
<tabstop>radioDefaultDeadtime</tabstop>
<tabstop>radioCustomDeadtime</tabstop>
<tabstop>spinCustomDeadTime</tabstop>
<tabstop>comboEigerClkDivider</tabstop>
<tabstop>comboEigerFlags1</tabstop>
<tabstop>comboEigerFlags2</tabstop>
</tabstops>
<resources>
<include location="../include/icons.qrc"/>
</resources>

View File

@ -176,20 +176,40 @@
<number>18</number>
</property>
<item row="1" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Current Frame: </string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Current Measurement:</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="QProgressBar" name="progressBar">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="value">
<number>24</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Current Frame: </string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="lblCurrentFrame">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="lblCurrentMeasurement">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
@ -211,26 +231,6 @@
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="lblCurrentFrame">
<property name="text">
<string>0</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QProgressBar" name="progressBar">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="value">
<number>24</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -1047,6 +1047,22 @@ Frame period between exposures.
</item>
</layout>
</widget>
<tabstops>
<tabstop>chkFile</tabstop>
<tabstop>dispFileName</tabstop>
<tabstop>spinIndex</tabstop>
<tabstop>comboTimingMode</tabstop>
<tabstop>spinNumMeasurements</tabstop>
<tabstop>spinNumFrames</tabstop>
<tabstop>spinExpTime</tabstop>
<tabstop>comboExpUnit</tabstop>
<tabstop>spinPeriod</tabstop>
<tabstop>comboPeriodUnit</tabstop>
<tabstop>spinNumTriggers</tabstop>
<tabstop>spinDelay</tabstop>
<tabstop>comboDelayUnit</tabstop>
<tabstop>spinNumSamples</tabstop>
</tabstops>
<resources>
<include location="../include/icons.qrc"/>
</resources>

View File

@ -2550,6 +2550,57 @@ Streaming Interval between 2 plots. Default is time interval with 200 ms.
<zorder>boxPlotAxis</zorder>
<zorder>boxSnapshot</zorder>
</widget>
<tabstops>
<tabstop>radioNoPlot</tabstop>
<tabstop>radioDataGraph</tabstop>
<tabstop>comboFrequency</tabstop>
<tabstop>spinTimeGap</tabstop>
<tabstop>comboTimeGapUnit</tabstop>
<tabstop>chkPedestal</tabstop>
<tabstop>chkInterpolate</tabstop>
<tabstop>chkContour</tabstop>
<tabstop>chkLogz</tabstop>
<tabstop>chkTitle</tabstop>
<tabstop>dispTitle</tabstop>
<tabstop>chkAspectRatio</tabstop>
<tabstop>chkXAxis</tabstop>
<tabstop>dispXAxis</tabstop>
<tabstop>chkXMin</tabstop>
<tabstop>dispXMin</tabstop>
<tabstop>chkXMax</tabstop>
<tabstop>dispXMax</tabstop>
<tabstop>chkYAxis</tabstop>
<tabstop>dispYAxis</tabstop>
<tabstop>chkYMin</tabstop>
<tabstop>dispYMin</tabstop>
<tabstop>chkYMax</tabstop>
<tabstop>dispYMax</tabstop>
<tabstop>chkZAxis</tabstop>
<tabstop>dispZAxis</tabstop>
<tabstop>chkZMin</tabstop>
<tabstop>dispZMin</tabstop>
<tabstop>chkZMax</tabstop>
<tabstop>dispZMax</tabstop>
<tabstop>spinTo_2</tabstop>
<tabstop>chkStatistics_2</tabstop>
<tabstop>chkGainPlot</tabstop>
<tabstop>chkGapPixels</tabstop>
<tabstop>chkSuperimpose</tabstop>
<tabstop>spinPersistency</tabstop>
<tabstop>chk1DLog</tabstop>
<tabstop>chkPoints</tabstop>
<tabstop>chkLines</tabstop>
<tabstop>chkAccumulate</tabstop>
<tabstop>spinFrom_2</tabstop>
<tabstop>chkBinary</tabstop>
<tabstop>spinFrom</tabstop>
<tabstop>spinTo</tabstop>
<tabstop>chkStatistics</tabstop>
<tabstop>chkAccumulate_2</tabstop>
<tabstop>spinNthFrame</tabstop>
<tabstop>chkPedestal_2</tabstop>
<tabstop>chkBinary_2</tabstop>
</tabstops>
<resources>
<include location="../include/icons.qrc"/>
</resources>

View File

@ -274,6 +274,11 @@
</item>
</layout>
</widget>
<tabstops>
<tabstop>comboSettings</tabstop>
<tabstop>spinThreshold</tabstop>
<tabstop>comboDynamicRange</tabstop>
</tabstops>
<resources>
<include location="../include/icons.qrc"/>
</resources>

View File

@ -99,6 +99,16 @@ class qDefs : public QWidget {
*/
enum range { XMIN, XMAX, YMIN, YMAX };
static std::string getRangeAsString(enum range r) {
switch (r) {
case XMIN: return "XMIN";
case XMAX: return "XMAX";
case YMIN: return "YMIN";
case YMAX: return "YMAX";
default: return "Unknown";
}
};
/**
* function enums for the qServer and qClient
*/

View File

@ -45,7 +45,7 @@ class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
* @param b bool TRUE if undocked(outside main window), FALSE docked
*/
void ResizeMainWindow(bool b);
void EnableTabs();
void EnableTabs(bool enable);
void SetZoomToolTip(bool disable);
protected:

View File

@ -10,40 +10,18 @@ class qCloneWidget;
class QGridLayout;
class QGroupBox;
class QwtSymbol;
/*
#include "qwt_symbol.h"
#include <QGroupBox>
#include <QString>
#include <QTimer>
#include <QWidget>
#include <QVector>
#include <qpen.h>
#include <qwt_column_symbol.h>
#include <qwt_plot_grid.h>
#include <qwt_plot_histogram.h>
#include <qwt_series_data.h>
*/
#include <QFutureWatcher>
class qDrawPlot : public QWidget {
Q_OBJECT
public:
/** \short The constructor */
qDrawPlot(QWidget *parent, multiSlsDetector *detector);
/** Destructor */
qDrawPlot(QWidget *parent, multiSlsDetector *detector);
~qDrawPlot();
bool GetIsRunning();
// from measurement tabs
void SetRunning(bool enable);
int GetProgress();
int64_t GetCurrentFrameIndex();
int64_t GetCurrentMeasurementIndex();
int GetNumMeasurements();
void SetNumMeasurements(int val);
// from plot tab
void Select1dPlot(bool enable);
void SetPlotTitlePrefix(QString title);
void SetXAxisTitle(QString title);
@ -80,17 +58,18 @@ class qDrawPlot : public QWidget {
void CloseClones();
void SaveClones();
void SavePlot();
void SetStopSignal();
private slots:
void SetSaveFileName(QString val);
void CloneCloseEvent(int id);
void AcquireThread();
void AcquireFinished();
void UpdatePlot();
signals:
void AcquireSignal();
void AcquireFinishedSignal();
void AbortSignal();
void UpdateSignal();
private:
void SetupWidgetWindow();
@ -105,11 +84,14 @@ class qDrawPlot : public QWidget {
static void GetProgressCallBack(double currentProgress, void *this_pointer);
static void GetAcquisitionFinishedCallBack(double currentProgress, int detectorStatus, void *this_pointer);
static void GetDataCallBack(detectorData *data, uint64_t frameIndex, uint32_t subFrameIndex, void *this_pointer);
std::string AcquireThread();
void AcquisitionFinished(double currentProgress, int detectorStatus);
void GetData(detectorData *data, uint64_t frameIndex, uint32_t subFrameIndex);
void toDoublePixelData(double *dest, char *source, int size, int databytes, int dr, double *gaindest = NULL);
void Update1dPlot(double* rawData);
void Update2dPlot(double* rawData, double* gainData);
void Get1dData(double* rawData);
void Get2dData(double* rawData);
void Update1dPlot();
void Update2dPlot();
void Update1dXYRange();
void Update2dXYRange();
@ -121,6 +103,7 @@ class qDrawPlot : public QWidget {
QVector<SlsQtH1D *> hists1d;
SlsQt2DPlotLayout *plot2d{nullptr};
SlsQt2DPlotLayout *gainplot2d{nullptr};
QFutureWatcher<std::string> *acqResultWatcher;
QGridLayout *layout{nullptr};
QGroupBox *boxPlot{nullptr};
@ -137,6 +120,8 @@ class qDrawPlot : public QWidget {
QString xTitle2d{"Pixel"};
QString yTitle2d{"Pixel"};
QString zTitle2d{"Intensity"};
QString plotTitle{""};
QString indexTitle{""};
bool XYRangeChanged{false};
double XYRange[4]{0, 0, 0, 0};
bool isXYRange[4]{false, false, false, false};
@ -146,6 +131,7 @@ class qDrawPlot : public QWidget {
double *datax1d{nullptr};
std::vector<double *> datay1d;
double *data2d{nullptr};
double *gainData{nullptr};
//options
bool isPlot{true};
@ -177,11 +163,8 @@ class qDrawPlot : public QWidget {
bool hasGainData{false};
int progress{0};
int64_t currentMeasurement{0};
int64_t currentFrame{0};
pthread_mutex_t lastImageCompleteMutex;
bool hasStopped{false};
int numMeasurements{1};
unsigned int nPixelsX{0};
unsigned int nPixelsY{0};

View File

@ -18,7 +18,8 @@ public:
void Refresh();
public slots:
void UpdateFinished();
void AcquireFinished();
void AbortAcquire();
private slots:
void SetTimingMode(int val);
@ -43,7 +44,6 @@ private:
void EnableWidgetsforTimingMode();
void GetTimingMode();
void GetNumMeasurements();
void GetNumFrames();
void GetNumTriggers();
void GetNumSamples();
@ -61,7 +61,7 @@ private:
int VerifyOutputDirectoryError();
signals:
void StartSignal();
void EnableTabsSignal(bool);
void FileNameChangedSignal(QString);
private:
multiSlsDetector *myDet;
@ -81,4 +81,7 @@ private:
QPalette red;
bool delayImplemented;
bool sampleImplemented;
bool isAcquisitionStopped{false};
int numMeasurements{1};
int currentMeasurement{0};
};

View File

@ -89,6 +89,7 @@ void SlsQt2DHist::SetData(int nbinsx, double xmin, double xmax, int nbinsy,doubl
}
void SlsQt2DHist::SetMinMax(double zmin,double zmax){
cprintf(GREEN, "zmin:%f zmax:%f\n", zmin, zmax);
if(zmin<zmax){
z_min=zmin;
z_max=zmax;

View File

@ -74,7 +74,6 @@ void SlsQt2DPlotLayout::KeepZRangeIfSet() {
void SlsQt2DPlotLayout::SetZRange(bool isMin, bool isMax, double min, double max){
isZmin = isMin;
isZmax = isMax;
// reset zmin and zmax first (recalculate from plot)
the_plot->SetZMinMax();
@ -85,11 +84,12 @@ void SlsQt2DPlotLayout::UpdateZRange(double min, double max) {
if(isLog) {
the_plot->SetZMinimumToFirstGreaterThanZero();
}
cprintf(BLUE, "zmin:%f zmax:%f\n", zmin, zmax);
// set zmin and zmax
if (isZmin || isZmax) {
zmin = (isZmin ? min : the_plot->GetZMinimum());
zmax = (isZmax ? max : the_plot->GetZMaximum());
cprintf(RED, "zmin:%f zmax:%f\n", zmin, zmax);
// if it is the same values, we should reset it to plots min and max (not doing this now: not foolproof now)
// setting the range of values possible in the dispZMin and dispZMax (not doin this now: not foolproof)
the_plot->SetZMinMax(zmin, zmax);

View File

@ -279,15 +279,14 @@ void qDetectorMain::Initialization() {
// tabs
connect(tabs,SIGNAL(currentChanged(int)), this, SLOT(Refresh(int)));//( QWidget*)));
// Measurement tab
connect(tabMeasurement, SIGNAL(StartSignal()), this,SLOT(EnableTabs()));
connect(tabMeasurement, SIGNAL(EnableTabsSignal(bool)), this, SLOT(EnableTabs(bool)));
connect(tabMeasurement, SIGNAL(FileNameChangedSignal(QString)), myPlot, SLOT(SetSaveFileName(QString)));
// Plot tab
connect(tabPlot, SIGNAL(DisableZoomSignal(bool)), this, SLOT(SetZoomToolTip(bool)));
// Plotting
// When the acquisition is finished, must update the meas tab
connect(myPlot, SIGNAL(AcquireFinishedSignal()), this, SLOT(EnableTabs()));
connect(myPlot, SIGNAL(AcquireFinishedSignal()), tabMeasurement, SLOT(UpdateFinished()));
connect(myPlot, SIGNAL(AcquireFinishedSignal()), tabMeasurement, SLOT(AcquireFinished()));
connect(myPlot, SIGNAL(AbortSignal()), tabMeasurement, SLOT(AbortAcquire()));
// menubar
// Modes Menu
@ -652,13 +651,9 @@ void qDetectorMain::resizeEvent(QResizeEvent *event) {
event->accept();
}
void qDetectorMain::EnableTabs() {
FILE_LOG(logDEBUG1) << "Entering EnableTabs function";
void qDetectorMain::EnableTabs(bool enable) {
FILE_LOG(logDEBUG) << "qDetectorMain::EnableTabs";
bool enable;
enable = !(tabs->isTabEnabled(DATAOUTPUT));
// or use the Enable/Disable button
// normal tabs
tabs->setTabEnabled(DATAOUTPUT, enable);
tabs->setTabEnabled(SETTINGS, enable);
@ -669,7 +664,6 @@ void qDetectorMain::EnableTabs() {
actionSaveSetup->setEnabled(enable);
actionOpenConfiguration->setEnabled(enable);
actionSaveConfiguration->setEnabled(enable);
actionMeasurementWizard->setEnabled(enable);
actionDebug->setEnabled(enable);
actionExpert->setEnabled(enable);

View File

@ -10,20 +10,8 @@
#include <QFileDialog>
#include <QPainter>
#include "qwt_symbol.h"
#include <QtConcurrentRun>
/*
#include <QFileDialog>
#include <QFont>
#include <QImage>
#include <QPainter>
//#include "qwt_double_interval.h"
#include "qwt_series_data.h"
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
*/
qDrawPlot::qDrawPlot(QWidget *parent, multiSlsDetector *detector)
@ -45,6 +33,8 @@ qDrawPlot::~qDrawPlot() {
delete [] it;
if (data2d)
delete [] data2d;
if (gainData)
delete [] gainData;
if (plot1d)
delete plot1d;
@ -117,11 +107,15 @@ void qDrawPlot::SetupWidgetWindow() {
myDet->registerAcquisitionFinishedCallback(&(GetAcquisitionFinishedCallBack), this);
myDet->registerProgressCallback(&(GetProgressCallBack), this);
// future watcher to watch result of AcquireThread only because it uses signals/slots to handle acquire exception
acqResultWatcher = new QFutureWatcher<std::string>();
Initialization();
}
void qDrawPlot::Initialization() {
connect(this, SIGNAL(AcquireSignal()), this, SLOT(AcquireThread()));
connect(this, SIGNAL(UpdateSignal()), this, SLOT(UpdatePlot()));
connect(acqResultWatcher, SIGNAL(finished()), this, SLOT(AcquireFinished()));
}
void qDrawPlot::SetupStatistics() {
@ -239,7 +233,9 @@ void qDrawPlot::SetupPlots() {
// gainplot
gainplot2d = new SlsQt2DPlotLayout(boxPlot);
double* gainData = new double[nPixelsY * nPixelsX];
if (gainData)
delete [] gainData;
gainData = new double[nPixelsY * nPixelsX];
for (unsigned int px = 0; px < nPixelsX; ++px)
for (unsigned int py = 0; py < nPixelsY; ++py)
gainData[py * nPixelsX + px] =
@ -256,7 +252,6 @@ void qDrawPlot::SetupPlots() {
gainplot2d->GetPlot()->enableAxis(1, false);
gainplot2d->GetPlot()->enableAxis(2, false);
gainplot2d->hide();
delete [] gainData;
// layout of plots
plotLayout = new QGridLayout(boxPlot);
@ -270,6 +265,10 @@ bool qDrawPlot::GetIsRunning() {
return isRunning;
}
void qDrawPlot::SetRunning(bool enable) {
isRunning = enable;
}
int qDrawPlot::GetProgress() {
return progress;
}
@ -278,19 +277,6 @@ int64_t qDrawPlot::GetCurrentFrameIndex() {
return currentFrame;
}
int64_t qDrawPlot::GetCurrentMeasurementIndex() {
return currentMeasurement;
}
int qDrawPlot::GetNumMeasurements() {
return numMeasurements;
}
void qDrawPlot::SetNumMeasurements(int val) {
if (val >= 0)
numMeasurements = val;
}
void qDrawPlot::Select1dPlot(bool enable) {
LockLastImageArray();
if (enable) {
@ -373,14 +359,14 @@ void qDrawPlot::SetXYRangeChanged() {
void qDrawPlot::SetXYRangeValues(double val, qDefs::range xy) {
LockLastImageArray();
FILE_LOG(logDEBUG) << "Setting XY Range [" << static_cast<int>(xy) << "] to " << val;
FILE_LOG(logDEBUG) << "Setting " << qDefs::getRangeAsString(xy) << " to " << val;
XYRange[xy] = val;
UnlockLastImageArray();
}
void qDrawPlot::IsXYRangeValues(bool changed, qDefs::range xy) {
LockLastImageArray();
FILE_LOG(logDEBUG) << "Setting XY Range Change [" << static_cast<int>(xy) << "] to " << std::boolalpha << changed << std::noboolalpha;;
FILE_LOG(logDEBUG) << "Setting " << qDefs::getRangeAsString(xy) << " to " << std::boolalpha << changed << std::noboolalpha;;
isXYRange[xy] = changed;
UnlockLastImageArray();
}
@ -705,27 +691,22 @@ void qDrawPlot::DetachHists() {
}
}
void qDrawPlot::SetStopSignal() {
FILE_LOG(logDEBUG) << "Stop Acquisition signal";
hasStopped = true;
}
void qDrawPlot::StartAcquisition() {
FILE_LOG(logDEBUG) << "Starting Acquisition in qDrawPlot";
isRunning = true;
progress = 0;
currentMeasurement = -1;
currentFrame = -1;
hasStopped = false;
currentFrame = 0;
boxPlot->setTitle("Old Plot");
// check acquiring flag (from previous exit) or if running
try{
if (myDet->getAcquiringFlag()) {
if (myDet->getRunStatus() != slsDetectorDefs::IDLE) {
qDefs::Message(qDefs::WARNING, "Could not start acquisition as it is already in progress.\nClick start when finished.", "qDrawPlot::StartAcquisition");
isRunning = false;
emit AcquireFinishedSignal();
emit AbortSignal();
return;
} else {
myDet->setAcquiringFlag(false);
}
}
} CATCH_DISPLAY("Could not get detector stats.", "qDrawPlot::StartAcquisition");
@ -739,6 +720,7 @@ void qDrawPlot::StartAcquisition() {
}
// refixing all the zooming
XYRangeChanged = true;
/*
plot2d->GetPlot()->SetXMinMax(-0.5, nPixelsX + 0.5);
plot2d->GetPlot()->SetYMinMax(-0.5, nPixelsY + 0.5);
@ -748,30 +730,38 @@ void qDrawPlot::StartAcquisition() {
else
plot2d->GetPlot()->UnZoom(false);
*/
// acquisition in another thread, so signal it
emit AcquireSignal();
// acquisition in another thread
QFuture<std::string> future = QtConcurrent::run(this, &qDrawPlot::AcquireThread);
acqResultWatcher->setFuture(future);
FILE_LOG(logDEBUG) << "End of Starting Acquisition in qDrawPlot";
}
void qDrawPlot::AcquireThread() {
try {
for (int i = 0; i < numMeasurements; ++i) {
++currentMeasurement;
myDet->acquire();
FILE_LOG(logINFO) << "Measurement finished [ Measurement:" << currentMeasurement << " ]" ;
if (hasStopped) {
break;
}
}
} catch (const std::exception &e) {
qDefs::ExceptionMessage("Acquire unsuccessful.", e.what(), "qDrawPlot::AcquireThread");
// handle acquire exception
void qDrawPlot::AcquireFinished() {
FILE_LOG(logDEBUG) << "Acquisition Finished";
std::string mess = acqResultWatcher->result();
// exception in acquire will not call acquisition finished call back, so handle it
if (!mess.empty()) {
FILE_LOG(logERROR) << "Acquisition Finished with an exception: " << mess;
qDefs::ExceptionMessage("Acquire unsuccessful.", mess, "qDrawPlot::AcquireFinished");
try{
myDet->stopAcquisition();
myDet->stopReceiver();
} CATCH_DISPLAY("Could not stop acquisition.", "qDrawPlot::AcquireThread");
isRunning = false;
emit AcquireFinishedSignal();
} CATCH_DISPLAY("Could not stop acquisition and receiver.", "qDrawPlot::AcquireFinished");
emit AbortSignal();
}
FILE_LOG(logDEBUG) << "End of Acquisition Finished";
}
std::string qDrawPlot::AcquireThread() {
FILE_LOG(logDEBUG) << "Acquire Thread";
try {
myDet->acquire();
} catch (const std::exception &e) {
return std::string(e.what());
}
return std::string("");
}
void qDrawPlot::GetProgressCallBack(double currentProgress, void *this_pointer) {
@ -798,8 +788,6 @@ void qDrawPlot::AcquisitionFinished(double currentProgress, int detectorStatus)
} else {
FILE_LOG(logINFO) << "Acquisition finished [ Status:" << status << ", Progress: " << currentProgress << " ]" ;
}
isRunning = false;
emit AcquireFinishedSignal();
}
@ -808,17 +796,17 @@ void qDrawPlot::GetData(detectorData *data, uint64_t frameIndex, uint32_t subFra
FILE_LOG(logDEBUG)
<< "* GetData Callback *" << std::endl
<< "frame index: " << frameIndex << std::endl
<< "sub frame index: " << 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
<< "]";
<< " 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
<< " ]";
progress = (int)data->progressIndex;
currentFrame = frameIndex;
@ -829,17 +817,15 @@ void qDrawPlot::GetData(detectorData *data, uint64_t frameIndex, uint32_t subFra
// convert data to double
unsigned int nPixels = nPixelsX * (is1d ? 1 : nPixelsY);
double* rawData = new double[nPixels];
double* gainData = nullptr;
if (hasGainData) {
gainData = new double[nPixels];
toDoublePixelData(rawData, data->data, nPixels, data->databytes, data->dynamicRange, gainData);
} else {
toDoublePixelData(rawData, data->data, nPixels, data->databytes, data->dynamicRange);
}
// title and frame index titles
boxPlot->setTitle(plotTitlePrefix + QString(data->fileName.c_str()).section('/', -1));
QString indexTitle = QString("%1").arg(frameIndex);
plotTitle = plotTitlePrefix + QString(data->fileName.c_str()).section('/', -1);
indexTitle = QString("%1").arg(frameIndex);
if ((int)subFrameIndex != -1) {
indexTitle = QString("%1 %2").arg(frameIndex, subFrameIndex);
}
@ -863,25 +849,17 @@ void qDrawPlot::GetData(detectorData *data, uint64_t frameIndex, uint32_t subFra
}
if (is1d) {
lblFrameIndexTitle1d->setText(indexTitle);
Update1dPlot(rawData);
Get1dData(rawData);
} else {
plot2d->setTitle(indexTitle.toAscii().constData());
if (hasGainData)
gainplot2d->setTitle(indexTitle.toAscii().constData());
Update2dPlot(rawData, gainData);
Get2dData(rawData);
}
if (displayStatistics) {
double min = 0, max = 0, sum = 0;
GetStatistics(min, max, sum);
lblMinDisp->setText(QString("%1").arg(min));
lblMaxDisp->setText(QString("%1").arg(max));
lblSumDisp->setText(QString("%1").arg(sum));
}
FILE_LOG(logDEBUG) << "End of Get Data";
UnlockLastImageArray();
emit UpdateSignal();
}
void qDrawPlot::Update1dPlot(double* rawData) {
void qDrawPlot::Get1dData(double* rawData) {
// persistency
if (currentPersistency < persistency)
currentPersistency++;
@ -918,22 +896,9 @@ void qDrawPlot::Update1dPlot(double* rawData) {
}
}
memcpy(datay1d[0], rawData, nPixelsX * sizeof(double));
// Plot data
DetachHists();
plot1d->SetXTitle(xTitle1d.toAscii().constData());
plot1d->SetYTitle(yTitle1d.toAscii().constData());
for (unsigned int i = 0; i < nHists; ++i) {
SlsQtH1D* h = hists1d.at(i);
h->SetData(nPixelsX, datax1d, datay1d[i]);
SetStyle(h);
h->Attach(plot1d);
}
Update1dXYRange();
}
void qDrawPlot::Update2dPlot(double* rawData, double* gainData) {
void qDrawPlot::Get2dData(double* rawData) {
unsigned int nPixels = nPixelsX * nPixelsY;
// pedestal
if (isPedestal) {
@ -960,8 +925,23 @@ void qDrawPlot::Update2dPlot(double* rawData, double* gainData) {
}
}
memcpy(data2d, rawData, nPixels * sizeof(double));
}
void qDrawPlot::Update1dPlot() {
// Plot data
DetachHists();
plot1d->SetXTitle(xTitle1d.toAscii().constData());
plot1d->SetYTitle(yTitle1d.toAscii().constData());
for (unsigned int i = 0; i < nHists; ++i) {
SlsQtH1D* h = hists1d.at(i);
h->SetData(nPixelsX, datax1d, datay1d[i]);
SetStyle(h);
h->Attach(plot1d);
}
Update1dXYRange();
}
void qDrawPlot::Update2dPlot() {
plot2d->SetXTitle(xTitle2d);
plot2d->SetYTitle(yTitle2d);
plot2d->SetZTitle(zTitle2d);
@ -982,7 +962,7 @@ void qDrawPlot::Update2dPlot(double* rawData, double* gainData) {
void qDrawPlot::Update1dXYRange() {
if (XYRangeChanged) {
if (!isXYRange[qDefs::XMIN] || !isXYRange[qDefs::XMAX]) {
if (!isXYRange[qDefs::XMIN] && !isXYRange[qDefs::XMAX]) {
plot1d->EnableXAutoScaling();
} else {
if (!isXYRange[qDefs::XMIN])
@ -992,7 +972,7 @@ void qDrawPlot::Update1dXYRange() {
plot1d->SetXMinMax(XYRange[qDefs::XMIN], XYRange[qDefs::XMAX]);
}
if (!isXYRange[qDefs::YMIN] || !isXYRange[qDefs::YMAX]) {
if (!isXYRange[qDefs::YMIN] && !isXYRange[qDefs::YMAX]) {
plot1d->EnableYAutoScaling();
} else {
if (!isXYRange[qDefs::YMIN])
@ -1008,7 +988,7 @@ void qDrawPlot::Update1dXYRange() {
void qDrawPlot::Update2dXYRange() {
if (XYRangeChanged) {
if (!isXYRange[qDefs::XMIN] || !isXYRange[qDefs::XMAX]) {
if (!isXYRange[qDefs::XMIN] && !isXYRange[qDefs::XMAX]) {
plot2d->GetPlot()->EnableXAutoScaling();
} else {
if (!isXYRange[qDefs::XMIN])
@ -1018,7 +998,7 @@ void qDrawPlot::Update2dXYRange() {
plot2d->GetPlot()->SetXMinMax(XYRange[qDefs::XMIN], XYRange[qDefs::XMAX]);
}
if (!isXYRange[qDefs::YMIN] || !isXYRange[qDefs::YMAX]) {
if (!isXYRange[qDefs::YMIN] && !isXYRange[qDefs::YMAX]) {
plot2d->GetPlot()->EnableYAutoScaling();
} else {
if (!isXYRange[qDefs::YMIN])
@ -1102,3 +1082,30 @@ void qDrawPlot::toDoublePixelData(double *dest, char *source, int size, int data
}
}
void qDrawPlot::UpdatePlot() {
LockLastImageArray();
FILE_LOG(logDEBUG) << "Update Plot";
boxPlot->setTitle(plotTitle);
if (is1d) {
lblFrameIndexTitle1d->setText(indexTitle);
Update1dPlot();
} else {
plot2d->setTitle(indexTitle.toAscii().constData());
if (hasGainData)
gainplot2d->setTitle(indexTitle.toAscii().constData());
Update2dPlot();
}
if (displayStatistics) {
double min = 0, max = 0, sum = 0;
GetStatistics(min, max, sum);
lblMinDisp->setText(QString("%1").arg(min));
lblMaxDisp->setText(QString("%1").arg(max));
lblSumDisp->setText(QString("%1").arg(sum));
}
FILE_LOG(logDEBUG) << "End of Update Plot";
UnlockLastImageArray();
}

View File

@ -222,16 +222,9 @@ void qTabMeasurement::SetTimingMode(int val) {
} CATCH_HANDLE("Could not set timing mode.", "qTabMeasurement::SetTimingMode", this, &qTabMeasurement::GetTimingMode)
}
void qTabMeasurement::GetNumMeasurements() {
FILE_LOG(logDEBUG) << "Getting number of measurements";
disconnect(spinNumMeasurements, SIGNAL(valueChanged(int)), this, SLOT(SetNumMeasurements(int)));
spinNumMeasurements->setValue(myPlot->GetNumMeasurements());
connect(spinNumMeasurements, SIGNAL(valueChanged(int)), this, SLOT(SetNumMeasurements(int)));
}
void qTabMeasurement::SetNumMeasurements(int val) {
FILE_LOG(logINFO) << "Setting Number of Measurements to " << val;
myPlot->SetNumMeasurements(val);
numMeasurements = val;
}
void qTabMeasurement::GetNumFrames() {
@ -521,18 +514,16 @@ void qTabMeasurement::SetRunIndex(int val) {
void qTabMeasurement::ResetProgress() {
FILE_LOG(logDEBUG) << "Resetting progress";
lblCurrentFrame->setText("");
lblCurrentMeasurement->setText("");
lblCurrentFrame->setText("0");
lblCurrentMeasurement->setText("0");
progressBar->setValue(0);
}
void qTabMeasurement::UpdateProgress() {
FILE_LOG(logDEBUG) << "Updating progress";
progressBar->setValue(myPlot->GetProgress());
int64_t temp = myPlot->GetCurrentFrameIndex();
lblCurrentFrame->setText(temp >= 0 ? QString::number(temp) : "");
temp = myPlot->GetCurrentMeasurementIndex();
lblCurrentMeasurement->setText(temp >= 0 ? QString::number(temp) : "");
lblCurrentFrame->setText(QString::number(myPlot->GetCurrentFrameIndex()));
lblCurrentMeasurement->setText(QString::number(currentMeasurement));
}
int qTabMeasurement::VerifyOutputDirectoryError() {
@ -562,7 +553,7 @@ void qTabMeasurement::StartAcquisition() {
if (qDefs::Message(qDefs::QUESTION,
"<nobr>Your data will not be saved.</nobr><br><nobr>Disable File write and Proceed with acquisition anyway?</nobr>",
"qTabMeasurement::StartAcquisition") == slsDetectorDefs::FAIL) {
btnStart->setEnabled(true);
btnStart->setEnabled(true);
return;
} else {
disconnect(chkFile, SIGNAL(toggled(bool)), this, SLOT(SetFileWrite(bool)));
@ -574,29 +565,52 @@ void qTabMeasurement::StartAcquisition() {
}
FILE_LOG(logINFOBLUE) << "Starting Acquisition";
lblCurrentFrame->setText("");
lblCurrentMeasurement->setText("");
myPlot->SetRunning(true);
isAcquisitionStopped = false;
currentMeasurement = 0;
ResetProgress();
Enable(0);
progressBar->setValue(0);
progressTimer->start(100);
emit StartSignal();
emit EnableTabsSignal(false);
}
void qTabMeasurement::StopAcquisition() {
FILE_LOG(logINFORED) << "Stopping Acquisition";
try{
myPlot->SetStopSignal();
isAcquisitionStopped = true;
myDet->stopAcquisition();
} CATCH_DISPLAY("Could not stop acquisition.", "qTabMeasurement::StopAcquisition")
}
void qTabMeasurement::UpdateFinished() {
UpdateProgress();
GetRunIndex();
progressTimer->stop();
Enable(1);
btnStart->setEnabled(true);
void qTabMeasurement::AcquireFinished() {
// to catch only once (if abort acquire also calls acq finished call back)
if (!btnStart->isEnabled()) {
FILE_LOG(logDEBUG) << "Acquire Finished";
UpdateProgress();
GetRunIndex();
FILE_LOG(logDEBUG) << "Measurement " << currentMeasurement << " finished";
// next measurement if acq is not stopped
if (!isAcquisitionStopped && ((currentMeasurement + 1) < numMeasurements)) {
++currentMeasurement;
myPlot->StartAcquisition();
}
// end of acquisition
else {
progressTimer->stop();
Enable(1);
myPlot->SetRunning(false);
btnStart->setEnabled(true);
emit EnableTabsSignal(true);
}
}
}
void qTabMeasurement::AbortAcquire() {
FILE_LOG(logINFORED) << "Abort Acquire";
isAcquisitionStopped = true;
AcquireFinished();
}
void qTabMeasurement::Enable(bool enable) {
@ -612,7 +626,6 @@ void qTabMeasurement::Refresh() {
if (!myPlot->GetIsRunning()) {
GetTimingMode();
GetNumMeasurements();
GetNumFrames();
GetExposureTime();
GetAcquisitionPeriod();

View File

@ -396,6 +396,7 @@ void qTabPlot::SetXYRange() {
myPlot->IsXYRangeValues(false, qDefs::XMIN);
} else if (dispXMin->text().toDouble() < myPlot->GetXMinimum()) {
qDefs::Message(qDefs::WARNING, "XMin Outside Plot Range", "qTabPlot::SetXRange");
FILE_LOG(logWARNING) << "Xmin entered " << dispXMin->text().toDouble() << " outside xmin range " << myPlot->GetXMinimum();
dispXMin->setText("");
myPlot->IsXYRangeValues(false, qDefs::XMIN);
} else {
@ -407,8 +408,9 @@ void qTabPlot::SetXYRange() {
//xmax
if (!chkXMax->isChecked() || dispXMax->text().isEmpty()) {
myPlot->IsXYRangeValues(false, qDefs::XMAX);
} else if (dispXMax->text().toDouble() < myPlot->GetXMaximum()) {
} else if (dispXMax->text().toDouble() > myPlot->GetXMaximum()) {
qDefs::Message(qDefs::WARNING, "XMax Outside Plot Range", "qTabPlot::SetXYRange");
FILE_LOG(logWARNING) << "Xmax entered " << dispXMax->text().toDouble() << " outside xmax range " << myPlot->GetXMaximum();
dispXMax->setText("");
myPlot->IsXYRangeValues(false, qDefs::XMAX);
} else {
@ -422,6 +424,7 @@ void qTabPlot::SetXYRange() {
myPlot->IsXYRangeValues(false, qDefs::YMIN);
} else if (dispYMin->text().toDouble() < myPlot->GetYMinimum()) {
qDefs::Message(qDefs::WARNING, "YMin Outside Plot Range", "qTabPlot::SetXYRange");
FILE_LOG(logWARNING) << "Ymin entered " << dispYMin->text().toDouble() << " outside ymin range " << myPlot->GetYMinimum();
dispYMin->setText("");
myPlot->IsXYRangeValues(false, qDefs::YMIN);
} else {
@ -433,8 +436,9 @@ void qTabPlot::SetXYRange() {
//ymax
if (!chkYMax->isChecked() || dispYMax->text().isEmpty()) {
myPlot->IsXYRangeValues(false, qDefs::YMAX);
} else if (dispYMax->text().toDouble() < myPlot->GetYMaximum()) {
} else if (dispYMax->text().toDouble() > myPlot->GetYMaximum()) {
qDefs::Message(qDefs::WARNING, "YMax Outside Plot Range", "qTabPlot::SetXYRange");
FILE_LOG(logWARNING) << "Ymax entered " << dispYMax->text().toDouble() << " outside ymax range " << myPlot->GetYMaximum();
dispYMax->setText("");
myPlot->IsXYRangeValues(false, qDefs::YMAX);
} else {

View File

@ -3416,6 +3416,7 @@ void multiSlsDetector::readFrameFromReceiver() {
if (data) {
int nCompletePixelsX = multi_shm()->numberOfChannelInclGapPixels[X];
int nCompletePixelsY = multi_shm()->numberOfChannelInclGapPixels[Y];
setCurrentProgress(currentAcquisitionIndex + 1);
// 4bit gap pixels
if (dynamicRange == 4 && gappixelsenable) {
int n = processImageWithGapPixels(multiframe, multigappixels);
@ -3432,7 +3433,6 @@ void multiSlsDetector::readFrameFromReceiver() {
dataReady(thisData, currentFrameIndex,
((dynamicRange == 32) ? currentSubFrameIndex : -1), pCallbackArg);
delete thisData;
setCurrentProgress(currentAcquisitionIndex + 1);
}
// all done