the angles should work now

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@44 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d
2012-08-30 16:45:11 +00:00
parent c4d478484b
commit 4686cb9c0e
11 changed files with 240 additions and 79 deletions

View File

@ -196,11 +196,14 @@
<rect>
<x>10</x>
<y>20</y>
<width>350</width>
<width>361</width>
<height>26</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<property name="horizontalSpacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="QCheckBox" name="chkSuperimpose">
<property name="sizePolicy">
@ -243,20 +246,39 @@
</property>
<property name="sizeHint" stdset="0">
<size>
<width>170</width>
<width>140</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="4">
<widget class="QCheckBox" name="chkLines">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Lines</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="horizontalLayoutWidget_2">
<property name="geometry">
<rect>
<x>145</x>
<y>20</y>
<width>126</width>
<x>120</x>
<y>21</y>
<width>121</width>
<height>23</height>
</rect>
</property>

View File

@ -65,6 +65,15 @@ public:
* */
void SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis[],string histTitle[]);
/** Get the 1D hist values to plot for angle plotting
* @param nHists Number of graphs in 1D
* @param histNBins Total Number of X axis values/channels in 1D
* @param histXAxis X Axis value in 1D
* @param histYAxis Y Axis value in 1D
* @param histTitle Title for all the graphs in 1D
* */
void SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis,string histTitle[]);
public slots:
/** Save Plots automatically by save all clones
* returns -1 if fail*/

View File

@ -24,6 +24,7 @@ class qCloneWidget;
#include <QGroupBox>
#include <QTimer>
#include <QString>
#include "qwt_symbol.h"
/** C++ Include Headers */
@ -68,6 +69,8 @@ public:
void DisableZoom(bool disable);
/** Enables plot from the plot tab*/
void EnablePlot(bool enable);
/** Enable angle plot */
void EnableAnglePlot(bool enable){anglePlot = enable;};
/** Its a reminder to update plot to set the xy range
* This is done only when there is a plot to update */
@ -129,8 +132,10 @@ void SavePlot();
void SaveAll(bool enable);
/** Sets persistency from plot tab */
void SetPersistency(int val);
/** sets style of plot to dotted */
void SetDottedPlot(bool enable){plotDotted = enable;};
/** sets style of plot to lines*/
void SetLines(bool enable){lines = enable;};
/** sets markers */
void SetMarkers(bool enable){markers = enable;};
/** sets the scan argument to prepare the plot*/
void SetScanArgument(int scanArg){scanArgument = scanArg;};
@ -176,6 +181,10 @@ int GetData(detectorData *data);
/** Saves all the plots. All sets saveError to true if not saved.*/
void SavePlotAutomatic();
void SetStyle(SlsQtH1D* h){
if(lines) h->setStyle(QwtPlotCurve::Lines); else h->setStyle(QwtPlotCurve::Dots);
if(markers) h->setSymbol(*marker); else h->setSymbol(*noMarker);};
@ -281,6 +290,8 @@ std::string imageTitle;
unsigned int plot_in_scope;
/** Number of Pixels in X Axis */
unsigned int nPixelsX;
/** Number of angle Pixels in X Axis */
int nAnglePixelsX;
/** Number of pixel bins in Y Axis */
int nPixelsY;
/** Min Pixel number for Y Axis*/
@ -306,6 +317,10 @@ int histNBins;
double* histXAxis;
/** Y Axis value in 1D */
double* histYAxis[MAX_1DPLOTS];
/** X Axis for angles in 1D */
double* histXAngleAxis;
/** Y Axis for angles in 1D (no persistency) */
double* histYAngleAxis;
/** Current Image Values in 2D */
double* lastImageArray;
/** temporary Y Axis value in 1D */
@ -324,7 +339,11 @@ int progress;
/**If plot is enabled from plot tab*/
bool plotEnable;
/**If plot is dotted */
bool plotDotted;
bool lines;
bool markers;
/** Plot marker */
QwtSymbol *marker;
QwtSymbol *noMarker;
/** Save all plots */
bool saveAll;
/** If error, while automatically saving plots, checks this at the end of an acquistion */
@ -360,6 +379,9 @@ bool isTriggerEnabled;
enum scanArgumentList{None,Level0,Level1,FileIndex,AllFrames};
int scanArgument;
/** enable angle plot */
bool anglePlot;
signals:

View File

@ -8,8 +8,6 @@
* DisableZoom,
* SetXMinMax,SetYMinMax,
* GetXMinimum,GetXMaximum,GetYMinimum,GetYMaximum}
* 07.08.2012:{function to change lines, points etc }
* SetDotStyle
* */
#ifndef SLSQT1DPLOT_H
@ -62,9 +60,7 @@ class SlsQtH1D:public QwtPlotCurve{
SlsQtH1D* Add(double v);
/** Added by Dhanya to change style of graph*/
void SetDotStyle(bool enable){if(enable) setStyle(QwtPlotCurve::Dots); else setStyle(QwtPlotCurve::Lines);};
/**---*/
private:
int ndata;

View File

@ -114,8 +114,29 @@ void qCloneWidget::SetCloneHists(int nHists,int histNBins,double* histXAxis,doub
}
//cloneplot1D->UnZoom();
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
void qCloneWidget::SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis,string histTitle[]){
/** for each plot*/cout<<"qclone nhists:"<<nHists<<endl;
for(int hist_num=0;hist_num<nHists;hist_num++){
/** create hists */
SlsQtH1D* k;
if(hist_num+1>cloneplot1D_hists.size()){
cloneplot1D_hists.append(k=new SlsQtH1D("1d plot",histNBins,histXAxis,histYAxis));
k->SetLineColor(hist_num+1);
}else{
k=cloneplot1D_hists.at(hist_num);
k->SetData(histNBins,histXAxis,histYAxis);
}
k->setTitle(histTitle[hist_num].c_str());
k->Attach(cloneplot1D);
}
//cloneplot1D->UnZoom();
}//-------------------------------------------------------------------------------------------------------------------------------------------------
char* qCloneWidget::GetCurrentTimeStamp(){
char output[30];
char *result;
@ -129,6 +150,7 @@ char* qCloneWidget::GetCurrentTimeStamp(){
return result;
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
void qCloneWidget::SavePlot(){

View File

@ -232,7 +232,7 @@ void qDetectorMain::Initialization(){
connect(tab_dataoutput, SIGNAL(AngularConversionSignal(bool)), tab_actions,SLOT(EnablePositions(bool)));
// Plot tab
connect(tab_plot, SIGNAL(DisableZoomSignal(bool)), this,SLOT(SetZoomToolTip(bool)));
// Actions tab
// Actions tab (also for angles)
connect(tab_actions, SIGNAL(EnableScanBox()), tab_plot,SLOT(EnableScanBox()));
// Plotting
// When the acquisition is finished, must update the meas tab

View File

@ -8,6 +8,7 @@
#include "qDrawPlot.h"
#include "qCloneWidget.h"
#include "slsDetector.h"
// Project Class Headers
#include "slsDetector.h"
#include "multiSlsDetector.h"
@ -66,20 +67,27 @@ void qDrawPlot::SetupWidgetWindow(){
nPixelsX = myDet->getTotalNumberOfChannels();
nPixelsY = 100;
nAnglePixelsX = 1;
minPixelsY = 0;
//2d
lastImageArray = 0;
image_data = 0;
//1d
nHists = 0;
histNBins = 0;
histXAxis = 0;
histXAngleAxis = 0;
histYAngleAxis = 0;
persistency = 0;
currentPersistency = 0;
progress = 0;
plotEnable=true;
plotEnable = true;
anglePlot = false;
saveAll = false;
plotDotted = false;
XYRangeChanged = false;
timerValue = PLOT_TIMER_MS;
frameFactor=0;
@ -114,8 +122,9 @@ void qDrawPlot::SetupWidgetWindow(){
char temp_title[2000];
for(int i=0;i<MAX_1DPLOTS;i++){
sprintf(temp_title,"Frame -%d",i);
histTitle[i] = temp_title;
histTitle[i] = "";
//sprintf(temp_title,"Frame -%d",i);
//histTitle[i] = temp_title;
}
imageTitle.assign("Start Image");
imageXAxisTitle="Pixel";
@ -144,6 +153,18 @@ void qDrawPlot::SetupWidgetWindow(){
plotLayout = new QGridLayout(boxPlot);
plotLayout->addWidget(plot1D,1,1,1,1);
plotLayout->addWidget(plot2D,1,1,1,1);
//marker
lines = true;
markers = false;
marker = new QwtSymbol();
marker->setStyle(QwtSymbol::Cross);
marker->setSize(5,5);
noMarker = new QwtSymbol();
}
//-------------------------------------------------------------------------------------------------------------------------------------------------
@ -190,8 +211,9 @@ void qDrawPlot::StartStopDaqToggle(bool stop_if_running){
//get #scansets for level 0 and level 1
int numScan0 = myDet->getScanSteps(0); numScan0 = ((numScan0==0)?1:numScan0);
int numScan1 = myDet->getScanSteps(1); numScan1 = ((numScan1==0)?1:numScan1);
int numPos = myDet->getPositions(); numPos = ((numPos==0) ?1:numPos);
number_of_exposures = number_of_frames * numScan0 * numScan1;
number_of_exposures = number_of_frames * numScan0 * numScan1 * numPos;
cout << "\tNumber of Exposures:" << number_of_exposures << endl;
// ExposureTime
@ -260,6 +282,9 @@ bool qDrawPlot::StartOrStopThread(bool start){
//start part
if(start){
if(myDet->getRunStatus()==slsDetectorDefs::IDLE)
cout<<endl<<endl<<"IDLE"<<endl<<endl;
else cout<<endl<<endl<<"ERRORRRRRR: "<<myDet->getRunStatus()<<endl<<endl;
// Defaults
progress = 0;
currentFrame = 0;
@ -321,9 +346,7 @@ bool qDrawPlot::StartOrStopThread(bool start){
//1d
histNBins = nPixelsX;
if(histXAxis) delete [] histXAxis; histXAxis = new double [nPixelsX];
if(histYAxis[0]) delete [] histYAxis[0];histYAxis[0] = new double [nPixelsX];
@ -335,8 +358,10 @@ bool qDrawPlot::StartOrStopThread(bool start){
if(image_data) delete [] image_data; image_data = new double[nPixelsY*nPixelsX];
//initializing 1d xaxis
for(unsigned int px=0;px<nPixelsX;px++)
histXAxis[px] = px+10;
for(unsigned int px=0;px<nPixelsX;px++) histXAxis[px] = px;/*+10;*/
histYAxis[0][4] = 190.56;
//initializing 2d array
for(int py=0;py<nPixelsY;py++)
for(int px=0;px<nPixelsX;px++)
@ -415,14 +440,16 @@ int qDrawPlot::GetData(detectorData *data){
//Not Nth Frame, Not time out yet
else{
//if the time is not over, RETURN
if(!data_pause_over){
progress=(int)data->progressIndex;
currentFrame++;
return 0;
if((scanArgument==None)&&(!anglePlot)){
//if the time is not over, RETURN
if(!data_pause_over){
progress=(int)data->progressIndex;
currentFrame++;
return 0;
}
data_pause_over=false;
data_pause_timer->start((int)(PLOT_TIMER_MS/2));
}
data_pause_over=false;
data_pause_timer->start((int)(PLOT_TIMER_MS/2));
}
@ -442,8 +469,25 @@ int qDrawPlot::GetData(detectorData *data){
#ifdef VERYVERBOSE
cout << "Reading in image: " << currentIndex << endl;
#endif
//angle plotting
if(anglePlot){
if(!pthread_mutex_trylock(&(last_image_complete_mutex))){
lastImageNumber= currentFrame+1;
nAnglePixelsX = data->npoints;
histNBins = nAnglePixelsX;
nHists=1;
if(histXAngleAxis) delete [] histXAngleAxis; histXAngleAxis = new double[nAnglePixelsX];
if(histYAngleAxis) delete [] histYAngleAxis; histYAngleAxis = new double[nAnglePixelsX];
memcpy(histXAngleAxis,data->angles,nAnglePixelsX*sizeof(double));
memcpy(histYAngleAxis,data->values,nAnglePixelsX*sizeof(double));
pthread_mutex_unlock(&(last_image_complete_mutex));
}
currentFrame++;
return 0;
}
//if scan argument is 2d
if(scanArgument!=None){
//alframes
if(scanArgument==AllFrames){
if(!pthread_mutex_trylock(&(last_image_complete_mutex))){
lastImageNumber= currentFrame+1;
@ -455,7 +499,8 @@ int qDrawPlot::GetData(detectorData *data){
currentScanDivLevel++;
return 0;
}
else if(scanArgument==FileIndex){
//file index
if(scanArgument==FileIndex){
if(!pthread_mutex_trylock(&(last_image_complete_mutex))){
if(currentIndex == minPixelsY) currentScanDivLevel = 0;
lastImageNumber= currentFrame+1;
@ -467,7 +512,8 @@ int qDrawPlot::GetData(detectorData *data){
currentScanDivLevel++;
return 0;
}
else if(scanArgument==Level0){
//level0
if(scanArgument==Level0){
if(!pthread_mutex_trylock(&(last_image_complete_mutex))){
if(currentScanVariable0!=currentScanValue) currentScanDivLevel++;
currentScanValue = currentScanVariable0;
@ -479,18 +525,18 @@ int qDrawPlot::GetData(detectorData *data){
currentFrame++;
return 0;
}
else {
if(!pthread_mutex_trylock(&(last_image_complete_mutex))){
if(currentScanVariable1!=currentScanValue) currentScanDivLevel++;
currentScanValue = currentScanVariable1;
lastImageNumber= currentFrame+1;
char temp_title[2000]; sprintf(temp_title,"Image Index %d",currentIndex); imageTitle = temp_title;
for(unsigned int px=0;px<nPixelsX;px++) lastImageArray[currentScanDivLevel*nPixelsX+px] += data->values[px];
pthread_mutex_unlock(&(last_image_complete_mutex));
}
currentFrame++;
return 0;
//level1
if(!pthread_mutex_trylock(&(last_image_complete_mutex))){
if(currentScanVariable1!=currentScanValue) currentScanDivLevel++;
currentScanValue = currentScanVariable1;
lastImageNumber= currentFrame+1;
char temp_title[2000]; sprintf(temp_title,"Image Index %d",currentIndex); imageTitle = temp_title;
for(unsigned int px=0;px<nPixelsX;px++) lastImageArray[currentScanDivLevel*nPixelsX+px] += data->values[px];
pthread_mutex_unlock(&(last_image_complete_mutex));
}
currentFrame++;
return 0;
}
//normal measurement or 1d scans
@ -502,18 +548,15 @@ int qDrawPlot::GetData(detectorData *data){
//1d
if(plot_in_scope==1){
// Titles changed to "" inside startstopthread
//sprintf(temp_title,"Frame Index %d",currentIndex); histTitle[0] = temp_title;
// Persistency
if(currentPersistency < persistency)currentPersistency++;
else currentPersistency=persistency;
nHists = currentPersistency+1;
histNBins = nPixelsX;
// copy data
//memcpy(histXAxis, xvalues,nPixelsX*sizeof(double));
for(int i=currentPersistency;i>0;i--)
memcpy(histYAxis[i],histYAxis[i-1],nPixelsX*sizeof(double));
memcpy(histYAxis[0],data->values,nPixelsX*sizeof(double));
//for(int i=0;i<(int)nPixelsX;i++) *(yvalues[0]+i) = (double)*(data->values+i);
}
//2d
else{
@ -593,13 +636,21 @@ void qDrawPlot::UpdatePlot(){
for(int hist_num=0;hist_num<(int)nHists;hist_num++){
SlsQtH1D* h;
if(hist_num+1>plot1D_hists.size()){
plot1D_hists.append(h=new SlsQtH1D("1d plot",histNBins,histXAxis,GetHistYAxis(hist_num)));
if(anglePlot)
plot1D_hists.append(h=new SlsQtH1D("1d plot",histNBins,histXAngleAxis,histYAngleAxis));
else
plot1D_hists.append(h=new SlsQtH1D("1d plot",histNBins,histXAxis,GetHistYAxis(hist_num)));
h->SetLineColor(hist_num+1);
}else{
h=plot1D_hists.at(hist_num);
h->SetData(histNBins,histXAxis,GetHistYAxis(hist_num));
if(anglePlot)
h->SetData(histNBins,histXAngleAxis,histYAngleAxis);
else
h->SetData(histNBins,histXAxis,GetHistYAxis(hist_num));
}
h->SetDotStyle(plotDotted);
//h->setSymbol(*noSymbol);
//h->SetDotStyle(plotDotted);
SetStyle(h);
h->setTitle(GetHistTitle(hist_num));
h->Attach(plot1D);
}
@ -701,7 +752,12 @@ void qDrawPlot::ClonePlot(){
plot1D->SetXTitle(histXAxisTitle.toAscii().constData());
plot1D->SetYTitle(histYAxisTitle.toAscii().constData());
plotLayout->addWidget(plot1D,1,1,1,1);
if(running) winClone[i]->SetCloneHists((int)nHists,histNBins,histXAxis,histYAxis,histTitle);
if(running){
if(anglePlot)
winClone[i]->SetCloneHists((int)nHists,histNBins,histXAxis,histYAxis,histTitle);
else
winClone[i]->SetCloneHists((int)nHists,histNBins,histXAngleAxis,histYAngleAxis,histTitle);
}
}
else{
plot2D = new SlsQt2DPlotLayout(boxPlot);

View File

@ -341,11 +341,11 @@ void qScanWidget::SetMode(int mode){
}
//set the group box widgets
//set the group box widgets and also calls setscan
EnableSizeWidgets();
//set the mode
/*SetScan(mode);*/
//set the mode if mode = none
if(!mode) SetScan(mode);
}

View File

@ -273,17 +273,20 @@ void qTabActions::SetPosition(){
lblPosList->setPalette(normal);
lblPosList->setToolTip("<nobr>Enter the positions at which the detector should be moved.</nobr><br>"
"<nobr>Number of entries is restricted to <b>Number of Positions</b> field.</nobr>");
//delete existing positions
if (positions) delete [] positions;
positions=new double[numPos];
//copying the list
for(int i=0;i<numPos;i++)
positions[i] = comboPos->itemText(i).toDouble();
//setting the list and catching error
if(myDet->setPositions(numPos,positions)!=numPos)
qDefs::WarningMessage("The positions list was not set for some reason.","Actions");
}
//delete existing positions
if (positions) delete [] positions;
positions=new double[comboPos->count()];
//copying the list
for(int i=0;i<comboPos->count();i++)
positions[i] = comboPos->itemText(i).toDouble();
//setting the list and catching error
if(myDet->setPositions(comboPos->count(),positions)!=comboPos->count())
qDefs::WarningMessage("The positions list was not set for some reason.","Actions");
emit EnableScanBox();
}
@ -323,6 +326,7 @@ void qTabActions::EnablePositions(bool enable){
if(btnExpand[NumPositions]->text()=="-")
Expand(group->button(NumPositions));
comboPos->clear();
cout<<"Number of Positions set to :"<<myDet->getPositions()<<endl;
lblName[NumPositions]->setPalette(lblName[NumPositions-1]->palette());
lblName[NumPositions]->setEnabled(false);
btnExpand[NumPositions]->setEnabled(false);
@ -345,7 +349,7 @@ void qTabActions::Refresh(){
//delete existing positions
if (positions) delete [] positions;
//get number of positions
int numPos=myDet->getPositions();
int numPos=myDet->getPositions();cout<<"numPOs:"<<numPos<<endl;
comboPos->setMaxCount(numPos);
//set the number of positions in the gui

View File

@ -348,7 +348,7 @@ void qTabDataOutput::SetAngularCorrection(){
cout << "Setting angular conversion to default" << endl;
#endif
}else{
qDefs::WarningMessage("Angular Conversion could not be set.","Data Output");
qDefs::WarningMessage("Angular Conversion could not be set. Please set the default file name using the command line, if you haven't already.","Data Output");
chkAngular->setChecked(false);
}
}else{

View File

@ -197,7 +197,8 @@ void qTabPlot::Initialization(){
// 1D Plot box
connect(chkSuperimpose, SIGNAL(toggled(bool)), this, SLOT(EnablePersistency(bool)));
connect(spinPersistency,SIGNAL(valueChanged(int)), myPlot,SLOT(SetPersistency(int)));
connect(chkPoints, SIGNAL(toggled(bool)), myPlot, SLOT(SetDottedPlot(bool)));
connect(chkPoints, SIGNAL(toggled(bool)), myPlot, SLOT(SetMarkers(bool)));
connect(chkLines, SIGNAL(toggled(bool)), myPlot, SLOT(SetLines(bool)));
// 2D Plot box
connect(chkInterpolate, SIGNAL(toggled(bool)),myPlot, SIGNAL(InterpolateSignal(bool)));
connect(chkContour, SIGNAL(toggled(bool)),myPlot, SIGNAL(ContourSignal(bool)));
@ -500,8 +501,14 @@ void qTabPlot::EnableScanBox(){
//if it was checked before or disabled before, it remembers to check it again
bool checkedBefore = (boxScan->isChecked()||(!boxScan->isEnabled()));
//none of these scan plotting options make sense if positions>0
bool positionsExist = myDet->getPositions();
//only now enable/disable
boxScan->setEnabled(mode0||mode1);
boxScan->setEnabled((mode0||mode1)&&(!positionsExist));
//if there are scan
if(boxScan->isEnabled()){
@ -534,6 +541,12 @@ void qTabPlot::EnableScanBox(){
}
else EnablingNthFrameFunction(enableNFrame);
//positions
if((positionsExist)&&(chkSuperimpose->isChecked())) chkSuperimpose->setChecked(false);
chkSuperimpose->setEnabled(!positionsExist);
boxFrequency->setEnabled(!positionsExist);
myPlot->EnableAnglePlot(positionsExist);
//sets the scan argument
SetScanArgument();
@ -568,22 +581,14 @@ void qTabPlot::EnablingNthFrameFunction(bool enable){
void qTabPlot::SetScanArgument(){
//as default from histogram and default titles are set here if scanbox is disabled
Select1DPlot(isOrginallyOneD);
//if scans
if(boxScan->isEnabled()){
//setting the title according to the scans
QString mainTitle = QString(" Level 0 : ") + modeNames[myDet->getScanMode(0)] +
QString(" | Level 1 : ") + modeNames[myDet->getScanMode(1)] + QString("");
dispTitle->setText(mainTitle);
myPlot->SetPlotTitle(mainTitle);
}else{
dispTitle->setText(defaultPlotTitle);
myPlot->SetPlotTitle(defaultPlotTitle);
dispTitle->setText(defaultPlotTitle);
myPlot->SetPlotTitle(defaultPlotTitle);
if(isOrginallyOneD){
dispXAxis->setText(defaultHistXAxisTitle);
dispYAxis->setText(defaultHistYAxisTitle);
myPlot->SetHistXAxisTitle(defaultHistXAxisTitle);
myPlot->SetHistYAxisTitle(defaultHistYAxisTitle);
}else{
dispXAxis->setText(defaultImageXAxisTitle);
dispYAxis->setText(defaultImageYAxisTitle);
dispZAxis->setText(defaultImageZAxisTitle);
@ -591,6 +596,31 @@ void qTabPlot::SetScanArgument(){
myPlot->SetImageYAxisTitle(defaultImageYAxisTitle);
myPlot->SetImageZAxisTitle(defaultImageZAxisTitle);
}
Select1DPlot(isOrginallyOneD);
//if scans(1D or 2D)
if(boxScan->isEnabled()){
//setting the title according to the scans
QString mainTitle = QString(" Level 0 : ") + modeNames[myDet->getScanMode(0)] +
QString(" | Level 1 : ") + modeNames[myDet->getScanMode(1)] + QString("");
dispTitle->setText(mainTitle);
myPlot->SetPlotTitle(mainTitle);
Select1DPlot(isOrginallyOneD);
}//angles (1D)
else if(myDet->getPositions()){
//if scan, change title
if((myDet->getScanMode(0))||(myDet->getScanMode(1))){
QString mainTitle = QString(" Level 0 : ") + modeNames[myDet->getScanMode(0)] +
QString(" | Level 1 : ") + modeNames[myDet->getScanMode(1)] + QString("");
dispTitle->setText(mainTitle);
myPlot->SetPlotTitle(mainTitle);
}
dispXAxis->setText("Angles");
myPlot->SetHistXAxisTitle("Angles");
Select1DPlot(true);
}
//for 2d
if((boxScan->isEnabled())&&(boxScan->isChecked())){