mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-28 01:00: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){
|
||||
#ifdef VERBOSE
|
||||
#ifdef VERYVERBOSE
|
||||
cout << "StartOrStopThread:" << start << endl;
|
||||
#endif
|
||||
static bool firstTime = true;
|
||||
@ -510,7 +510,7 @@ bool qDrawPlot::StartOrStopThread(bool start){
|
||||
|
||||
|
||||
void qDrawPlot::SetScanArgument(int scanArg){
|
||||
#ifdef VERBOSE
|
||||
#ifdef VERYVERBOSE
|
||||
cout << "SetScanArgument function:" << scanArg << " running:" << running << endl;
|
||||
#endif
|
||||
scanArgument = scanArg;
|
||||
@ -627,11 +627,11 @@ void qDrawPlot::SetScanArgument(int scanArg){
|
||||
|
||||
|
||||
void qDrawPlot::SetupMeasurement(){
|
||||
#ifdef VERBOSE
|
||||
#ifdef VERYVERBOSE
|
||||
cout << "SetupMeasurement function:" << running << endl;
|
||||
#endif
|
||||
LockLastImageArray();
|
||||
#ifdef VERBOSE
|
||||
#ifdef VERYVERBOSE
|
||||
cout << "locklastimagearray" << endl;
|
||||
#endif
|
||||
// Defaults
|
||||
@ -643,7 +643,6 @@ void qDrawPlot::SetupMeasurement(){
|
||||
//if(plot_in_scope==2)
|
||||
if(!running)
|
||||
lastImageNumber = 0;/**Just now */
|
||||
cout<<"before 2d"<<endl;
|
||||
//initializing 2d array
|
||||
for(int py=0;py<(int)nPixelsY;py++)
|
||||
for(int px=0;px<(int)nPixelsX;px++)
|
||||
@ -651,7 +650,7 @@ void qDrawPlot::SetupMeasurement(){
|
||||
|
||||
//1d with no scan
|
||||
if ((!originally2D) && (scanArgument==qDefs::None)){
|
||||
#ifdef VERBOSE
|
||||
#ifdef VERYVERBOSE
|
||||
cout << "1D" << endl;
|
||||
#endif
|
||||
if(!running){
|
||||
@ -662,7 +661,7 @@ void qDrawPlot::SetupMeasurement(){
|
||||
}else cout<<"correct palce"<<endl;
|
||||
}
|
||||
else {
|
||||
#ifdef VERBOSE
|
||||
#ifdef VERYVERBOSE
|
||||
cout << "2D" << endl;
|
||||
#endif
|
||||
//2d with no scan
|
||||
@ -714,7 +713,7 @@ void qDrawPlot::SetupMeasurement(){
|
||||
UnlockLastImageArray();
|
||||
|
||||
|
||||
#ifdef VERBOSE
|
||||
#ifdef VERYVERBOSE
|
||||
cout << "locklastimagearray" << endl;
|
||||
#endif
|
||||
}
|
||||
|
@ -404,30 +404,20 @@ void qTabDataOutput::SetAngularCorrection(){
|
||||
#ifdef VERYVERBOSE
|
||||
cout << "Entering Set Angular Correction function" << endl;
|
||||
#endif
|
||||
if(chkAngular->isChecked()){
|
||||
if(myDet->setAngularConversionFile("default")){
|
||||
bool enabled = chkAngular->isChecked();
|
||||
//set
|
||||
if(myDet->setAngularCorrectionMask(enabled) == enabled){
|
||||
#ifdef VERBOSE
|
||||
cout << "Setting angular conversion to default" << endl;
|
||||
cout << "Angular Conversion mask:" << enabled << endl;
|
||||
#endif
|
||||
}else{
|
||||
}
|
||||
//error
|
||||
else{
|
||||
#ifdef VERBOSE
|
||||
cout << "Could not set angular conversion to default" << endl;
|
||||
#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");
|
||||
chkAngular->setChecked(false);
|
||||
}
|
||||
}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
|
||||
}
|
||||
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(!enabled);
|
||||
}
|
||||
|
||||
emit AngularConversionSignal(chkAngular->isChecked());
|
||||
|
@ -715,6 +715,7 @@ void qTabPlot::EnableScanBox(bool Histo){
|
||||
int mode1 = myDet->getScanMode(1);
|
||||
int ang;
|
||||
bool angConvert = myDet->getAngularConversion(ang);
|
||||
myPlot->EnableAnglePlot(angConvert);
|
||||
|
||||
radioDataGraph->setEnabled(true);
|
||||
radioHistogram->setEnabled(true);
|
||||
@ -752,7 +753,6 @@ void qTabPlot::EnableScanBox(bool Histo){
|
||||
|
||||
|
||||
|
||||
myPlot->EnableAnglePlot(angConvert);
|
||||
if(angConvert){
|
||||
boxScan->setToolTip("<nobr>Only 1D Plots enabled for Angle Plots</nobr>");
|
||||
//disable histogram
|
||||
|
@ -266,9 +266,12 @@ void qTabSettings::Refresh(){
|
||||
|
||||
|
||||
// Number of Modules
|
||||
#ifdef VERBOSE
|
||||
cout << "Getting number of modules:" ;
|
||||
#endif
|
||||
int numMod = myDet->setNumberOfModules();
|
||||
#ifdef VERBOSE
|
||||
cout << "Getting number of modules:" << numMod << endl;
|
||||
cout << numMod << endl;
|
||||
#endif
|
||||
spinNumModules->setValue(numMod);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user