feat:viewBeta calibration补充gamma energy 转化 channel公式

This commit is contained in:
xiaoguangbin 2024-07-30 10:44:29 +08:00
parent 7c5ffb4cf2
commit c6ea38f2d3

View File

@ -1844,6 +1844,8 @@ public class SelfStationServiceImpl implements ISelfStationService {
// E_β=661.6-E_γE_γ=F(C) // E_β=661.6-E_γE_γ=F(C)
//中心C_β=F(E_β)范围[C_β-3(C_β ), C_β+3(C_β )] //中心C_β=F(E_β)范围[C_β-3(C_β ), C_β+3(C_β )]
// 高斯函数拟合得到拟合的中心道址显示Energy vs. Channel // 高斯函数拟合得到拟合的中心道址显示Energy vs. Channel
// 得到gamma谱 e2c公式
List<Double> gFittingPara = EnergySpectrumHandler.GetFileFittingPara(gEnergy, gCentroidChannel);
//页面展示的表单数据数组 //页面展示的表单数据数组
List<TableWidget> table = new LinkedList<>(); List<TableWidget> table = new LinkedList<>();
List<List<Double>> gammaEnergy = (List<List<Double>>) map.get("gammaEnergy"); List<List<Double>> gammaEnergy = (List<List<Double>>) map.get("gammaEnergy");
@ -1854,8 +1856,8 @@ public class SelfStationServiceImpl implements ISelfStationService {
Double bc = fittingParaToUi.get(0) + fittingParaToUi.get(1) * be + fittingParaToUi.get(2) * Math.sqrt(be); Double bc = fittingParaToUi.get(0) + fittingParaToUi.get(1) * be + fittingParaToUi.get(2) * Math.sqrt(be);
// 计算得到gamma energy // 计算得到gamma energy
Double ge = 661.656 - be; Double ge = 661.656 - be;
// todo 需要换成gamma公式 // gamma energy 转化 channel
Double gc = 1.51421142654972 + 3.018099280336795 * ge + 2.6690095368611742E-6 * Math.sqrt(ge); Double gc = gFittingPara.get(0) + gFittingPara.get(1) * ge + gFittingPara.get(2) * Math.sqrt(ge);
// 通过gamma channel获取gammaGate数据 // 通过gamma channel获取gammaGate数据
List<SeriseData> seriseDatas = getGateGamma(5, 4096, gc.intValue(), betaDataFile); List<SeriseData> seriseDatas = getGateGamma(5, 4096, gc.intValue(), betaDataFile);
// 开始计算中心道址 范围[C_β-3(C_β ), C_β+3(C_β )] // 开始计算中心道址 范围[C_β-3(C_β ), C_β+3(C_β )]
@ -1872,7 +1874,7 @@ public class SelfStationServiceImpl implements ISelfStationService {
// GaussianCurveFitter fitter = GaussianCurveFitter.create(); // GaussianCurveFitter fitter = GaussianCurveFitter.create();
// fitter.fit(points.toList()); // fitter.fit(points.toList());
// todo 高斯拟合有问题暂时使用平均值 // todo 高斯拟合有问题暂时使用平均值
double v = sum / (right - left); Double v = sum / (right - left);
//表单数据信息 //表单数据信息
TableWidget tableWidget = new TableWidget(); TableWidget tableWidget = new TableWidget();
tableWidget.setRowCount(i+1); tableWidget.setRowCount(i+1);