solved many bugs, but cannot get data in eiger

This commit is contained in:
Dhanya Maliakal 2017-06-09 16:05:40 +02:00
parent 1e8c7bd637
commit 73c97f1381
2 changed files with 66 additions and 25 deletions

View File

@ -189,7 +189,8 @@ void qTabAdvanced::SetupWidgetWindow(){
//updates roi //updates roi
cout << "Getting ROI" << endl; cout << "Getting ROI" << endl;
updateROIList(); if (myDet->getDetectorsType() == slsDetectorDefs::GOTTHARD)
updateROIList();
// print receiver configurations // print receiver configurations
if(myDet->getDetectorsType() != slsDetectorDefs::MYTHEN){ if(myDet->getDetectorsType() != slsDetectorDefs::MYTHEN){
@ -278,10 +279,11 @@ void qTabAdvanced::Initialization(){
//roi //roi
if (myDet->getDetectorsType() == slsDetectorDefs::GOTTHARD) {
connect(btnClearRoi, SIGNAL(clicked()), this, SLOT(clearROIinDetector())); connect(btnClearRoi, SIGNAL(clicked()), this, SLOT(clearROIinDetector()));
connect(btnGetRoi, SIGNAL(clicked()), this, SLOT(updateROIList())); connect(btnGetRoi, SIGNAL(clicked()), this, SLOT(updateROIList()));
connect(btnSetRoi, SIGNAL(clicked()), this, SLOT(setROI())); connect(btnSetRoi, SIGNAL(clicked()), this, SLOT(setROI()));
}
} }
@ -1317,7 +1319,8 @@ void qTabAdvanced::Refresh(){
#ifdef VERBOSE #ifdef VERBOSE
cout << "Getting ROI" << endl; cout << "Getting ROI" << endl;
#endif #endif
updateROIList(); if (myDet->getDetectorsType() == slsDetectorDefs::GOTTHARD)
updateROIList();
//update alltirmbits from server //update alltirmbits from server
if(boxSetAllTrimbits->isEnabled()) if(boxSetAllTrimbits->isEnabled())

View File

@ -64,11 +64,21 @@ void qTabMeasurement::SetupWidgetWindow(){
//Number of Triggers //Number of Triggers
spinNumTriggers->setValue((int)myDet->setTimer(slsDetectorDefs::CYCLES_NUMBER,-1)); spinNumTriggers->setValue((int)myDet->setTimer(slsDetectorDefs::CYCLES_NUMBER,-1));
//delay //delay
time = qDefs::getCorrectTime(unit,((double)(myDet->setTimer(slsDetectorDefs::DELAY_AFTER_TRIGGER,-1)*(1E-9)))); if (detType == slsDetectorDefs::EIGER) {
spinDelay->setValue(time); lblDelay->setEnabled(false);
comboDelayUnit->setCurrentIndex((int)unit); spinDelay->setEnabled(false);
comboDelayUnit->setEnabled(false);
} else {
time = qDefs::getCorrectTime(unit,((double)(myDet->setTimer(slsDetectorDefs::DELAY_AFTER_TRIGGER,-1)*(1E-9))));
spinDelay->setValue(time);
comboDelayUnit->setCurrentIndex((int)unit);
}
//gates //gates
spinNumGates->setValue((int)myDet->setTimer(slsDetectorDefs::GATES_NUMBER,-1)); if ((detType == slsDetectorDefs::EIGER) || (detType == slsDetectorDefs::JUNGFRAU)) {
lblNumGates->setEnabled(false);
spinNumGates->setEnabled(false);
} else
spinNumGates->setValue((int)myDet->setTimer(slsDetectorDefs::GATES_NUMBER,-1));
//probes //probes
if(detType == slsDetectorDefs::MYTHEN) if(detType == slsDetectorDefs::MYTHEN)
spinNumProbes->setValue((int)myDet->setTimer(slsDetectorDefs::PROBES_NUMBER,-1)); spinNumProbes->setValue((int)myDet->setTimer(slsDetectorDefs::PROBES_NUMBER,-1));
@ -274,11 +284,17 @@ void qTabMeasurement::Initialization(){
connect(comboPeriodUnit,SIGNAL(currentIndexChanged(int)), this, SLOT(setAcquisitionPeriod())); connect(comboPeriodUnit,SIGNAL(currentIndexChanged(int)), this, SLOT(setAcquisitionPeriod()));
//Number of Triggers //Number of Triggers
connect(spinNumTriggers,SIGNAL(valueChanged(int)), this, SLOT(setNumTriggers(int))); connect(spinNumTriggers,SIGNAL(valueChanged(int)), this, SLOT(setNumTriggers(int)));
//Delay After Trigger //Delay After Trigger
connect(spinDelay,SIGNAL(valueChanged(double)), this, SLOT(setDelay())); if (detType != slsDetectorDefs::EIGER) {
connect(comboDelayUnit,SIGNAL(currentIndexChanged(int)), this, SLOT(setDelay())); connect(spinDelay,SIGNAL(valueChanged(double)), this, SLOT(setDelay()));
connect(comboDelayUnit,SIGNAL(currentIndexChanged(int)), this, SLOT(setDelay()));
}
//Number of Gates //Number of Gates
connect(spinNumGates,SIGNAL(valueChanged(int)), this, SLOT(setNumGates(int))); if ((detType != slsDetectorDefs::EIGER) && (detType != slsDetectorDefs::JUNGFRAU))
connect(spinNumGates,SIGNAL(valueChanged(int)), this, SLOT(setNumGates(int)));
//Number of Probes //Number of Probes
connect(spinNumProbes,SIGNAL(valueChanged(int)), this, SLOT(setNumProbes(int))); connect(spinNumProbes,SIGNAL(valueChanged(int)), this, SLOT(setNumProbes(int)));
} }
@ -784,9 +800,12 @@ void qTabMeasurement::Refresh(){
disconnect(spinPeriod, SIGNAL(valueChanged(double)), this, SLOT(setAcquisitionPeriod())); disconnect(spinPeriod, SIGNAL(valueChanged(double)), this, SLOT(setAcquisitionPeriod()));
disconnect(comboPeriodUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(setAcquisitionPeriod())); disconnect(comboPeriodUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(setAcquisitionPeriod()));
disconnect(spinNumTriggers, SIGNAL(valueChanged(int)), this, SLOT(setNumTriggers(int))); disconnect(spinNumTriggers, SIGNAL(valueChanged(int)), this, SLOT(setNumTriggers(int)));
disconnect(spinDelay, SIGNAL(valueChanged(double)), this, SLOT(setDelay())); if (detType != slsDetectorDefs::EIGER) {
disconnect(comboDelayUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(setDelay())); disconnect(spinDelay, SIGNAL(valueChanged(double)), this, SLOT(setDelay()));
disconnect(spinNumGates, SIGNAL(valueChanged(int)), this, SLOT(setNumGates(int))); disconnect(comboDelayUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(setDelay()));
}
if ((detType != slsDetectorDefs::EIGER) && (detType != slsDetectorDefs::JUNGFRAU))
disconnect(spinNumGates, SIGNAL(valueChanged(int)), this, SLOT(setNumGates(int)));
#ifdef VERBOSE #ifdef VERBOSE
cout << "Getting number of measurements & frames" << endl; cout << "Getting number of measurements & frames" << endl;
@ -815,14 +834,30 @@ void qTabMeasurement::Refresh(){
cout << "Getting delay after trigger, number of triggers and number of gates" << endl; cout << "Getting delay after trigger, number of triggers and number of gates" << endl;
#endif #endif
//delay //delay
time = qDefs::getCorrectTime(unit,((double)(myDet->setTimer(slsDetectorDefs::DELAY_AFTER_TRIGGER,-1)*(1E-9)))); //delay
spinDelay->setValue(time); if (detType == slsDetectorDefs::EIGER) {
comboDelayUnit->setCurrentIndex((int)unit); lblDelay->setEnabled(false);
spinDelay->setEnabled(false);
comboDelayUnit->setEnabled(false);
} else {
lblDelay->setEnabled(true);
spinDelay->setEnabled(true);
comboDelayUnit->setEnabled(true);
time = qDefs::getCorrectTime(unit,((double)(myDet->setTimer(slsDetectorDefs::DELAY_AFTER_TRIGGER,-1)*(1E-9))));
spinDelay->setValue(time);
comboDelayUnit->setCurrentIndex((int)unit);
}
//gates
if ((detType == slsDetectorDefs::EIGER) || (detType == slsDetectorDefs::JUNGFRAU)) {
lblNumGates->setEnabled(false);
spinNumGates->setEnabled(false);
} else {
lblNumGates->setEnabled(true);
spinNumGates->setEnabled(true);
spinNumGates->setValue((int)myDet->setTimer(slsDetectorDefs::GATES_NUMBER,-1));
}
//Number of Triggers //Number of Triggers
spinNumTriggers->setValue((int)myDet->setTimer(slsDetectorDefs::CYCLES_NUMBER,-1)); spinNumTriggers->setValue((int)myDet->setTimer(slsDetectorDefs::CYCLES_NUMBER,-1));
//gates
spinNumGates->setValue((int)myDet->setTimer(slsDetectorDefs::GATES_NUMBER,-1));
#ifdef VERBOSE #ifdef VERBOSE
cout << "Getting file name prefix, file index, file write enable and progress index" << endl; cout << "Getting file name prefix, file index, file write enable and progress index" << endl;
@ -851,9 +886,12 @@ void qTabMeasurement::Refresh(){
connect(spinPeriod, SIGNAL(valueChanged(double)), this, SLOT(setAcquisitionPeriod())); connect(spinPeriod, SIGNAL(valueChanged(double)), this, SLOT(setAcquisitionPeriod()));
connect(comboPeriodUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(setAcquisitionPeriod())); connect(comboPeriodUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(setAcquisitionPeriod()));
connect(spinNumTriggers, SIGNAL(valueChanged(int)), this, SLOT(setNumTriggers(int))); connect(spinNumTriggers, SIGNAL(valueChanged(int)), this, SLOT(setNumTriggers(int)));
connect(spinDelay, SIGNAL(valueChanged(double)), this, SLOT(setDelay())); if (detType != slsDetectorDefs::EIGER) {
connect(comboDelayUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(setDelay())); connect(spinDelay, SIGNAL(valueChanged(double)), this, SLOT(setDelay()));
connect(spinNumGates, SIGNAL(valueChanged(int)), this, SLOT(setNumGates(int))); connect(comboDelayUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(setDelay()));
}
if ((detType != slsDetectorDefs::EIGER) && (detType != slsDetectorDefs::JUNGFRAU))
connect(spinNumGates, SIGNAL(valueChanged(int)), this, SLOT(setNumGates(int)));
//timing mode - will also check if exptime>acq period and also enableprobes() //timing mode - will also check if exptime>acq period and also enableprobes()
GetModeFromDetector(); GetModeFromDetector();