Blame view

src/ExternLib/els_calculate/els_calculate.hh 730 Bytes
fbe3c2bb   Benjamin Renard   First commit
1
/**
35de3ffa   Elena.Budnik   mexvex_els
2
 * els_calculate.hh
fbe3c2bb   Benjamin Renard   First commit
3
4
5
6
7
 *
 *  Created on: 31 oct. 2012
 *      Author: AKKA IS
 */

35de3ffa   Elena.Budnik   mexvex_els
8
9
#ifndef ELS_CALCULATE_HH_
#define ELS_CALCULATE_HH_
fbe3c2bb   Benjamin Renard   First commit
10
11
12
13

#include <vector>

/**
35de3ffa   Elena.Budnik   mexvex_els
14
15
 * @brief MEX/VEX ELS  decoding
 * @return  
fbe3c2bb   Benjamin Renard   First commit
16
17
18
19
20
21
22
23
24
25
26
27
28
 */
typedef std::vector<float> FloatVector;
typedef const FloatVector& RCFloatVector;

FloatVector els_calculate(const std::vector<short>& ELS,const double& TimeCompres, const double& EnergyCompres,const std::vector<double>& vex_els_energy,unsigned int Angle)
{
	FloatVector lElsCalculate;
	for (unsigned int iEn = 0; iEn < 128; iEn++) {// 128 Energy Steps
		lElsCalculate.push_back(((double)ELS[iEn + Angle *128])/TimeCompres/EnergyCompres/vex_els_energy[iEn]);
	}
	return lElsCalculate;
}

35de3ffa   Elena.Budnik   mexvex_els
29
30

#endif /* ELS_CALCULATE_HH_ */