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

@ -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;