mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-09 11:30:43 +02:00
Merge branch '3.0.1' into developer
This commit is contained in:
commit
8872f86e31
@ -57,7 +57,7 @@
|
|||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QCheckBox" name="chkTenGiga">
|
<widget class="QCheckBox" name="chkUnused">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -69,21 +69,7 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
</nobr></string>
|
</nobr></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>10GbE</string>
|
<string>Unused</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="chkCompression">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><nobr>
|
|
||||||
Compression using Root. Available only for Gotthard in Expert Mode.
|
|
||||||
</nobr><br><nobr>
|
|
||||||
#r_compression#
|
|
||||||
</nobr></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Compression</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -104,6 +90,23 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QCheckBox" name="chkTenGiga">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>
|
||||||
|
Compression using Root. Available only for Gotthard in Expert Mode.
|
||||||
|
</nobr><br><nobr>
|
||||||
|
#r_compression#
|
||||||
|
</nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>10GbE</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="gridLayoutWidget_2">
|
<widget class="QWidget" name="gridLayoutWidget_2">
|
||||||
|
@ -45,12 +45,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
int VerifyOutputDirectory();
|
int VerifyOutputDirectory();
|
||||||
|
|
||||||
/** To enable expert mode
|
|
||||||
* @param enable to enable if true
|
|
||||||
*/
|
|
||||||
void SetExpertMode(bool enable);
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** The sls detector object */
|
/** The sls detector object */
|
||||||
multiSlsDetector *myDet;
|
multiSlsDetector *myDet;
|
||||||
@ -86,9 +80,6 @@ private:
|
|||||||
*/
|
*/
|
||||||
void PopulateDetectors();
|
void PopulateDetectors();
|
||||||
|
|
||||||
/** Get Compression */
|
|
||||||
void GetCompression();
|
|
||||||
|
|
||||||
/** update speed */
|
/** update speed */
|
||||||
void UpdateSpeedFromServer();
|
void UpdateSpeedFromServer();
|
||||||
|
|
||||||
@ -140,9 +131,6 @@ void SetOutputDir();
|
|||||||
/** set output directory*/
|
/** set output directory*/
|
||||||
void GetOutputDir();
|
void GetOutputDir();
|
||||||
|
|
||||||
/** set compression */
|
|
||||||
void SetCompression(bool enable);
|
|
||||||
|
|
||||||
/** enable 10GbE */
|
/** enable 10GbE */
|
||||||
void EnableTenGigabitEthernet(bool enable, int get=0);
|
void EnableTenGigabitEthernet(bool enable, int get=0);
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ public:
|
|||||||
SlsQt2DPlot(QWidget * = NULL);
|
SlsQt2DPlot(QWidget * = NULL);
|
||||||
|
|
||||||
// SlsQt2DHist *GetHistogram(){ return hist; }
|
// SlsQt2DHist *GetHistogram(){ return hist; }
|
||||||
void UnZoom();
|
void UnZoom(bool replot=true);
|
||||||
void SetZoom(double xmin,double ymin,double x_width,double y_width);
|
void SetZoom(double xmin,double ymin,double x_width,double y_width);
|
||||||
|
|
||||||
|
|
||||||
|
@ -164,13 +164,13 @@ void SlsQt2DPlot::SetupZoom(){
|
|||||||
//replot();
|
//replot();
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
void SlsQt2DPlot::UnZoom(){
|
void SlsQt2DPlot::UnZoom(bool replot){
|
||||||
#if QWT_VERSION<0x060000
|
#if QWT_VERSION<0x060000
|
||||||
zoomer->setZoomBase(QwtDoubleRect(hist->GetXMin(),hist->GetYMin(),hist->GetXMax()-hist->GetXMin(),hist->GetYMax()-hist->GetYMin()));
|
zoomer->setZoomBase(QwtDoubleRect(hist->GetXMin(),hist->GetYMin(),hist->GetXMax()-hist->GetXMin(),hist->GetYMax()-hist->GetYMin()));
|
||||||
#else
|
#else
|
||||||
zoomer->setZoomBase(QRectF(hist->GetXMin(),hist->GetYMin(),hist->GetXMax()-hist->GetXMin(),hist->GetYMax()-hist->GetYMin()));
|
zoomer->setZoomBase(QRectF(hist->GetXMin(),hist->GetYMin(),hist->GetXMax()-hist->GetXMin(),hist->GetYMax()-hist->GetYMin()));
|
||||||
#endif
|
#endif
|
||||||
zoomer->setZoomBase();//Call replot for the attached plot before initializing the zoomer with its scales.
|
zoomer->setZoomBase(replot);//Call replot for the attached plot before initializing the zoomer with its scales.
|
||||||
// zoomer->zoom(0);
|
// zoomer->zoom(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,7 +417,6 @@ void qDetectorMain::EnableModes(QAction *action){
|
|||||||
actionSaveCalibration->setVisible(enable);
|
actionSaveCalibration->setVisible(enable);
|
||||||
tab_measurement->SetExpertMode(enable);
|
tab_measurement->SetExpertMode(enable);
|
||||||
tab_settings->SetExpertMode(enable);
|
tab_settings->SetExpertMode(enable);
|
||||||
tab_dataoutput->SetExpertMode(enable);
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Setting Expert Mode to " << enable << endl;
|
cout << "Setting Expert Mode to " << enable << endl;
|
||||||
#endif
|
#endif
|
||||||
|
@ -513,7 +513,10 @@ bool qDrawPlot::StartOrStopThread(bool start){
|
|||||||
plot2D->GetPlot()->SetXMinMax(-0.5,nPixelsX+0.5);
|
plot2D->GetPlot()->SetXMinMax(-0.5,nPixelsX+0.5);
|
||||||
plot2D->GetPlot()->SetYMinMax(startPixel,endPixel);
|
plot2D->GetPlot()->SetYMinMax(startPixel,endPixel);
|
||||||
plot2D->GetPlot()->SetZoom(-0.5,startPixel,nPixelsX,endPixel-startPixel);
|
plot2D->GetPlot()->SetZoom(-0.5,startPixel,nPixelsX,endPixel-startPixel);
|
||||||
|
if (boxPlot->title() == "Sample Plot")
|
||||||
plot2D->GetPlot()->UnZoom();
|
plot2D->GetPlot()->UnZoom();
|
||||||
|
else
|
||||||
|
plot2D->GetPlot()->UnZoom(false);
|
||||||
/*XYRangeChanged = true;*/
|
/*XYRangeChanged = true;*/
|
||||||
boxPlot->setTitle("Old_Plot.raw");
|
boxPlot->setTitle("Old_Plot.raw");
|
||||||
|
|
||||||
@ -901,13 +904,13 @@ int qDrawPlot::GetData(detectorData *data,int fIndex, int subIndex){
|
|||||||
memcpy(histYAngleAxis,data->values,nAnglePixelsX*sizeof(double));
|
memcpy(histYAngleAxis,data->values,nAnglePixelsX*sizeof(double));
|
||||||
SetHistXAxisTitle("Angles");
|
SetHistXAxisTitle("Angles");
|
||||||
}
|
}
|
||||||
|
plotRequired = true;
|
||||||
UnlockLastImageArray();
|
UnlockLastImageArray();
|
||||||
currentFrame++;
|
currentFrame++;
|
||||||
#ifdef VERYVERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "Exiting GetData Function " << endl;
|
cout << "Exiting GetData Function " << endl;
|
||||||
#endif
|
#endif
|
||||||
emit UpdatePlotSignal();
|
emit UpdatePlotSignal();
|
||||||
plotRequired = true;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -961,11 +964,11 @@ int qDrawPlot::GetData(detectorData *data,int fIndex, int subIndex){
|
|||||||
imageTitle = temp_title;
|
imageTitle = temp_title;
|
||||||
//copy data
|
//copy data
|
||||||
memcpy(lastImageArray+(currentScanDivLevel*nPixelsX),data->values,nPixelsX*sizeof(double));
|
memcpy(lastImageArray+(currentScanDivLevel*nPixelsX),data->values,nPixelsX*sizeof(double));
|
||||||
|
plotRequired = true;
|
||||||
UnlockLastImageArray();
|
UnlockLastImageArray();
|
||||||
currentFrame++;
|
currentFrame++;
|
||||||
currentScanDivLevel++;
|
currentScanDivLevel++;
|
||||||
emit UpdatePlotSignal();
|
emit UpdatePlotSignal();
|
||||||
plotRequired = true;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//file index
|
//file index
|
||||||
@ -980,11 +983,11 @@ int qDrawPlot::GetData(detectorData *data,int fIndex, int subIndex){
|
|||||||
imageTitle = temp_title;
|
imageTitle = temp_title;
|
||||||
//copy data
|
//copy data
|
||||||
for(unsigned int px=0;px<nPixelsX;px++) lastImageArray[currentScanDivLevel*nPixelsX+px] += data->values[px];
|
for(unsigned int px=0;px<nPixelsX;px++) lastImageArray[currentScanDivLevel*nPixelsX+px] += data->values[px];
|
||||||
|
plotRequired = true;
|
||||||
UnlockLastImageArray();
|
UnlockLastImageArray();
|
||||||
currentFrame++;
|
currentFrame++;
|
||||||
currentScanDivLevel++;
|
currentScanDivLevel++;
|
||||||
emit UpdatePlotSignal();
|
emit UpdatePlotSignal();
|
||||||
plotRequired = true;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//level0
|
//level0
|
||||||
@ -1006,10 +1009,10 @@ int qDrawPlot::GetData(detectorData *data,int fIndex, int subIndex){
|
|||||||
imageTitle = temp_title;
|
imageTitle = temp_title;
|
||||||
//copy data
|
//copy data
|
||||||
for(unsigned int px=0;px<nPixelsX;px++) lastImageArray[currentScanDivLevel*nPixelsX+px] += data->values[px];
|
for(unsigned int px=0;px<nPixelsX;px++) lastImageArray[currentScanDivLevel*nPixelsX+px] += data->values[px];
|
||||||
|
plotRequired = true;
|
||||||
UnlockLastImageArray();
|
UnlockLastImageArray();
|
||||||
currentFrame++;
|
currentFrame++;
|
||||||
emit UpdatePlotSignal();
|
emit UpdatePlotSignal();
|
||||||
plotRequired = true;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
//level1
|
//level1
|
||||||
@ -1031,10 +1034,10 @@ int qDrawPlot::GetData(detectorData *data,int fIndex, int subIndex){
|
|||||||
imageTitle = temp_title;
|
imageTitle = temp_title;
|
||||||
//copy data
|
//copy data
|
||||||
for(unsigned int px=0;px<nPixelsX;px++) lastImageArray[currentScanDivLevel*nPixelsX+px] += data->values[px];
|
for(unsigned int px=0;px<nPixelsX;px++) lastImageArray[currentScanDivLevel*nPixelsX+px] += data->values[px];
|
||||||
|
plotRequired = true;
|
||||||
UnlockLastImageArray();
|
UnlockLastImageArray();
|
||||||
currentFrame++;
|
currentFrame++;
|
||||||
emit UpdatePlotSignal();
|
emit UpdatePlotSignal();
|
||||||
plotRequired = true;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1233,14 +1236,14 @@ int qDrawPlot::GetData(detectorData *data,int fIndex, int subIndex){
|
|||||||
}
|
}
|
||||||
/* pthread_mutex_unlock(&(last_image_complete_mutex));
|
/* pthread_mutex_unlock(&(last_image_complete_mutex));
|
||||||
}*/
|
}*/
|
||||||
|
plotRequired = true;
|
||||||
UnlockLastImageArray();
|
UnlockLastImageArray();
|
||||||
|
|
||||||
#ifdef VERYVERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cprintf(BLUE,"currentframe:%d \tcurrentframeindex:%d\n",currentFrame,currentFrameIndex);
|
cprintf(BLUE,"currentframe:%d \tcurrentframeindex:%d\n",currentFrame,currentFrameIndex);
|
||||||
#endif
|
#endif
|
||||||
emit UpdatePlotSignal();
|
|
||||||
plotRequired = true;
|
|
||||||
currentFrame++;
|
currentFrame++;
|
||||||
|
emit UpdatePlotSignal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,8 +80,8 @@ void qTabDataOutput::SetupWidgetWindow(){
|
|||||||
outDirTip = lblOutputDir->toolTip();
|
outDirTip = lblOutputDir->toolTip();
|
||||||
|
|
||||||
|
|
||||||
//expert mode is not enabled initially
|
//not used at all, later used for gappixels
|
||||||
chkCompression->setEnabled(false);
|
chkUnused->setEnabled(false);
|
||||||
|
|
||||||
//enabling file format depending on detector type
|
//enabling file format depending on detector type
|
||||||
SetupFileFormat();
|
SetupFileFormat();
|
||||||
@ -167,8 +167,6 @@ void qTabDataOutput::Initialization(){
|
|||||||
connect(chkAngular, SIGNAL(toggled(bool)), this, SLOT(SetAngularCorrection()));
|
connect(chkAngular, SIGNAL(toggled(bool)), this, SLOT(SetAngularCorrection()));
|
||||||
//discard bad channels
|
//discard bad channels
|
||||||
connect(chkDiscardBad, SIGNAL(toggled(bool)), this, SLOT(DiscardBadChannels()));
|
connect(chkDiscardBad, SIGNAL(toggled(bool)), this, SLOT(DiscardBadChannels()));
|
||||||
//compression
|
|
||||||
connect(chkCompression, SIGNAL(toggled(bool)), this, SLOT(SetCompression(bool)));
|
|
||||||
//10GbE
|
//10GbE
|
||||||
connect(chkTenGiga, SIGNAL(toggled(bool)), this, SLOT(EnableTenGigabitEthernet(bool)));
|
connect(chkTenGiga, SIGNAL(toggled(bool)), this, SLOT(EnableTenGigabitEthernet(bool)));
|
||||||
|
|
||||||
@ -186,18 +184,6 @@ void qTabDataOutput::Initialization(){
|
|||||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
void qTabDataOutput::SetExpertMode(bool enable){
|
|
||||||
if((detType == slsDetectorDefs::GOTTHARD) || (detType == slsDetectorDefs::MOENCH)){
|
|
||||||
chkCompression->setEnabled(enable);
|
|
||||||
GetCompression();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
void qTabDataOutput::BrowseOutputDir()
|
void qTabDataOutput::BrowseOutputDir()
|
||||||
{
|
{
|
||||||
QString directory = QFileDialog::getExistingDirectory(this,tr("Choose Output Directory "),dispOutputDir->text());
|
QString directory = QFileDialog::getExistingDirectory(this,tr("Choose Output Directory "),dispOutputDir->text());
|
||||||
@ -737,34 +723,6 @@ void qTabDataOutput::SetOutputDir(){
|
|||||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
void qTabDataOutput::GetCompression(){
|
|
||||||
disconnect(chkCompression, SIGNAL(toggled(bool)), this, SLOT(SetCompression(bool)));
|
|
||||||
int ret = myDet->enableReceiverCompression();
|
|
||||||
if(ret > 0) chkCompression->setChecked(true);
|
|
||||||
else chkCompression->setChecked(false);
|
|
||||||
connect(chkCompression, SIGNAL(toggled(bool)), this, SLOT(SetCompression(bool)));
|
|
||||||
|
|
||||||
qDefs::checkErrorMessage(myDet,"qTabDataOutput::GetCompression");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
void qTabDataOutput::SetCompression(bool enable){
|
|
||||||
disconnect(chkCompression, SIGNAL(toggled(bool)), this, SLOT(SetCompression(bool)));
|
|
||||||
int ret = myDet->enableReceiverCompression(enable);
|
|
||||||
if(ret > 0) chkCompression->setChecked(true);
|
|
||||||
else chkCompression->setChecked(false);
|
|
||||||
connect(chkCompression, SIGNAL(toggled(bool)), this, SLOT(SetCompression(bool)));
|
|
||||||
|
|
||||||
qDefs::checkErrorMessage(myDet,"qTabDataOutput::SetCompression");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
void qTabDataOutput::EnableTenGigabitEthernet(bool enable,int get){
|
void qTabDataOutput::EnableTenGigabitEthernet(bool enable,int get){
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << endl << "Enabling/Disabling 10GbE" << endl;
|
cout << endl << "Enabling/Disabling 10GbE" << endl;
|
||||||
@ -1102,14 +1060,6 @@ void qTabDataOutput::Refresh(){
|
|||||||
btnOutputBrowse->setToolTip(dispOutputDir->toolTip());
|
btnOutputBrowse->setToolTip(dispOutputDir->toolTip());
|
||||||
}
|
}
|
||||||
|
|
||||||
//getting compression
|
|
||||||
if(chkCompression->isEnabled()){
|
|
||||||
#ifdef VERBOSE
|
|
||||||
cout << "Getting compression" << endl;
|
|
||||||
#endif
|
|
||||||
GetCompression();
|
|
||||||
}
|
|
||||||
|
|
||||||
//getting 10GbE
|
//getting 10GbE
|
||||||
if(chkTenGiga->isEnabled()){
|
if(chkTenGiga->isEnabled()){
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user