diff --git a/slsDetectorGui/forms/form_tab_plot.ui b/slsDetectorGui/forms/form_tab_plot.ui
index 56a301af5..12a77f896 100644
--- a/slsDetectorGui/forms/form_tab_plot.ui
+++ b/slsDetectorGui/forms/form_tab_plot.ui
@@ -196,11 +196,14 @@
10
20
- 350
+ 361
26
+
+ 0
+
-
@@ -243,20 +246,39 @@
- 170
+ 140
10
+ -
+
+
+ true
+
+
+
+ 0
+ 0
+
+
+
+ Lines
+
+
+ true
+
+
+
- 145
- 20
- 126
+ 120
+ 21
+ 121
23
diff --git a/slsDetectorGui/include/qCloneWidget.h b/slsDetectorGui/include/qCloneWidget.h
index 8316989f3..adacf4d07 100644
--- a/slsDetectorGui/include/qCloneWidget.h
+++ b/slsDetectorGui/include/qCloneWidget.h
@@ -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*/
diff --git a/slsDetectorGui/include/qDrawPlot.h b/slsDetectorGui/include/qDrawPlot.h
index e7bb9f3c9..f7f96ed94 100644
--- a/slsDetectorGui/include/qDrawPlot.h
+++ b/slsDetectorGui/include/qDrawPlot.h
@@ -24,6 +24,7 @@ class qCloneWidget;
#include
#include
#include
+#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:
diff --git a/slsDetectorGui/slsDetectorPlotting/include/SlsQt1DPlot.h b/slsDetectorGui/slsDetectorPlotting/include/SlsQt1DPlot.h
index c1af10d47..3b5e64ea9 100644
--- a/slsDetectorGui/slsDetectorPlotting/include/SlsQt1DPlot.h
+++ b/slsDetectorGui/slsDetectorPlotting/include/SlsQt1DPlot.h
@@ -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;
diff --git a/slsDetectorGui/src/qCloneWidget.cpp b/slsDetectorGui/src/qCloneWidget.cpp
index 5539ed5ce..064616ac1 100644
--- a/slsDetectorGui/src/qCloneWidget.cpp
+++ b/slsDetectorGui/src/qCloneWidget.cpp
@@ -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:"<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(){
diff --git a/slsDetectorGui/src/qDetectorMain.cpp b/slsDetectorGui/src/qDetectorMain.cpp
index 80e5683ec..d9e369cd1 100644
--- a/slsDetectorGui/src/qDetectorMain.cpp
+++ b/slsDetectorGui/src/qDetectorMain.cpp
@@ -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
diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp
index 089d03430..900cd86c6 100644
--- a/slsDetectorGui/src/qDrawPlot.cpp
+++ b/slsDetectorGui/src/qDrawPlot.cpp
@@ -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;iaddWidget(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<getRunStatus()<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;pxvalues[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;pxvalues[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);
diff --git a/slsDetectorGui/src/qScanWidget.cpp b/slsDetectorGui/src/qScanWidget.cpp
index 1c18e9ff8..9bcb344ca 100644
--- a/slsDetectorGui/src/qScanWidget.cpp
+++ b/slsDetectorGui/src/qScanWidget.cpp
@@ -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);
}
diff --git a/slsDetectorGui/src/qTabActions.cpp b/slsDetectorGui/src/qTabActions.cpp
index 1c39a0420..44790291c 100644
--- a/slsDetectorGui/src/qTabActions.cpp
+++ b/slsDetectorGui/src/qTabActions.cpp
@@ -273,17 +273,20 @@ void qTabActions::SetPosition(){
lblPosList->setPalette(normal);
lblPosList->setToolTip("Enter the positions at which the detector should be moved.
"
"Number of entries is restricted to Number of Positions field.");
- //delete existing positions
- if (positions) delete [] positions;
- positions=new double[numPos];
- //copying the list
- for(int i=0;iitemText(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;icount();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 :"<getPositions()<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:"<setMaxCount(numPos);
//set the number of positions in the gui
diff --git a/slsDetectorGui/src/qTabDataOutput.cpp b/slsDetectorGui/src/qTabDataOutput.cpp
index 9c570092c..b3237bdc3 100644
--- a/slsDetectorGui/src/qTabDataOutput.cpp
+++ b/slsDetectorGui/src/qTabDataOutput.cpp
@@ -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{
diff --git a/slsDetectorGui/src/qTabPlot.cpp b/slsDetectorGui/src/qTabPlot.cpp
index 92fe7d639..318746799 100644
--- a/slsDetectorGui/src/qTabPlot.cpp
+++ b/slsDetectorGui/src/qTabPlot.cpp
@@ -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())){