mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
revised gain plot; updated version api
This commit is contained in:
@ -214,6 +214,46 @@
|
||||
<string>Very Low Gain</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G1_HG</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G1_LG</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G2_HC_HG</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G2_HC_LG</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G2_LC_HG</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G2_LC_LG</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G4_HG</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G4_LG</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Undefined</string>
|
||||
|
@ -161,8 +161,6 @@ class qDrawPlot : public QWidget, private Ui::PlotObject {
|
||||
|
||||
unsigned int nPixelsX{0};
|
||||
unsigned int nPixelsY{0};
|
||||
const static int npixelsx_jctb = 400;
|
||||
int npixelsy_jctb{0};
|
||||
uint32_t pixelMask{0};
|
||||
uint32_t gainMask{0};
|
||||
int gainOffset{0};
|
||||
|
@ -41,6 +41,14 @@ private:
|
||||
FORCESWITCHG1,
|
||||
FORCESWITCHG2,
|
||||
VERLOWGAIN,
|
||||
G1_HIGHGAIN,
|
||||
G1_LOWGAIN,
|
||||
G2_HIGHCAP_HIGHGAIN,
|
||||
G2_HIGHCAP_LOWGAIN,
|
||||
G2_LOWCAP_HIGHGAIN,
|
||||
G2_LOWCAP_LOWGAIN,
|
||||
G4_HIGHGAIN,
|
||||
G4_LOWGAIN,
|
||||
UNDEFINED,
|
||||
UNINITIALIZED,
|
||||
NUMSETTINGS
|
||||
|
@ -431,8 +431,7 @@ void qDetectorMain::ExecuteUtilities(QAction *action) {
|
||||
|
||||
void qDetectorMain::ExecuteHelp(QAction *action) {
|
||||
if (action == actionAbout) {
|
||||
FILE_LOG(logINFO) << "About Common GUI for Eiger, Gotthard, Jungfrau "
|
||||
"and Moench detectors";
|
||||
FILE_LOG(logINFO) << "About Common GUI for Jungfrau, Eiger, Mythen3, Gotthard, Gotthard2 and Moench detectors";
|
||||
|
||||
std::string guiVersion = std::to_string(APIGUI);
|
||||
std::string clientVersion = "unknown";
|
||||
@ -449,7 +448,7 @@ void qDetectorMain::ExecuteHelp(QAction *action) {
|
||||
clientVersion +
|
||||
"<br><br>"
|
||||
"Common GUI to control the SLS Detectors: "
|
||||
"Eiger, Jungfrau, Mythen3, Gotthard, Gotthard2 and Moench.<br><br>"
|
||||
"Jungfrau, Eiger, Mythen3, Gotthard, Gotthard2 and Moench.<br><br>"
|
||||
"It can be operated in parallel with the command "
|
||||
"line interface:<br>"
|
||||
"sls_detector_put,<br>sls_detector_get,<br>sls_"
|
||||
|
@ -60,7 +60,6 @@ void qDrawPlot::SetupWidgetWindow() {
|
||||
detType = det->getDetectorType().squash();
|
||||
switch (detType) {
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
pixelMask = ((1 << 14) - 1);
|
||||
gainMask = (3 << 14);
|
||||
gainOffset = 14;
|
||||
@ -111,13 +110,6 @@ void qDrawPlot::SetupPlots() {
|
||||
nPixelsX = res.x;
|
||||
nPixelsY = res.y;
|
||||
switch(detType) {
|
||||
case slsDetectorDefs::MOENCH:
|
||||
try{
|
||||
npixelsy_jctb = (det->getNumberOfAnalogSamples().tsquash("Inconsistent values for number of analog samples") * 2)/25;// for moench 03
|
||||
nPixelsX = npixelsx_jctb;
|
||||
nPixelsY = npixelsy_jctb;
|
||||
} CATCH_DISPLAY ("Could not get number of analog samples.", "qDrawPlot::SetupPlots")
|
||||
break;
|
||||
case slsDetectorDefs::EIGER:
|
||||
try{
|
||||
if (det->getQuad().tsquash("Inconsistent values for quad type")) {
|
||||
@ -1015,7 +1007,6 @@ void qDrawPlot::toDoublePixelData(double *dest, char *source, int size, int data
|
||||
|
||||
case 16:
|
||||
if (detType == slsDetectorDefs::JUNGFRAU ||
|
||||
detType == slsDetectorDefs::MOENCH ||
|
||||
detType == slsDetectorDefs::GOTTHARD2) {
|
||||
|
||||
// show gain plot
|
||||
|
@ -82,14 +82,14 @@ void qTabDeveloper::SetupWidgetWindow() {
|
||||
case slsDetectorDefs::MOENCH:
|
||||
lblSpinHV->show();
|
||||
spinHV->show();
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "v Dac 0: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "v Dac 1: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "v Dac 2: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "v Dac 3: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "v Dac 4: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "v Dac 5: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "v Dac 6: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "i Dac 7: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "vbp_colbuf: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "vipre: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "vin_cm: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "vb_sda: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "vcasc_sfp: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "vout_cm: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "vipre_cds: ", getSLSIndex(detType, tempid++)));
|
||||
dacWidgets.push_back(new qDacWidget(this, det, true, "ibias_sfp: ", getSLSIndex(detType, tempid++)));
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::MYTHEN3:
|
||||
@ -343,10 +343,27 @@ slsDetectorDefs::dacIndex qTabDeveloper::getSLSIndex(slsDetectorDefs::detectorTy
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::MOENCH:
|
||||
if (index >= 0 && index < (int)dacWidgets.size()) {
|
||||
return (slsDetectorDefs::dacIndex)index;
|
||||
}
|
||||
throw sls::RuntimeError(std::string("Unknown dac/adc index") + std::to_string(index));
|
||||
switch (index) {
|
||||
case 0:
|
||||
return slsDetectorDefs::VBP_COLBUF;
|
||||
case 1:
|
||||
return slsDetectorDefs::VIPRE;
|
||||
case 2:
|
||||
return slsDetectorDefs::VIN_CM;
|
||||
case 3:
|
||||
return slsDetectorDefs::VB_SDA;
|
||||
case 4:
|
||||
return slsDetectorDefs::VCASC_SFP;
|
||||
case 5:
|
||||
return slsDetectorDefs::VOUT_CM;
|
||||
case 6:
|
||||
return slsDetectorDefs::VIPRE_CDS;
|
||||
case 7:
|
||||
return slsDetectorDefs::IBIAS_SFP;
|
||||
default:
|
||||
throw sls::RuntimeError(std::string("Unknown dac/adc index") + std::to_string(index));
|
||||
}
|
||||
break;
|
||||
|
||||
case slsDetectorDefs::MYTHEN3:
|
||||
switch (index) {
|
||||
|
@ -72,7 +72,6 @@ void qTabPlot::SetupWidgetWindow() {
|
||||
chkGapPixels->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
chkGainPlot->setEnabled(true);
|
||||
chkGainPlot->setChecked(true);
|
||||
plot->EnableGainPlot(true);
|
||||
@ -585,7 +584,6 @@ void qTabPlot::Refresh() {
|
||||
GetGapPixels();
|
||||
break;
|
||||
case slsDetectorDefs::JUNGFRAU:
|
||||
case slsDetectorDefs::MOENCH:
|
||||
chkGainPlot->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
|
@ -20,7 +20,6 @@ void qTabSettings::SetupWidgetWindow() {
|
||||
|
||||
// enabling according to det type
|
||||
switch(det->getDetectorType().squash()) {
|
||||
case slsDetectorDefs::MOENCH:
|
||||
case slsDetectorDefs::MYTHEN3:
|
||||
lblSettings->setEnabled(false);
|
||||
comboSettings->setEnabled(false);
|
||||
@ -83,11 +82,21 @@ void qTabSettings::SetupDetectorSettings() {
|
||||
item[(int)FORCESWITCHG1]->setEnabled(true);
|
||||
item[(int)FORCESWITCHG2]->setEnabled(true);
|
||||
break;
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
item[(int)DYNAMICGAIN]->setEnabled(true);
|
||||
item[(int)FIXGAIN1]->setEnabled(true);
|
||||
item[(int)FIXGAIN2]->setEnabled(true);
|
||||
break;
|
||||
break;
|
||||
case slsDetectorDefs::MOENCH:
|
||||
item[(int)G1_HIGHGAIN]->setEnabled(true);
|
||||
item[(int)G1_LOWGAIN]->setEnabled(true);
|
||||
item[(int)G2_HIGHCAP_HIGHGAIN]->setEnabled(true);
|
||||
item[(int)G2_HIGHCAP_LOWGAIN]->setEnabled(true);
|
||||
item[(int)G2_LOWCAP_HIGHGAIN]->setEnabled(true);
|
||||
item[(int)G2_LOWCAP_LOWGAIN]->setEnabled(true);
|
||||
item[(int)G4_HIGHGAIN]->setEnabled(true);
|
||||
item[(int)G4_LOWGAIN]->setEnabled(true);
|
||||
break;
|
||||
default:
|
||||
FILE_LOG(logDEBUG) << "Unknown detector type. Exiting GUI.";
|
||||
qDefs::Message(qDefs::CRITICAL,
|
||||
|
Reference in New Issue
Block a user