mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 03:40:04 +02:00
showing old plot and firstimagE
This commit is contained in:
parent
11d3392064
commit
a337feba7f
@ -459,6 +459,7 @@ int qDrawPlot::ResetDaqForGui(){
|
|||||||
if(!StopDaqForGui()) return 0;
|
if(!StopDaqForGui()) return 0;
|
||||||
cout << "Resetting image number" << endl;
|
cout << "Resetting image number" << endl;
|
||||||
lastImageNumber = 0;
|
lastImageNumber = 0;
|
||||||
|
last_plot_number = -1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -495,6 +496,7 @@ bool qDrawPlot::StartOrStopThread(bool start){
|
|||||||
plot2D->GetPlot()->SetZoom(-0.5,startPixel,nPixelsX,endPixel-startPixel);
|
plot2D->GetPlot()->SetZoom(-0.5,startPixel,nPixelsX,endPixel-startPixel);
|
||||||
plot2D->GetPlot()->UnZoom();
|
plot2D->GetPlot()->UnZoom();
|
||||||
/*XYRangeChanged = true;*/
|
/*XYRangeChanged = true;*/
|
||||||
|
boxPlot->setTitle("Old_Plot.raw");
|
||||||
|
|
||||||
cout << "Starting new acquisition thread ...." << endl;
|
cout << "Starting new acquisition thread ...." << endl;
|
||||||
// Start acquiring data from server
|
// Start acquiring data from server
|
||||||
@ -971,7 +973,7 @@ int qDrawPlot::GetData(detectorData *data,int fIndex, int subIndex){
|
|||||||
plotTitle=QString(plotTitle_prefix)+QString(data->fileName).section('/',-1);
|
plotTitle=QString(plotTitle_prefix)+QString(data->fileName).section('/',-1);
|
||||||
// only if you got the lock, do u need to remember lastimagenumber to plot
|
// only if you got the lock, do u need to remember lastimagenumber to plot
|
||||||
lastImageNumber= currentFrame+1;
|
lastImageNumber= currentFrame+1;
|
||||||
|
cout<<"got last imagenumber:"<<lastImageNumber<<endl;
|
||||||
//1d
|
//1d
|
||||||
if(plot_in_scope==1){
|
if(plot_in_scope==1){
|
||||||
// Titles
|
// Titles
|
||||||
@ -1273,8 +1275,8 @@ int qDrawPlot::MeasurementFinished(int currentMeasurementIndex, int fileIndex){
|
|||||||
#endif
|
#endif
|
||||||
emit SetCurrentMeasurementSignal(currentMeasurement);
|
emit SetCurrentMeasurementSignal(currentMeasurement);
|
||||||
SetupMeasurement();
|
SetupMeasurement();
|
||||||
if((myDet->setReceiverOnline()==slsDetectorDefs::ONLINE_FLAG) && (myDet->getFramesCaughtByReceiver() == 0))
|
/*if((myDet->setReceiverOnline()==slsDetectorDefs::ONLINE_FLAG) && (myDet->getFramesCaughtByReceiver() == 0))
|
||||||
boxPlot->setTitle("OLD_plot.raw");
|
boxPlot->setTitle("OLD_plot.raw");*/
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1335,10 +1337,9 @@ void qDrawPlot::UpdatePlot(){
|
|||||||
if(plotEnable){
|
if(plotEnable){
|
||||||
LockLastImageArray();
|
LockLastImageArray();
|
||||||
//so that it doesnt plot every single thing
|
//so that it doesnt plot every single thing
|
||||||
if(lastImageNumber!=last_plot_number){
|
if(lastImageNumber && lastImageNumber!=last_plot_number){
|
||||||
//1-d plot stuff
|
//1-d plot stuff
|
||||||
if(plot_in_scope==1){
|
if(plot_in_scope==1){
|
||||||
if(lastImageNumber){
|
|
||||||
#ifdef VERYVERBOSE
|
#ifdef VERYVERBOSE
|
||||||
cout << "Last Image Number:" << lastImageNumber << endl;
|
cout << "Last Image Number:" << lastImageNumber << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -1419,12 +1420,10 @@ void qDrawPlot::UpdatePlot(){
|
|||||||
if(saveAll) SavePlotAutomatic();
|
if(saveAll) SavePlotAutomatic();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}//2-d plot stuff
|
}//2-d plot stuff
|
||||||
else{
|
else{
|
||||||
if(lastImageArray){
|
if(lastImageArray){
|
||||||
if(lastImageNumber&&last_plot_number!=(int)lastImageNumber && //there is a new plot
|
if(nPixelsX>0&&nPixelsY>0){
|
||||||
nPixelsX>0&&nPixelsY>0){
|
|
||||||
plot2D->GetPlot()->SetData(nPixelsX,-0.5,nPixelsX-0.5,nPixelsY,startPixel,endPixel,lastImageArray);
|
plot2D->GetPlot()->SetData(nPixelsX,-0.5,nPixelsX-0.5,nPixelsY,startPixel,endPixel,lastImageArray);
|
||||||
plot2D->setTitle(GetImageTitle());
|
plot2D->setTitle(GetImageTitle());
|
||||||
plot2D->SetXTitle(imageXAxisTitle);
|
plot2D->SetXTitle(imageXAxisTitle);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user