mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-27 08:40:02 +02:00
slsDetectorGui:added subexptime and subperiod to gui
This commit is contained in:
parent
b4d9a6a09d
commit
563b1bb8b7
@ -256,7 +256,7 @@ Plots Trimbits from Detector. This will take time.
|
|||||||
<x>25</x>
|
<x>25</x>
|
||||||
<y>25</y>
|
<y>25</y>
|
||||||
<width>696</width>
|
<width>696</width>
|
||||||
<height>199</height>
|
<height>208</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
@ -977,7 +977,7 @@ An extension given by the modules serial number will be attached.
|
|||||||
<x>25</x>
|
<x>25</x>
|
||||||
<y>25</y>
|
<y>25</y>
|
||||||
<width>686</width>
|
<width>686</width>
|
||||||
<height>128</height>
|
<height>148</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_8">
|
<layout class="QGridLayout" name="gridLayout_8">
|
||||||
@ -1357,7 +1357,7 @@ An extension given by the modules serial number will be attached.
|
|||||||
<x>35</x>
|
<x>35</x>
|
||||||
<y>15</y>
|
<y>15</y>
|
||||||
<width>686</width>
|
<width>686</width>
|
||||||
<height>128</height>
|
<height>146</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
<layout class="QGridLayout" name="gridLayout_6">
|
||||||
@ -1750,7 +1750,7 @@ An extension given by the modules serial number will be attached.
|
|||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab_2">
|
<widget class="QWidget" name="tab_2">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Others</string>
|
<string>Acquisition</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QWidget" name="gridLayoutWidget_2">
|
<widget class="QWidget" name="gridLayoutWidget_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
@ -1758,10 +1758,48 @@ An extension given by the modules serial number will be attached.
|
|||||||
<x>14</x>
|
<x>14</x>
|
||||||
<y>13</y>
|
<y>13</y>
|
||||||
<width>367</width>
|
<width>367</width>
|
||||||
<height>39</height>
|
<height>110</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QDoubleSpinBox" name="spinSubExpTime">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>
|
||||||
|
Exposure Time of a sub frame. Only for Eiger in 32 bit mode
|
||||||
|
</nobr><br><nobr>
|
||||||
|
#subexptime#
|
||||||
|
</nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="keyboardTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>2000000000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<spacer name="horizontalSpacer_8">
|
<spacer name="horizontalSpacer_8">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -1791,7 +1829,80 @@ An extension given by the modules serial number will be attached.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="lblSubExpTime">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>
|
||||||
|
Exposure Time of a sub frame. Only for Eiger in 32 bit mode
|
||||||
|
</nobr><br><nobr>
|
||||||
|
#subexptime#
|
||||||
|
</nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Sub Frame Exposure Time:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<widget class="QComboBox" name="comboSubExpTimeUnit">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>
|
||||||
|
Exposure Time of a sub frame. Only for Eiger in 32 bit mode
|
||||||
|
</nobr><br><nobr>
|
||||||
|
#subexptime#
|
||||||
|
</nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>hr</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>min</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>s</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>ms</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>us</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>ns</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" colspan="2">
|
||||||
<widget class="QSpinBox" name="spinNumStoragecells">
|
<widget class="QSpinBox" name="spinNumStoragecells">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -1831,6 +1942,123 @@ An extension given by the modules serial number will be attached.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="lblSubPeriod">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>
|
||||||
|
Period between sub frames. Only for Eiger in 32 bit mode.
|
||||||
|
</nobr><br><nobr>
|
||||||
|
Default value is 0. A value less than the required minimum is ignored.
|
||||||
|
</nobr><br><nobr>
|
||||||
|
#subperiod#
|
||||||
|
</nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Sub Frame Period:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QDoubleSpinBox" name="spinSubPeriod">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>
|
||||||
|
Period between sub frames. Only for Eiger in 32 bit mode.
|
||||||
|
</nobr><br><nobr>
|
||||||
|
Default value is 0. A value less than the required minimum is ignored.
|
||||||
|
</nobr><br><nobr>
|
||||||
|
#subperiod#
|
||||||
|
</nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="keyboardTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<double>-1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<double>2000000000.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<double>1.000000000000000</double>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3">
|
||||||
|
<widget class="QComboBox" name="comboSubPeriodUnit">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>
|
||||||
|
Period between sub frames. Only for Eiger in 32 bit mode.
|
||||||
|
</nobr><br><nobr>
|
||||||
|
Default value is 0. A value less than the required minimum is ignored.
|
||||||
|
</nobr><br><nobr>
|
||||||
|
#subperiod#
|
||||||
|
</nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="layoutDirection">
|
||||||
|
<enum>Qt::LeftToRight</enum>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>hr</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>min</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>s</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>ms</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>us</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>ns</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -201,6 +201,13 @@ private slots:
|
|||||||
/** Set storage cells */
|
/** Set storage cells */
|
||||||
void SetNumStoragecells(int value);
|
void SetNumStoragecells(int value);
|
||||||
|
|
||||||
|
/** Set sub frame exposure time */
|
||||||
|
void SetSubExposureTime();
|
||||||
|
|
||||||
|
/** Set sub frame period */
|
||||||
|
void SetSubPeriod();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** The multi detector object */
|
/** The multi detector object */
|
||||||
multiSlsDetector *myDet;
|
multiSlsDetector *myDet;
|
||||||
@ -245,7 +252,11 @@ private:
|
|||||||
vector <QSpinBox*> spinToY;
|
vector <QSpinBox*> spinToY;
|
||||||
int numRois;
|
int numRois;
|
||||||
|
|
||||||
|
/** sub period tool tip variables*/
|
||||||
|
QString acqSubPeriodTip;
|
||||||
|
QString errSubPeriodTip;
|
||||||
|
|
||||||
|
void CheckAcqPeriodGreaterThanExp();
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -72,6 +72,14 @@ void qTabAdvanced::SetupWidgetWindow(){
|
|||||||
rxrOnlineTip = comboRxrOnline->toolTip();
|
rxrOnlineTip = comboRxrOnline->toolTip();
|
||||||
errOnlineTip = QString("<nobr><br><br><font color=\"red\"><nobr>It is offline!</nobr></font>");
|
errOnlineTip = QString("<nobr><br><br><font color=\"red\"><nobr>It is offline!</nobr></font>");
|
||||||
|
|
||||||
|
acqSubPeriodTip = spinSubPeriod->toolTip();
|
||||||
|
errSubPeriodTip = acqSubPeriodTip +
|
||||||
|
QString("<nobr><br><br><font color=\"red\"><b>Sub Frame Period</b> "
|
||||||
|
"should be greater than or equal to "
|
||||||
|
"<b>Sub Frame Exposure Time</b>.</font></nobr>");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
detType = myDet->getDetectorsType();
|
detType = myDet->getDetectorsType();
|
||||||
switch(detType){
|
switch(detType){
|
||||||
case slsDetectorDefs::MYTHEN:
|
case slsDetectorDefs::MYTHEN:
|
||||||
@ -91,6 +99,12 @@ void qTabAdvanced::SetupWidgetWindow(){
|
|||||||
dispMAC->setEnabled(true);
|
dispMAC->setEnabled(true);
|
||||||
boxRxr->setEnabled(true);
|
boxRxr->setEnabled(true);
|
||||||
boxSetAllTrimbits->setEnabled(true);
|
boxSetAllTrimbits->setEnabled(true);
|
||||||
|
lblSubExpTime->setEnabled(true);
|
||||||
|
spinSubExpTime->setEnabled(true);
|
||||||
|
comboSubExpTimeUnit->setEnabled(true);
|
||||||
|
lblSubPeriod->setEnabled(true);
|
||||||
|
spinSubPeriod->setEnabled(true);
|
||||||
|
comboSubPeriodUnit->setEnabled(true);
|
||||||
break;
|
break;
|
||||||
case slsDetectorDefs::MOENCH:
|
case slsDetectorDefs::MOENCH:
|
||||||
isEnergy = false;
|
isEnergy = false;
|
||||||
@ -212,6 +226,18 @@ void qTabAdvanced::SetupWidgetWindow(){
|
|||||||
lblNumStoragecells->setEnabled(true);
|
lblNumStoragecells->setEnabled(true);
|
||||||
spinNumStoragecells->setEnabled(true);
|
spinNumStoragecells->setEnabled(true);
|
||||||
spinNumStoragecells->setValue((int)myDet->setTimer(slsDetectorDefs::STORAGE_CELL_NUMBER,-1));
|
spinNumStoragecells->setValue((int)myDet->setTimer(slsDetectorDefs::STORAGE_CELL_NUMBER,-1));
|
||||||
|
} else if (detType == slsDetectorDefs::EIGER) {
|
||||||
|
//subexptime
|
||||||
|
qDefs::timeUnit unit;
|
||||||
|
double time = qDefs::getCorrectTime(unit,((double)(myDet->setTimer(slsDetectorDefs::SUBFRAME_ACQUISITION_TIME,-1)*(1E-9))));
|
||||||
|
spinSubExpTime->setValue(time);
|
||||||
|
comboSubExpTimeUnit->setCurrentIndex((int)unit);
|
||||||
|
//period
|
||||||
|
time = qDefs::getCorrectTime(unit,((double)(myDet->setTimer(slsDetectorDefs::SUBFRAME_PERIOD,-1)*(1E-9))));
|
||||||
|
spinSubPeriod->setValue(time);
|
||||||
|
comboSubPeriodUnit->setCurrentIndex((int)unit);
|
||||||
|
|
||||||
|
CheckAcqPeriodGreaterThanExp();
|
||||||
}
|
}
|
||||||
|
|
||||||
Initialization();
|
Initialization();
|
||||||
@ -303,6 +329,14 @@ void qTabAdvanced::Initialization(){
|
|||||||
|
|
||||||
if(detType == slsReceiverDefs::JUNGFRAU) {
|
if(detType == slsReceiverDefs::JUNGFRAU) {
|
||||||
connect(spinNumStoragecells, SIGNAL(valueChanged(int)), this, SLOT(SetNumStoragecells(int)));
|
connect(spinNumStoragecells, SIGNAL(valueChanged(int)), this, SLOT(SetNumStoragecells(int)));
|
||||||
|
} else if (detType == slsDetectorDefs::EIGER) {
|
||||||
|
//Exposure Time
|
||||||
|
connect(spinSubExpTime,SIGNAL(valueChanged(double)), this, SLOT(SetSubExposureTime()));
|
||||||
|
connect(comboSubExpTimeUnit,SIGNAL(currentIndexChanged(int)), this, SLOT(SetSubExposureTime()));
|
||||||
|
//Frame Period between exposures
|
||||||
|
connect(spinSubPeriod,SIGNAL(valueChanged(double)), this, SLOT(SetSubPeriod()));
|
||||||
|
connect(comboSubPeriodUnit,SIGNAL(currentIndexChanged(int)),this, SLOT(SetSubPeriod()));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1253,6 +1287,110 @@ void qTabAdvanced::SetNumStoragecells(int value) {
|
|||||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void qTabAdvanced::SetSubExposureTime() {
|
||||||
|
disconnect(spinSubExpTime,SIGNAL(valueChanged(double)), this, SLOT(SetSubExposureTime()));
|
||||||
|
disconnect(comboSubExpTimeUnit,SIGNAL(currentIndexChanged(int)),this, SLOT(SetSubExposureTime()));
|
||||||
|
|
||||||
|
//Get the value of timer in ns
|
||||||
|
double timeNS = qDefs::getNSTime(
|
||||||
|
(qDefs::timeUnit)comboSubExpTimeUnit->currentIndex(),
|
||||||
|
spinSubExpTime->value());
|
||||||
|
|
||||||
|
// set value
|
||||||
|
#ifdef VERBOSE
|
||||||
|
cout << "Setting sub frame acquisition time to " << timeNS << " clocks" <<
|
||||||
|
"/" << spinSubExpTime->value() <<
|
||||||
|
qDefs::getUnitString((qDefs::timeUnit)comboSubExpTimeUnit->currentIndex()) << endl;
|
||||||
|
#endif
|
||||||
|
myDet->setTimer(slsDetectorDefs::SUBFRAME_ACQUISITION_TIME,(int64_t)timeNS);
|
||||||
|
qDefs::checkErrorMessage(myDet,"qTabAdvanced::SetSubExposureTime");
|
||||||
|
|
||||||
|
// update value in gui
|
||||||
|
qDefs::timeUnit unit;
|
||||||
|
double time = qDefs::getCorrectTime(unit,((double)(
|
||||||
|
myDet->setTimer(slsDetectorDefs::SUBFRAME_ACQUISITION_TIME,-1)*(1E-9))));
|
||||||
|
spinSubExpTime->setValue(time);
|
||||||
|
comboSubExpTimeUnit->setCurrentIndex((int)unit);
|
||||||
|
|
||||||
|
|
||||||
|
// highlight if period < exptime
|
||||||
|
CheckAcqPeriodGreaterThanExp();
|
||||||
|
|
||||||
|
connect(spinSubExpTime,SIGNAL(valueChanged(double)), this, SLOT(SetSubExposureTime()));
|
||||||
|
connect(comboSubExpTimeUnit,SIGNAL(currentIndexChanged(int)), this, SLOT(SetSubExposureTime()));
|
||||||
|
|
||||||
|
|
||||||
|
qDefs::checkErrorMessage(myDet,"qTabAdvanced::SetSubExposureTime");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void qTabAdvanced::SetSubPeriod() {
|
||||||
|
disconnect(spinSubPeriod,SIGNAL(valueChanged(double)), this, SLOT(SetSubPeriod()));
|
||||||
|
disconnect(comboSubPeriodUnit,SIGNAL(currentIndexChanged(int)),this, SLOT(SetSubPeriod()));
|
||||||
|
|
||||||
|
//Get the value of timer in ns
|
||||||
|
double timeNS = qDefs::getNSTime(
|
||||||
|
(qDefs::timeUnit)comboSubPeriodUnit->currentIndex(),
|
||||||
|
spinSubPeriod->value());
|
||||||
|
|
||||||
|
// set value
|
||||||
|
#ifdef VERBOSE
|
||||||
|
cout << "Setting sub frame period to " << timeNS << " clocks" <<
|
||||||
|
"/" << spinSubPeriod->value() <<
|
||||||
|
qDefs::getUnitString((qDefs::timeUnit)comboSubPeriodUnit->currentIndex()) << endl;
|
||||||
|
#endif
|
||||||
|
myDet->setTimer(slsDetectorDefs::SUBFRAME_PERIOD,(int64_t)timeNS);
|
||||||
|
qDefs::checkErrorMessage(myDet,"qTabAdvanced::SetSubPeriod");
|
||||||
|
|
||||||
|
// update value in gui
|
||||||
|
qDefs::timeUnit unit;
|
||||||
|
double time = qDefs::getCorrectTime(unit,((double)(
|
||||||
|
myDet->setTimer(slsDetectorDefs::SUBFRAME_PERIOD,-1)*(1E-9))));
|
||||||
|
spinSubPeriod->setValue(time);
|
||||||
|
comboSubPeriodUnit->setCurrentIndex((int)unit);
|
||||||
|
|
||||||
|
// highlight if period < exptime
|
||||||
|
CheckAcqPeriodGreaterThanExp();
|
||||||
|
|
||||||
|
connect(spinSubPeriod,SIGNAL(valueChanged(double)), this, SLOT(SetSubPeriod()));
|
||||||
|
connect(comboSubPeriodUnit,SIGNAL(currentIndexChanged(int)),this, SLOT(SetSubPeriod()));
|
||||||
|
|
||||||
|
|
||||||
|
qDefs::checkErrorMessage(myDet,"qTabAdvanced::SetSubPeriod");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void qTabAdvanced::CheckAcqPeriodGreaterThanExp(){
|
||||||
|
double exptimeNS = qDefs::getNSTime(
|
||||||
|
(qDefs::timeUnit)comboSubExpTimeUnit->currentIndex(),
|
||||||
|
spinSubExpTime->value());
|
||||||
|
double acqtimeNS = qDefs::getNSTime(
|
||||||
|
(qDefs::timeUnit)comboSubPeriodUnit->currentIndex(),
|
||||||
|
spinSubPeriod->value());
|
||||||
|
if(exptimeNS>acqtimeNS && acqtimeNS > 0) {
|
||||||
|
spinSubPeriod->setToolTip(errSubPeriodTip);
|
||||||
|
lblSubPeriod->setToolTip(errSubPeriodTip);
|
||||||
|
lblSubPeriod->setPalette(red);
|
||||||
|
lblSubPeriod->setText("Sub Frame Period:*");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
spinSubPeriod->setToolTip(acqSubPeriodTip);
|
||||||
|
lblSubPeriod->setToolTip(acqSubPeriodTip);
|
||||||
|
lblSubPeriod->setPalette(lblExpTime->palette());
|
||||||
|
lblSubPeriod->setText("Sub Frame Period:");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
void qTabAdvanced::Refresh(){
|
void qTabAdvanced::Refresh(){
|
||||||
|
|
||||||
|
|
||||||
@ -1449,6 +1587,38 @@ void qTabAdvanced::Refresh(){
|
|||||||
connect(spinNumStoragecells,SIGNAL(valueChanged(int)), this, SLOT(SetNumStoragecells(int)));
|
connect(spinNumStoragecells,SIGNAL(valueChanged(int)), this, SLOT(SetNumStoragecells(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sub exptime and sub period
|
||||||
|
else if (detType == slsReceiverDefs::EIGER) {
|
||||||
|
disconnect(spinSubExpTime,SIGNAL(valueChanged(double)), this, SLOT(SetSubExposureTime()));
|
||||||
|
disconnect(comboSubExpTimeUnit,SIGNAL(currentIndexChanged(int)),this, SLOT(SetSubExposureTime()));
|
||||||
|
disconnect(spinSubPeriod,SIGNAL(valueChanged(double)), this, SLOT(SetSubPeriod()));
|
||||||
|
disconnect(comboSubPeriodUnit,SIGNAL(currentIndexChanged(int)),this, SLOT(SetSubPeriod()));
|
||||||
|
|
||||||
|
#ifdef VERBOSE
|
||||||
|
cout << "Getting Sub Exposure time and Sub Period" << endl;
|
||||||
|
#endif
|
||||||
|
// subexptime
|
||||||
|
qDefs::timeUnit unit;
|
||||||
|
double time = qDefs::getCorrectTime(unit,((double)(
|
||||||
|
myDet->setTimer(slsDetectorDefs::SUBFRAME_ACQUISITION_TIME,-1)*(1E-9))));
|
||||||
|
spinSubExpTime->setValue(time);
|
||||||
|
comboSubExpTimeUnit->setCurrentIndex((int)unit);
|
||||||
|
|
||||||
|
// subperiod
|
||||||
|
time = qDefs::getCorrectTime(unit,((double)(myDet->setTimer(slsDetectorDefs::SUBFRAME_PERIOD,-1)*(1E-9))));
|
||||||
|
spinSubPeriod->setValue(time);
|
||||||
|
comboSubPeriodUnit->setCurrentIndex((int)unit);
|
||||||
|
|
||||||
|
|
||||||
|
// highlight if period < exptime
|
||||||
|
CheckAcqPeriodGreaterThanExp();
|
||||||
|
|
||||||
|
connect(spinSubExpTime,SIGNAL(valueChanged(double)), this, SLOT(SetSubExposureTime()));
|
||||||
|
connect(comboSubExpTimeUnit,SIGNAL(currentIndexChanged(int)), this, SLOT(SetSubExposureTime()));
|
||||||
|
connect(spinSubPeriod,SIGNAL(valueChanged(double)), this, SLOT(SetSubPeriod()));
|
||||||
|
connect(comboSubPeriodUnit,SIGNAL(currentIndexChanged(int)),this, SLOT(SetSubPeriod()));
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "**Updated Advanced Tab" << endl << endl;
|
cout << "**Updated Advanced Tab" << endl << endl;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user