Files
2026-11-06 14:45:09 +08:00

49 lines
1.3 KiB
C++

#ifndef SPECTRUMALGORITHM_H
#define SPECTRUMALGORITHM_H
#include <vector>
#include "algorithmanalysis.h"
#include "elementanalysis.h"
using namespace std;
class SpectrumAlgorithm
{
public:
SpectrumAlgorithm();
/**
处理原始数据,包括平均,排序,去背景,裁剪
* @brief handleRawSpectrumList
* @param rawSpecturmList:多个map,键为光谱仪设备号,值为波长、强度的结构体
* @return
*/
vector<pair<double,double>> handleRawSpectrumList(
std::vector<map<int,vector<pair<double,double>>>> rawSpectrumList);
/**
jisuan
* @brief getElementQuantitytList
* @param rawSpectrumList
* @return
*/
std::vector<std::tuple<std::string, double, double>> getElementQuantitytList(std::vector<map<int,vector<pair<double,double>>>> rawSpectrumList);
private:
/**
处理原始数据,包括平均,排序
* @brief handleRawSpectrumList
* @param rawSpecturmList:多个map,键为光谱仪设备号,值为波长、强度的结构体
* @return
*/
vector<pair<int,vector<SpectrumChannelData>>> baseHandle(std::vector<map<int,vector<pair<double,double>>>> rawSpectrumList);
// 波长修正
void fixedWavelength(vector<pair<int,vector<SpectrumChannelData>>> &ospecV);
};
#endif // SPECTRUMALGORITHM_H