mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 23:10:02 +02:00
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:
parent
bacc4073f7
commit
c3d6852f97
@ -1180,7 +1180,7 @@ int multiSlsDetector::getThresholdEnergy(int pos) {
|
||||
if (ret1==-100)
|
||||
ret1=ret;
|
||||
else if (ret<(ret1-200) || ret>(ret1+200))
|
||||
ret1=FAIL;
|
||||
ret1=-1;
|
||||
|
||||
}
|
||||
|
||||
@ -1225,7 +1225,7 @@ int multiSlsDetector::setThresholdEnergy(int e_eV, int pos, detectorSettings ise
|
||||
if(iret[idet] != NULL){
|
||||
if (ret==-100)
|
||||
ret=*iret[idet];
|
||||
else if (ret<(*iret[idet]-200) || ret>(*iret[idet]+200))
|
||||
else if (*iret[idet]<(ret-200) || *iret[idet]>(ret+200))
|
||||
ret=-1;
|
||||
delete iret[idet];
|
||||
}else ret=-1;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user