mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-29 01:20:02 +02:00
fixed angular conversion crashing problem and got rid of unnecssary prints
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@253 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
parent
f738b218e1
commit
78e6dccf46
@ -461,7 +461,7 @@ int qDrawPlot::ResetDaqForGui(){
|
|||||||
|
|
||||||
|
|
||||||
bool qDrawPlot::StartOrStopThread(bool start){
|
bool qDrawPlot::StartOrStopThread(bool start){
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "StartOrStopThread:" << start << endl;
|
cout << "StartOrStopThread:" << start << endl;
|
||||||
#endif
|
#endif
|
||||||
static bool firstTime = true;
|
static bool firstTime = true;
|
||||||
@ -510,7 +510,7 @@ bool qDrawPlot::StartOrStopThread(bool start){
|
|||||||
|
|
||||||
|
|
||||||
void qDrawPlot::SetScanArgument(int scanArg){
|
void qDrawPlot::SetScanArgument(int scanArg){
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "SetScanArgument function:" << scanArg << " running:" << running << endl;
|
cout << "SetScanArgument function:" << scanArg << " running:" << running << endl;
|
||||||
#endif
|
#endif
|
||||||
scanArgument = scanArg;
|
scanArgument = scanArg;
|
||||||
@ -627,11 +627,11 @@ void qDrawPlot::SetScanArgument(int scanArg){
|
|||||||
|
|
||||||
|
|
||||||
void qDrawPlot::SetupMeasurement(){
|
void qDrawPlot::SetupMeasurement(){
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "SetupMeasurement function:" << running << endl;
|
cout << "SetupMeasurement function:" << running << endl;
|
||||||
#endif
|
#endif
|
||||||
LockLastImageArray();
|
LockLastImageArray();
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "locklastimagearray" << endl;
|
cout << "locklastimagearray" << endl;
|
||||||
#endif
|
#endif
|
||||||
// Defaults
|
// Defaults
|
||||||
@ -643,7 +643,6 @@ void qDrawPlot::SetupMeasurement(){
|
|||||||
//if(plot_in_scope==2)
|
//if(plot_in_scope==2)
|
||||||
if(!running)
|
if(!running)
|
||||||
lastImageNumber = 0;/**Just now */
|
lastImageNumber = 0;/**Just now */
|
||||||
cout<<"before 2d"<<endl;
|
|
||||||
//initializing 2d array
|
//initializing 2d array
|
||||||
for(int py=0;py<(int)nPixelsY;py++)
|
for(int py=0;py<(int)nPixelsY;py++)
|
||||||
for(int px=0;px<(int)nPixelsX;px++)
|
for(int px=0;px<(int)nPixelsX;px++)
|
||||||
@ -651,7 +650,7 @@ void qDrawPlot::SetupMeasurement(){
|
|||||||
|
|
||||||
//1d with no scan
|
//1d with no scan
|
||||||
if ((!originally2D) && (scanArgument==qDefs::None)){
|
if ((!originally2D) && (scanArgument==qDefs::None)){
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "1D" << endl;
|
cout << "1D" << endl;
|
||||||
#endif
|
#endif
|
||||||
if(!running){
|
if(!running){
|
||||||
@ -662,7 +661,7 @@ void qDrawPlot::SetupMeasurement(){
|
|||||||
}else cout<<"correct palce"<<endl;
|
}else cout<<"correct palce"<<endl;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "2D" << endl;
|
cout << "2D" << endl;
|
||||||
#endif
|
#endif
|
||||||
//2d with no scan
|
//2d with no scan
|
||||||
@ -714,7 +713,7 @@ void qDrawPlot::SetupMeasurement(){
|
|||||||
UnlockLastImageArray();
|
UnlockLastImageArray();
|
||||||
|
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "locklastimagearray" << endl;
|
cout << "locklastimagearray" << endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -404,30 +404,20 @@ void qTabDataOutput::SetAngularCorrection(){
|
|||||||
#ifdef VERYVERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "Entering Set Angular Correction function" << endl;
|
cout << "Entering Set Angular Correction function" << endl;
|
||||||
#endif
|
#endif
|
||||||
if(chkAngular->isChecked()){
|
bool enabled = chkAngular->isChecked();
|
||||||
if(myDet->setAngularConversionFile("default")){
|
//set
|
||||||
|
if(myDet->setAngularCorrectionMask(enabled) == enabled){
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Setting angular conversion to default" << endl;
|
cout << "Angular Conversion mask:" << enabled << endl;
|
||||||
#endif
|
#endif
|
||||||
}else{
|
}
|
||||||
|
//error
|
||||||
|
else{
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Could not set angular conversion to default" << endl;
|
cout << "Could not set angular conversion to default" << endl;
|
||||||
#endif
|
#endif
|
||||||
qDefs::Message(qDefs::WARNING,"Angular Conversion could not be set. Please set the default file name using the command line, if you haven't already.","qTabDataOutput::SetAngularCorrection");
|
qDefs::Message(qDefs::WARNING,"Angular Conversion could not be set/reset. Please set the default file name using the command line, if you want to set it.","qTabDataOutput::SetAngularCorrection");
|
||||||
chkAngular->setChecked(false);
|
chkAngular->setChecked(!enabled);
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if(myDet->setAngularConversionFile("")){
|
|
||||||
#ifdef VERBOSE
|
|
||||||
cout << "Could not reset angular correction" << endl;
|
|
||||||
#endif
|
|
||||||
qDefs::Message(qDefs::WARNING,"Angular Conversion could not be reset.","qTabDataOutput::SetAngularCorrection");
|
|
||||||
chkAngular->setChecked(true);
|
|
||||||
}else{;
|
|
||||||
#ifdef VERBOSE
|
|
||||||
cout << "Unsetting angular correction" << endl;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
emit AngularConversionSignal(chkAngular->isChecked());
|
emit AngularConversionSignal(chkAngular->isChecked());
|
||||||
|
@ -715,6 +715,7 @@ void qTabPlot::EnableScanBox(bool Histo){
|
|||||||
int mode1 = myDet->getScanMode(1);
|
int mode1 = myDet->getScanMode(1);
|
||||||
int ang;
|
int ang;
|
||||||
bool angConvert = myDet->getAngularConversion(ang);
|
bool angConvert = myDet->getAngularConversion(ang);
|
||||||
|
myPlot->EnableAnglePlot(angConvert);
|
||||||
|
|
||||||
radioDataGraph->setEnabled(true);
|
radioDataGraph->setEnabled(true);
|
||||||
radioHistogram->setEnabled(true);
|
radioHistogram->setEnabled(true);
|
||||||
@ -752,7 +753,6 @@ void qTabPlot::EnableScanBox(bool Histo){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
myPlot->EnableAnglePlot(angConvert);
|
|
||||||
if(angConvert){
|
if(angConvert){
|
||||||
boxScan->setToolTip("<nobr>Only 1D Plots enabled for Angle Plots</nobr>");
|
boxScan->setToolTip("<nobr>Only 1D Plots enabled for Angle Plots</nobr>");
|
||||||
//disable histogram
|
//disable histogram
|
||||||
|
@ -266,9 +266,12 @@ void qTabSettings::Refresh(){
|
|||||||
|
|
||||||
|
|
||||||
// Number of Modules
|
// Number of Modules
|
||||||
|
#ifdef VERBOSE
|
||||||
|
cout << "Getting number of modules:" ;
|
||||||
|
#endif
|
||||||
int numMod = myDet->setNumberOfModules();
|
int numMod = myDet->setNumberOfModules();
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Getting number of modules:" << numMod << endl;
|
cout << numMod << endl;
|
||||||
#endif
|
#endif
|
||||||
spinNumModules->setValue(numMod);
|
spinNumModules->setValue(numMod);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user