fixed threshold returning 1 if a trimbit file missing for eiger, it now returns -1, as both values are different

This commit is contained in:
2018-02-23 14:49:18 +01:00
parent bacc4073f7
commit c3d6852f97
2 changed files with 7 additions and 4 deletions

View File

@ -3149,7 +3149,7 @@ int slsDetector::setModule(int reg, int imod){
int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int e_eV, int* gainval, int* offsetval, int tb){
int fnum=F_SET_MODULE;
int retval;
int retval=-1;
int ret=FAIL;
char mess[MAX_STR_LENGTH]="";
@ -3255,6 +3255,9 @@ int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int
offset[i+imod*thisDetector->nOffset]=offsetval[i];
}
if (e_eV != -1)
thisDetector->currentThresholdEV = e_eV;
}
#ifdef VERBOSE
@ -3459,7 +3462,7 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti
//currently only for eiger
if (thisDetector->myDetectorType == EIGER) {
setThresholdEnergyAndSettings(e_eV,isettings,tb);
return thisDetector->currentThresholdEV;
return thisDetector->currentThresholdEV;
}
int fnum= F_SET_THRESHOLD_ENERGY;