mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
getting back to basics in zooming, using a flag to check for angle error
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@246 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
parent
d421c0c9fe
commit
9f92f5cffa
@ -2,10 +2,10 @@
|
||||
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "af1100a4-978c-4157-bff7-07162d2ba061"
|
||||
//#define SVNREV 0x233
|
||||
//#define SVNREV 0x245
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "l_maliakal_d"
|
||||
#define SVNREV 0x233
|
||||
#define SVNDATE 0x20130829
|
||||
#define SVNREV 0x245
|
||||
#define SVNDATE 0x20131014
|
||||
//
|
||||
|
@ -20,7 +20,7 @@ QMAKE_LIBS = -L$(QTDIR)/lib
|
||||
#LIBS = -L$(QWTDIR)/lib -lqwt -L$(QWT3D)/lib -Wl,-R$(QWTDIR)/lib -L /usr/local/epics/base/lib/$(EPICS_HOST_ARCH)/ -Wl,-R/usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -lca -lCom
|
||||
|
||||
#default
|
||||
DEFINES += VERBOSE DACS_INT PRINT_LOG THIS_PATH=\\\"$$PWD\\\" #VERYVERBOSE
|
||||
DEFINES += VERBOSE DACS_INT PRINT_LOG CHECKINFERROR THIS_PATH=\\\"$$PWD\\\" #VERYVERBOSE
|
||||
LIBS = -L$(QWTDIR)/lib -lqwt -L$(QWT3D)/lib
|
||||
|
||||
|
||||
|
@ -732,6 +732,18 @@ void qDetectorMain::EnableTabs(){
|
||||
|
||||
//moved to here, so that its all in order, instead of signals and different threads
|
||||
if(!enable) {
|
||||
//refresh all the required tabs
|
||||
tab_actions->Refresh();
|
||||
tab_measurement->Refresh();
|
||||
|
||||
tab_settings->Refresh();
|
||||
tab_dataoutput->Refresh();
|
||||
if(tab_advanced->isEnabled()) tab_advanced->Refresh();
|
||||
if(tab_debugging->isEnabled()) tab_debugging->Refresh();
|
||||
if(tab_developer->isEnabled()) tab_developer->Refresh();
|
||||
|
||||
tab_plot->Refresh();
|
||||
|
||||
//stop the adc timer in gotthard
|
||||
if(tab_developer->isEnabled())
|
||||
tab_developer->StopADCTimer();
|
||||
|
@ -488,7 +488,7 @@ bool qDrawPlot::StartOrStopThread(bool start){
|
||||
plot2D->GetPlot()->SetYMinMax(startPixel,endPixel);
|
||||
plot2D->GetPlot()->SetZoom(-0.5,startPixel,nPixelsX,endPixel-startPixel);
|
||||
plot2D->GetPlot()->UnZoom();
|
||||
XYRangeChanged = true;
|
||||
/*XYRangeChanged = true;*/
|
||||
|
||||
cout << "Starting new acquisition thread ...." << endl;
|
||||
// Start acquiring data from server
|
||||
@ -694,6 +694,7 @@ void qDrawPlot::SetupMeasurement(){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
cout<<"nPixelsX:"<<nPixelsX<<endl;
|
||||
cout<<"nPixelsY:"<<nPixelsY<<endl;
|
||||
@ -738,7 +739,6 @@ int qDrawPlot::GetData(detectorData *data,int fIndex){
|
||||
cout << "values " << data->values << endl;
|
||||
cout << "errors " << data->errors << endl;
|
||||
cout << "angle " << data->angles << endl;
|
||||
|
||||
#endif
|
||||
if(!stop_signal){
|
||||
|
||||
@ -790,19 +790,41 @@ int qDrawPlot::GetData(detectorData *data,int fIndex){
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
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];
|
||||
#ifdef CHECKINFERROR
|
||||
int k = 0;
|
||||
for(int i = 0; i < data->npoints; i++){
|
||||
if(isinf(data->values[i])){
|
||||
//cout << "*** ERROR: value at " << i << " infinity" << endl;
|
||||
k++;
|
||||
data->values[i] = 0;
|
||||
}
|
||||
}
|
||||
cout << "*** ERROR: value at " << k << " places have infinity values!" << endl;
|
||||
double m1,m2,s1;
|
||||
GetStatistics(m1,m2,s1,data->angles,nAnglePixelsX);
|
||||
cout << "angle min:" << m1 << endl;
|
||||
cout << "angle max:" << m2 << endl;
|
||||
cout << "angle sum:" << s1 << endl;
|
||||
GetStatistics(m1,m2,s1,data->values,nAnglePixelsX);
|
||||
cout << "value min:" << m1 << endl;
|
||||
cout << "value max:" << m2 << endl;
|
||||
cout << "value sum:" << s1 << endl;
|
||||
#endif
|
||||
memcpy(histXAngleAxis,data->angles,nAnglePixelsX*sizeof(double));
|
||||
memcpy(histYAngleAxis,data->values,nAnglePixelsX*sizeof(double));
|
||||
SetHistXAxisTitle("Angles");
|
||||
}
|
||||
UnlockLastImageArray();
|
||||
currentFrame++;
|
||||
#ifdef VERYVERBOSE
|
||||
cout << "Exiting GetData Function " << endl;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1271,10 +1293,10 @@ void qDrawPlot::UpdatePlot(){
|
||||
h->Attach(plot1D);
|
||||
//refixing all the zooming
|
||||
if((firstPlot) || (anglePlot)){
|
||||
plot1D->SetXMinMax(h->minXValue(),h->maxXValue());
|
||||
/*plot1D->SetXMinMax(h->minXValue(),h->maxXValue());
|
||||
plot1D->SetYMinMax(h->minYValue(),h->maxYValue());
|
||||
plot1D->SetZoomBase(h->minXValue(),h->minYValue(),
|
||||
h->maxXValue()-h->minXValue(),h->maxYValue()-h->minYValue());
|
||||
h->maxXValue()-h->minXValue(),h->maxYValue()-h->minYValue());*/
|
||||
firstPlot = false;
|
||||
}
|
||||
}
|
||||
@ -1715,10 +1737,10 @@ int qDrawPlot::UpdateTrimbitPlot(bool fromDetector,bool Histogram){
|
||||
//attach plot
|
||||
h->Attach(plot1D);
|
||||
//refixing all the zooming
|
||||
plot1D->SetXMinMax(h->minXValue(),h->maxXValue());
|
||||
/*plot1D->SetXMinMax(h->minXValue(),h->maxXValue());
|
||||
plot1D->SetYMinMax(h->minYValue(),h->maxYValue());
|
||||
plot1D->SetZoomBase(h->minXValue(),h->minYValue(),
|
||||
h->maxXValue()-h->minXValue(),h->maxYValue()-h->minYValue());
|
||||
h->maxXValue()-h->minXValue(),h->maxYValue()-h->minYValue());*/
|
||||
}
|
||||
|
||||
else{
|
||||
@ -1751,9 +1773,9 @@ int qDrawPlot::UpdateTrimbitPlot(bool fromDetector,bool Histogram){
|
||||
histFrameIndexTitle->setText(GetHistTitle(0));
|
||||
plotHistogram->attach(plot1D);
|
||||
//refixing all the zooming
|
||||
plot1D->SetXMinMax(0,TRIM_HISTOGRAM_XMAX+1);
|
||||
/*plot1D->SetXMinMax(0,TRIM_HISTOGRAM_XMAX+1);
|
||||
plot1D->SetYMinMax(0,plotHistogram->boundingRect().height());
|
||||
plot1D->SetZoomBase(0,0,actualPixelsX,plotHistogram->boundingRect().height());
|
||||
plot1D->SetZoomBase(0,0,actualPixelsX,plotHistogram->boundingRect().height());*/
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user