fixed some probelems wuth scans for receiver and also scans for allframes/frameindex

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@227 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d 2013-08-16 12:59:48 +00:00
parent 505328bcaa
commit 3c92f26be7
4 changed files with 204 additions and 59 deletions

View File

@ -1319,7 +1319,7 @@ Displays minimum, maximum and sum of values for each plot.
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="checked"> <property name="checked">
<bool>true</bool> <bool>false</bool>
</property> </property>
<widget class="QWidget" name="horizontalLayoutWidget_3"> <widget class="QWidget" name="horizontalLayoutWidget_3">
<property name="geometry"> <property name="geometry">
@ -1342,6 +1342,9 @@ Displays minimum, maximum and sum of values for each plot.
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="toolTip">
<string>&lt;nobr&gt;Enabled only when there is a Scan Level 0&lt;/nobr&gt;</string>
</property>
<property name="text"> <property name="text">
<string>Level 0</string> <string>Level 0</string>
</property> </property>
@ -1374,6 +1377,9 @@ Displays minimum, maximum and sum of values for each plot.
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="toolTip">
<string>&lt;nobr&gt;Enabled only when there is a Scan Level 1&lt;/nobr&gt;</string>
</property>
<property name="text"> <property name="text">
<string>Level 1</string> <string>Level 1</string>
</property> </property>
@ -1403,6 +1409,9 @@ Displays minimum, maximum and sum of values for each plot.
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="toolTip">
<string>&lt;nobr&gt;Enabled only when there is a Scan Level 0 or a Scan Level 1, not both&lt;/nobr&gt;</string>
</property>
<property name="text"> <property name="text">
<string>Frame Index</string> <string>Frame Index</string>
</property> </property>
@ -1432,6 +1441,9 @@ Displays minimum, maximum and sum of values for each plot.
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="toolTip">
<string>&lt;nobr&gt;Disabled only for Angle Plots, Moench and Eiger Detectors&lt;/nobr&gt;</string>
</property>
<property name="text"> <property name="text">
<string>All Frames</string> <string>All Frames</string>
</property> </property>

View File

@ -2,10 +2,10 @@
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui" #define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui"
//#define SVNREPPATH "" //#define SVNREPPATH ""
#define SVNREPUUID "af1100a4-978c-4157-bff7-07162d2ba061" #define SVNREPUUID "af1100a4-978c-4157-bff7-07162d2ba061"
//#define SVNREV 0x225 //#define SVNREV 0x226
//#define SVNKIND "" //#define SVNKIND ""
//#define SVNSCHED "" //#define SVNSCHED ""
#define SVNAUTH "l_maliakal_d" #define SVNAUTH "l_maliakal_d"
#define SVNREV 0x225 #define SVNREV 0x226
#define SVNDATE 0x20130812 #define SVNDATE 0x20130813
// //

View File

@ -339,34 +339,30 @@ void qDrawPlot::Initialization(){
void qDrawPlot::StartStopDaqToggle(bool stop_if_running){ void qDrawPlot::StartStopDaqToggle(bool stop_if_running){
//#ifdef VERYVERBOSE #ifdef VERYVERBOSE
cout << "Entering StartStopDaqToggle(" << stop_if_running << ")" <<endl; cout << "Entering StartStopDaqToggle(" << stop_if_running << ")" <<endl;
//#endif #endif
//static bool running = 1; //static bool running = 1;
if(running){ //stopping if(running){ //stopping
StartDaq(false); StartDaq(false);
running=!running; running=!running;
}else if(!stop_if_running){ //then start }else if(!stop_if_running){ //then start
// Reset Current Measurement // Reset Current Measurement
currentMeasurement = 0; currentMeasurement = 0;
emit SetCurrentMeasurementSignal(currentMeasurement); emit SetCurrentMeasurementSignal(currentMeasurement);
//to get the first image //to get the first image
data_pause_over = true; data_pause_over = true;
//in case of error message //in case of error message
alreadyDisplayed = false; alreadyDisplayed = false;
/*
// Number of Exposures // Number of Exposures
int numFrames = (isFrameEnabled)*((int)myDet->setTimer(slsDetectorDefs::FRAME_NUMBER,-1)); int numFrames = (isFrameEnabled)*((int)myDet->setTimer(slsDetectorDefs::FRAME_NUMBER,-1));
int numTriggers = (isTriggerEnabled)*((int)myDet->setTimer(slsDetectorDefs::CYCLES_NUMBER,-1)); int numTriggers = (isTriggerEnabled)*((int)myDet->setTimer(slsDetectorDefs::CYCLES_NUMBER,-1));
numFrames = ((numFrames==0)?1:numFrames); numFrames = ((numFrames==0)?1:numFrames);
numTriggers = ((numTriggers==0)?1:numTriggers); numTriggers = ((numTriggers==0)?1:numTriggers);
number_of_frames = numFrames * numTriggers; number_of_frames = numFrames * numTriggers;
cout << "\tNumber of Frames per Scan/Measurement:" << number_of_frames << endl; cout << "\tNumber of Frames per Scan/Measurement:" << number_of_frames << endl;
//get #scansets for level 0 and level 1 //get #scansets for level 0 and level 1
int numScan0 = myDet->getScanSteps(0); numScan0 = ((numScan0==0)?1:numScan0); int numScan0 = myDet->getScanSteps(0); numScan0 = ((numScan0==0)?1:numScan0);
int numScan1 = myDet->getScanSteps(1); numScan1 = ((numScan1==0)?1:numScan1); int numScan1 = myDet->getScanSteps(1); numScan1 = ((numScan1==0)?1:numScan1);
@ -374,9 +370,8 @@ void qDrawPlot::StartStopDaqToggle(bool stop_if_running){
number_of_exposures = number_of_frames * numScan0 * numScan1; number_of_exposures = number_of_frames * numScan0 * numScan1;
if(anglePlot) number_of_exposures = numScan0 * numScan1;// * numPos; if(anglePlot) number_of_exposures = numScan0 * numScan1;// * numPos;
cout << "\tNumber of Exposures Per Measurement:" << number_of_exposures << endl; cout << "\tNumber of Exposures Per Measurement:" << number_of_exposures << endl;
*/
// ExposureTime // ExposureTime
exposureTime= ((double)(myDet->setTimer(slsDetectorDefs::ACQUISITION_TIME,-1))*1E-9); exposureTime= ((double)(myDet->setTimer(slsDetectorDefs::ACQUISITION_TIME,-1))*1E-9);
@ -384,9 +379,7 @@ void qDrawPlot::StartStopDaqToggle(bool stop_if_running){
// Acquisition Period // Acquisition Period
acquisitionPeriod= ((double)(myDet->setTimer(slsDetectorDefs::FRAME_PERIOD,-1))*1E-9); acquisitionPeriod= ((double)(myDet->setTimer(slsDetectorDefs::FRAME_PERIOD,-1))*1E-9);
cout << "\tAcquisition Period:" << setprecision (10) << acquisitionPeriod << endl; cout << "\tAcquisition Period:" << setprecision (10) << acquisitionPeriod << endl;
cout << "\tFile Index:" << myDet->getFileIndex() << endl; cout << "\tFile Index:" << myDet->getFileIndex() << endl;
//to take the first data if frameFactor //to take the first data if frameFactor
numFactor = 0; numFactor = 0;
@ -402,8 +395,6 @@ void qDrawPlot::StartStopDaqToggle(bool stop_if_running){
currentFileIndex = myDet->getFileIndex(); currentFileIndex = myDet->getFileIndex();
currentFrameIndex = 0; currentFrameIndex = 0;
StartDaq(true); StartDaq(true);
running=!running; running=!running;
@ -502,15 +493,32 @@ void qDrawPlot::SetScanArgument(int scanArg){
#endif #endif
scanArgument = scanArg; scanArgument = scanArg;
LockLastImageArray();
if(plot_in_scope==1) Clear1DPlot(); if(plot_in_scope==1) Clear1DPlot();
LockLastImageArray(); maxPixelsY = 0;
minPixelsY = 0;
nPixelsX = myDet->getTotalNumberOfChannels(slsDetectorDefs::X); nPixelsX = myDet->getTotalNumberOfChannels(slsDetectorDefs::X);
nPixelsY = myDet->getTotalNumberOfChannels(slsDetectorDefs::Y); nPixelsY = myDet->getTotalNumberOfChannels(slsDetectorDefs::Y);
// Number of Exposures - must be calculated here to get npixelsy for allframes/frameindex scans
int numFrames = (isFrameEnabled)*((int)myDet->setTimer(slsDetectorDefs::FRAME_NUMBER,-1));
int numTriggers = (isTriggerEnabled)*((int)myDet->setTimer(slsDetectorDefs::CYCLES_NUMBER,-1));
numFrames = ((numFrames==0)?1:numFrames);
numTriggers = ((numTriggers==0)?1:numTriggers);
number_of_frames = numFrames * numTriggers;
cout << "\tNumber of Frames per Scan/Measurement:" << number_of_frames << endl;
//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();
number_of_exposures = number_of_frames * numScan0 * numScan1;
if(anglePlot) number_of_exposures = numScan0 * numScan1;// * numPos;
cout << "\tNumber of Exposures Per Measurement:" << number_of_exposures << endl;
//cannot do this in between measurements , so update instantly //cannot do this in between measurements , so update instantly
if(scanArgument==qDefs::Level0){ if(scanArgument==qDefs::Level0){
//no need to check if numsteps=0,cuz otherwise this mode wont be set in plot tab //no need to check if numsteps=0,cuz otherwise this mode wont be set in plot tab
@ -530,7 +538,11 @@ void qDrawPlot::SetScanArgument(int scanArg){
maxPixelsY = values[numSteps-1]; maxPixelsY = values[numSteps-1];
minPixelsY = values[0]; minPixelsY = values[0];
nPixelsY = numSteps; nPixelsY = numSteps;
} }else if(scanArgument==qDefs::AllFrames)
nPixelsY = number_of_exposures;
else if(scanArgument==qDefs::FileIndex)
nPixelsY = number_of_frames;
if(minPixelsY>maxPixelsY){ if(minPixelsY>maxPixelsY){
double temp = minPixelsY; double temp = minPixelsY;
@ -609,7 +621,7 @@ void qDrawPlot::SetupMeasurement(){
maxPixelsY = number_of_exposures - 1; maxPixelsY = number_of_exposures - 1;
minPixelsY = 0; minPixelsY = 0;
if(!running) nPixelsY = number_of_exposures; if(!running) nPixelsY = number_of_exposures;
}//file index }//frame index
else if(scanArgument==qDefs::FileIndex){ else if(scanArgument==qDefs::FileIndex){
maxPixelsY = number_of_frames - 1; maxPixelsY = number_of_frames - 1;
minPixelsY = 0; minPixelsY = 0;
@ -671,6 +683,7 @@ int qDrawPlot::GetDataCallBack(detectorData *data, int fIndex, void *this_pointe
int qDrawPlot::GetData(detectorData *data,int fIndex){ int qDrawPlot::GetData(detectorData *data,int fIndex){
#ifdef VERYVERBOSE #ifdef VERYVERBOSE
cout << "******Entering GetDatafunction********" << endl; cout << "******Entering GetDatafunction********" << endl;
cout << "fIndex " << fIndex << endl;
cout << "fname " << data->fileName << endl; cout << "fname " << data->fileName << endl;
cout << "npoints " << data->npoints << endl; cout << "npoints " << data->npoints << endl;
cout << "npy " << data->npy << endl; cout << "npy " << data->npy << endl;
@ -812,6 +825,8 @@ int qDrawPlot::GetData(detectorData *data,int fIndex){
lastImageNumber= currentFrame+1; lastImageNumber= currentFrame+1;
//title //title
imageTitle = temp_title; imageTitle = temp_title;
cout<<"lastImageNumber:"<<lastImageNumber<<endl;
cout<<"currentScanDivLevel:"<<currentScanDivLevel<<endl;
//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];
pthread_mutex_unlock(&(last_image_complete_mutex)); pthread_mutex_unlock(&(last_image_complete_mutex));
@ -1158,7 +1173,7 @@ void qDrawPlot::UpdatePlot(){
if(plot_in_scope==1){ if(plot_in_scope==1){
if(lastImageNumber){ if(lastImageNumber){
#ifdef VERYVERBOSE #ifdef VERYVERBOSE
cout << "Last Image Number:" << lastImageNumber << endl; cout << "*Last Image Number:" << lastImageNumber << endl;
#endif #endif
if(histNBins){ if(histNBins){
Clear1DPlot(); Clear1DPlot();

View File

@ -174,8 +174,6 @@ void qTabPlot::SetupWidgetWindow(){
} }
Select1DPlot(isOriginallyOneD); Select1DPlot(isOriginallyOneD);
if(isOriginallyOneD) myPlot->Select1DPlot();
else myPlot->Select2DPlot();
//to check if this should be enabled //to check if this should be enabled
EnableScanBox(); EnableScanBox();
@ -248,12 +246,14 @@ void qTabPlot::Select1DPlot(bool b){
chkZAxis->setEnabled(false); chkZAxis->setEnabled(false);
chkZMin->setEnabled(false); chkZMin->setEnabled(false);
chkZMax->setEnabled(false); chkZMax->setEnabled(false);
myPlot->Select1DPlot();
}else{ }else{
box1D->hide(); box1D->hide();
box2D->show(); box2D->show();
chkZAxis->setEnabled(true); chkZAxis->setEnabled(true);
chkZMin->setEnabled(true); chkZMin->setEnabled(true);
chkZMax->setEnabled(true); chkZMax->setEnabled(true);
myPlot->Select2DPlot();
} }
} }
@ -267,7 +267,6 @@ void qTabPlot::Initialization(){
connect(radioHistogram, SIGNAL(toggled(bool)),this, SLOT(SetPlot())); connect(radioHistogram, SIGNAL(toggled(bool)),this, SLOT(SetPlot()));
connect(radioDataGraph, SIGNAL(toggled(bool)),this, SLOT(SetPlot())); connect(radioDataGraph, SIGNAL(toggled(bool)),this, SLOT(SetPlot()));
// Scan box // Scan box
/*connect(btnGroupScan, SIGNAL(buttonClicked(QAbstractButton *)),this, SLOT(SetScanArgument()));*/
connect(boxScan, SIGNAL(toggled(bool)), this, SLOT(EnableScanBox())); connect(boxScan, SIGNAL(toggled(bool)), this, SLOT(EnableScanBox()));
// Snapshot box // Snapshot box
connect(btnClone, SIGNAL(clicked()),myPlot, SLOT(ClonePlot())); connect(btnClone, SIGNAL(clicked()),myPlot, SLOT(ClonePlot()));
@ -507,36 +506,27 @@ void qTabPlot::SetPlot(){
if(radioNoPlot->isChecked()){ if(radioNoPlot->isChecked()){
cout << " - No Plot" << endl; cout << " - No Plot" << endl;
//Select1DPlot(isOriginallyOneD);
//if(isOriginallyOneD) {box1D->show(); box2D->hide();}
//if(!isOriginallyOneD){box2D->show(); box1D->hide();}
myPlot->EnablePlot(false); myPlot->EnablePlot(false);
//if enable is true, disable everything
boxSnapshot->setEnabled(false); boxSnapshot->setEnabled(false);
boxSave->setEnabled(false); boxSave->setEnabled(false);
boxFrequency->setEnabled(false); boxFrequency->setEnabled(false);
boxPlotAxis->setEnabled(false); boxPlotAxis->setEnabled(false);
boxScan->setEnabled(false); boxScan->setEnabled(false);
}else {//if(radioDataGraph->isChecked()){ }else {
cout << " - DataGraph" << endl; if(radioDataGraph->isChecked())
cout << " - DataGraph" << endl;
else
cout << " - Histogram" << endl;
myPlot->EnablePlot(true); myPlot->EnablePlot(true);
//if enable is true, disable everything
if(isOriginallyOneD) {box1D->show(); box2D->hide();}
if(!isOriginallyOneD) {box2D->show(); box1D->hide();}
Select1DPlot(isOriginallyOneD); Select1DPlot(isOriginallyOneD);
if(isOriginallyOneD) myPlot->Select1DPlot();
else myPlot->Select2DPlot();
boxSnapshot->setEnabled(true); boxSnapshot->setEnabled(true);
boxSave->setEnabled(true); boxSave->setEnabled(true);
boxFrequency->setEnabled(true); boxFrequency->setEnabled(true);
boxPlotAxis->setEnabled(true); boxPlotAxis->setEnabled(true);
if(!myPlot->isRunning()) EnableScanBox(); if(!myPlot->isRunning())
}/*else{ EnableScanBox();
cout << " - Histogram" << endl; }
//select(2d) will set oneD to false, but originallyoneD will remember
}*/
} }
@ -683,10 +673,98 @@ void qTabPlot::SetFrequency(){
//------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------
void qTabPlot::EnableScanBox(){ void qTabPlot::EnableScanBox(){
#ifdef VERYVERBOSE #ifdef VERBOSE
cout << "Entering Enable Scan Box()" << endl; cout << "Entering Enable Scan Box()" << endl;
#endif #endif
disconnect(radioNoPlot, SIGNAL(toggled(bool)),this, SLOT(SetPlot()));
disconnect(radioHistogram, SIGNAL(toggled(bool)),this, SLOT(SetPlot()));
disconnect(radioDataGraph, SIGNAL(toggled(bool)),this, SLOT(SetPlot()));
disconnect(boxScan, SIGNAL(toggled(bool)),this, SLOT(EnableScanBox()));
int mode0 = myDet->getScanMode(0);
int mode1 = myDet->getScanMode(1);
int ang;
bool angConvert = myDet->getAngularConversion(ang);
//enabling it after it was plotted
radioDataGraph->setEnabled(true);
//if angle plot or originally 2d, uncheck and disable scanbox
if ((angConvert) || (!isOriginallyOneD)){
boxScan->setChecked(false);
boxScan->setEnabled(false);
//disable histogram
radioHistogram->setEnabled(false);
if(radioHistogram->isChecked())
radioDataGraph->setChecked(true);
//angle only
if((angConvert)&&(chkSuperimpose->isChecked()))
chkSuperimpose->setChecked(false);
chkSuperimpose->setEnabled(!angConvert);
myPlot->EnableAnglePlot(angConvert);
if(angConvert)
boxScan->setToolTip("<nobr>Only 1D Plots enabled for Angle Plots</nobr>");
}
//originally1d && not angle plot
else{
boxScan->setToolTip("");
boxScan->setEnabled(true);
if(mode0 || mode1)
boxScan->setChecked(true);
//still 1d
if(!boxScan->isChecked()){
radioHistogram->setEnabled(true);
/*if(radioHistogram->isChecked())
EnablingNthFrameFunction(false);//just this
else EnablingNthFrameFunction(true); */
}
//2d enabled with boxscan
else{
disconnect(spinNthFrame, SIGNAL(editingFinished()), this, SLOT(SetFrequency()));
disconnect(comboFrequency, SIGNAL(currentIndexChanged(int)), this, SLOT(SetFrequency()));
comboFrequency->setCurrentIndex(1);
spinNthFrame->setValue(1);
SetFrequency();
//disable histogram for 2d
radioHistogram->setEnabled(false);
if(radioHistogram->isChecked())
radioDataGraph->setChecked(true);
/*//make sure nth frame frequency plot is disabled
EnablingNthFrameFunction(false);
*/
//enabling options
radioFileIndex->setEnabled(mode0||mode1);
if(mode0 && mode1){
radioLevel0->setEnabled(false);
radioLevel1->setEnabled(false);
}else{
radioLevel0->setEnabled(mode0);
radioLevel1->setEnabled(mode1);
}
//default is allframes if checked button is disabled
if(!btnGroupScan->checkedButton()->isEnabled())
radioAllFrames->setChecked(true);
connect(spinNthFrame, SIGNAL(editingFinished()), this, SLOT(SetFrequency()));
connect(comboFrequency, SIGNAL(currentIndexChanged(int)), this, SLOT(SetFrequency()));
}
}
connect(radioNoPlot, SIGNAL(toggled(bool)),this, SLOT(SetPlot()));
connect(radioHistogram, SIGNAL(toggled(bool)),this, SLOT(SetPlot()));
connect(radioDataGraph, SIGNAL(toggled(bool)),this, SLOT(SetPlot()));
connect(boxScan, SIGNAL(toggled(bool)),this, SLOT(EnableScanBox()));
/*
int mode0 = myDet->getScanMode(0); int mode0 = myDet->getScanMode(0);
int mode1 = myDet->getScanMode(1); int mode1 = myDet->getScanMode(1);
@ -759,9 +837,7 @@ void qTabPlot::EnableScanBox(){
//boxFrequency->setEnabled(positionsExist); //boxFrequency->setEnabled(positionsExist);
myPlot->EnableAnglePlot(positionsExist); myPlot->EnableAnglePlot(positionsExist);
*/
//sets the scan argument
/*SetScanArgument();*/
} }
@ -791,41 +867,85 @@ void qTabPlot::EnablingNthFrameFunction(bool enable){
//------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------
void qTabPlot::SetScanArgument(){ void qTabPlot::SetScanArgument(){
bool histogram = radioHistogram->isChecked(); #ifdef VERYVERBOSE
cout << "Entering qTabPlot::SetScanArgument()" << endl;
#endif
//as default from histogram and default titles are set here if scanbox is disabled //1d
if(isOriginallyOneD){ if(isOriginallyOneD){
dispXAxis->setText(defaultHistXAxisTitle); dispXAxis->setText(defaultHistXAxisTitle);
dispYAxis->setText(defaultHistYAxisTitle); dispYAxis->setText(defaultHistYAxisTitle);
myPlot->SetHistXAxisTitle(defaultHistXAxisTitle); myPlot->SetHistXAxisTitle(defaultHistXAxisTitle);
myPlot->SetHistYAxisTitle(defaultHistYAxisTitle); myPlot->SetHistYAxisTitle(defaultHistYAxisTitle);
}else{ Select1DPlot(true);
}
//2d
else{
dispXAxis->setText(defaultImageXAxisTitle); dispXAxis->setText(defaultImageXAxisTitle);
dispYAxis->setText(defaultImageYAxisTitle); dispYAxis->setText(defaultImageYAxisTitle);
dispZAxis->setText(defaultImageZAxisTitle); dispZAxis->setText(defaultImageZAxisTitle);
myPlot->SetImageXAxisTitle(defaultImageXAxisTitle); myPlot->SetImageXAxisTitle(defaultImageXAxisTitle);
myPlot->SetImageYAxisTitle(defaultImageYAxisTitle); myPlot->SetImageYAxisTitle(defaultImageYAxisTitle);
myPlot->SetImageZAxisTitle(defaultImageZAxisTitle); myPlot->SetImageZAxisTitle(defaultImageZAxisTitle);
Select1DPlot(false);
} }
Select1DPlot(isOriginallyOneD);
if(isOriginallyOneD) myPlot->Select1DPlot();
else myPlot->Select2DPlot();
//angles (1D)
int ang;
if(myDet->getAngularConversion(ang)){
dispXAxis->setText("Angles");
myPlot->SetHistXAxisTitle("Angles");
Select1DPlot(true);
}
/* bool histogram = radioHistogram->isChecked();
* else if(histogram)*/
//1d with scan
if(boxScan->isChecked()){
myPlot->SetScanArgument(btnGroupScan->checkedId()+1);
switch(btnGroupScan->checkedId()){
case 0://level0
dispYAxis->setText("Scan Level 0");
myPlot->SetImageYAxisTitle("Scan Level 0");
break;
case 1://level1
dispYAxis->setText("Scan Level 1");
myPlot->SetImageYAxisTitle("Scan Level 1");
break;
break;
case 2://file index
dispYAxis->setText("Frame Index");
myPlot->SetImageYAxisTitle("Frame Index");
break;
case 3://all frames
dispYAxis->setText("All Frames");
myPlot->SetImageYAxisTitle("All Frames");
break;
}
Select1DPlot(false);
}else
myPlot->SetScanArgument(qDefs::None);
/*
Select1DPlot(isOriginallyOneD);
int ang; int ang;
//if scans(1D or 2D) //if scans(1D or 2D)
if((boxScan->isEnabled())||(histogram)){ if((boxScan->isEnabled())||(histogram)){
//setting the title according to the scans //setting the title according to the scans
Select1DPlot(isOriginallyOneD); Select1DPlot(isOriginallyOneD);
if(isOriginallyOneD) myPlot->Select1DPlot();
else myPlot->Select2DPlot();
}//angles (1D) }//angles (1D)
else if(myDet->getAngularConversion(ang)){ else if(myDet->getAngularConversion(ang)){
dispXAxis->setText("Angles"); dispXAxis->setText("Angles");
myPlot->SetHistXAxisTitle("Angles"); myPlot->SetHistXAxisTitle("Angles");
Select1DPlot(true); Select1DPlot(true);
myPlot->Select1DPlot();
} }
@ -844,7 +964,6 @@ void qTabPlot::SetScanArgument(){
//set plot to 2d //set plot to 2d
Select1DPlot(false); Select1DPlot(false);
myPlot->Select2DPlot();
} }
//2d //2d
else if((boxScan->isEnabled())&&(boxScan->isChecked())){ else if((boxScan->isEnabled())&&(boxScan->isChecked())){
@ -881,11 +1000,10 @@ void qTabPlot::SetScanArgument(){
//set plot to 2d //set plot to 2d
Select1DPlot(false); Select1DPlot(false);
myPlot->Select2DPlot();
}else //done here so that it isnt set by default each time }else //done here so that it isnt set by default each time
myPlot->SetScanArgument(qDefs::None); myPlot->SetScanArgument(qDefs::None);
*/
qDefs::checkErrorMessage(myDet,"qTabPlot::SetScanArgument"); qDefs::checkErrorMessage(myDet,"qTabPlot::SetScanArgument");
} }