els_calculate.hh 730 Bytes
/**
 * els_calculate.hh
 *
 *  Created on: 31 oct. 2012
 *      Author: AKKA IS
 */

#ifndef ELS_CALCULATE_HH_
#define ELS_CALCULATE_HH_

#include <vector>

/**
 * @brief MEX/VEX ELS  decoding
 * @return  
 */
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;
}


#endif /* ELS_CALCULATE_HH_ */