Merge branch '2.3-rc' into hdf5

This commit is contained in:
Dhanya Maliakal
2017-03-03 09:05:40 +01:00
4 changed files with 5 additions and 4 deletions

View File

@ -6983,7 +6983,7 @@ int slsDetector::loadSettingsFile(string fname, int imod) {
myMod->module=im; myMod->module=im;
//settings is saved in myMod.reg for all except mythen //settings is saved in myMod.reg for all except mythen
if(thisDetector->myDetectorType!=MYTHEN) if(thisDetector->myDetectorType!=MYTHEN)
myMod->reg=thisDetector->currentSettings; myMod->reg=-1;
setModule(*myMod,iodelay,tau,-1,0,0); setModule(*myMod,iodelay,tau,-1,0,0);
deleteModule(myMod); deleteModule(myMod);
} else } else
@ -7107,7 +7107,7 @@ int slsDetector::loadCalibrationFile(string fname, int imod) {
if((myMod=getModule(im))){ if((myMod=getModule(im))){
//extra gain and offset //extra gain and offset
if(thisDetector->nGain){ if(thisDetector->nGain){
if(readCalibrationFile(fn,gainval, offsetval)==FAIL) if(readCalibrationFile(fn, gainval, offsetval)==FAIL)
return FAIL; return FAIL;
} //normal gain and offset inside sls_detector_module } //normal gain and offset inside sls_detector_module
else{ else{

View File

@ -10,7 +10,7 @@
//#include "sls_receiver_defs.h" //#include "sls_receiver_defs.h"
#include "sls_detector_defs.h" #include "sls_detector_defs.h"
//#endif //#endif
#include <cmath>
#include <string> #include <string>
using namespace std; using namespace std;
@ -75,7 +75,7 @@ class energyConversion
V linearInterpolation(const E x, const E x1, const E x2, const V y1, const V y2){ V linearInterpolation(const E x, const E x1, const E x2, const V y1, const V y2){
double k = static_cast<double>(y2-y1)/(x2-x1); double k = static_cast<double>(y2-y1)/(x2-x1);
double m = y1-k*x1; double m = y1-k*x1;
int y = round( k*x+m ); int y = std::round( k*x+m );
return static_cast<V>(y); return static_cast<V>(y);
} }

View File

@ -1949,6 +1949,7 @@ int set_module(int file_des) {
#endif #endif
#ifdef EIGERD #ifdef EIGERD
switch(myModule.reg){ switch(myModule.reg){
case GET_SETTINGS:
case STANDARD: case STANDARD:
case HIGHGAIN: case HIGHGAIN:
case LOWGAIN: case LOWGAIN: