diff --git a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/SelfBaseUtil.java b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/SelfBaseUtil.java index 88d24018..b6e122ae 100644 --- a/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/SelfBaseUtil.java +++ b/jeecg-module-beta-gamma-analyser/src/main/java/org/jeecg/common/util/SelfBaseUtil.java @@ -776,7 +776,7 @@ public class SelfBaseUtil extends AbstractLogOrReport { String mapKey = ""; // 遍历roiLimit for (int g = 0; g < gStart.size(); g++) { - List vPeak = phdFiles[g].getVPeak();; + List vPeak = phdFiles[g].getVPeak(); HashMap nuclideParam = Maps.newHashMap(); String nuclideName = ""; switch (g) { @@ -820,7 +820,43 @@ public class SelfBaseUtil extends AbstractLogOrReport { } // 没有峰信息 核素=未识别 不计算活度浓度 if (!nuclideParam.containsKey("area")) { - nuclideParam.put("area", "0"); + double left = 0, right = 0; + List counts = null; + // 固定能量范围,半高宽 + switch (nuclideName) { + case "Xe131M": + left = 29.7 - (0.737 * 1.25); + right = 29.7 + (0.737 * 1.25); + counts = phdFiles[0].getSpec().getCounts(); + break; + case "Xe133M": + left = 29.7 - (0.737 * 1.25); + right = 29.7 + (0.737 * 1.25); + counts = phdFiles[1].getSpec().getCounts(); + break; + case "Xe133": + left = 81 - (0.781 * 1.25); + right = 81 + (0.781 * 1.25); + counts = phdFiles[2].getSpec().getCounts(); + break; + case "Xe135": + left = 249.8 - (0.916 * 1.25); + right = 249.8 + (0.916 * 1.25); + counts = phdFiles[3].getSpec().getCounts(); + break; + } + // 能量转化为道址 + // 通过道址将这个范围的计数求和 + List gFittingPara = EnergySpectrumHandler.GetFileFittingPara(phdFiles[0].getUsedEnerKD().getG_energy(), + phdFiles[0].getUsedEnerKD().getCentroid_channel()); + double lc = gFittingPara.get(0) + gFittingPara.get(1) * left + gFittingPara.get(2) * Math.sqrt(left); + double rc = gFittingPara.get(0) + gFittingPara.get(1) * right + gFittingPara.get(2) * Math.sqrt(right); + // 面积=计数总和:通过能量卡一个范围,将范围内的计数加和 + int area = 0; + for (int i = (int)lc; i <= (int) rc; i++) { + area += counts.get(i); + } + nuclideParam.put("area", area+""); } param.put(mapKey, nuclideParam); }