From cece7bb5e633a11187e48a1a32ef0a8b8fae4652 Mon Sep 17 00:00:00 2001 From: qiaoqinzheng Date: Fri, 1 Dec 2023 11:35:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=B7=A5=E4=BA=A4=E4=BA=92=E5=88=86?= =?UTF-8?q?=E6=9E=90gamma=E6=A8=A1=E5=9D=97=E5=88=86=E6=9E=90=E5=B3=B0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=97=B6=EF=BC=8C=E9=A1=B5=E9=9D=A2=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=AD=97=E6=AE=B5=E7=9B=B4=E6=8E=A5=E8=B5=8B=E5=80=BC?= =?UTF-8?q?=E5=88=B0=E5=AF=B9=E5=BA=94=E5=B3=B0=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg/modules/service/impl/GammaServiceImpl.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java index 26ec68ab..8c0937db 100644 --- a/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java +++ b/jeecg-module-spectrum-analysis/src/main/java/org/jeecg/modules/service/impl/GammaServiceImpl.java @@ -1461,16 +1461,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi for (int j = 0; j < tablePeaksList.size(); j++) { TablePeaks nPeak = tablePeaksList.get(j); PeakInfo peak = phd.getVPeak().get(Integer.valueOf(nPeak.getLab()) - 1); - if (!NumberFormatUtil.numberFormat(String.valueOf(peak.energy)).equals(nPeak.getEnergy()) ) { - peak.energy = Double.parseDouble(nPeak.getEnergy()); - } - if (!NumberFormatUtil.numberFormat(String.valueOf(peak.area)).equals(nPeak.getNetArea())) { - peak.area = Double.parseDouble(nPeak.getNetArea()); - } - if (!NumberFormatUtil.numberFormat(String.valueOf(peak.fwhm)).equals(nPeak.getFwhm())) { - peak.fwhm = Double.parseDouble(nPeak.getFwhm()); - } double dE = CalValuesHandler.calDerivaOut(peak.peakCentroid, phd.getUsedEnerPara().getP()); + peak.energy = Double.parseDouble(nPeak.getEnergy()); if (peak.energy < vE_Rg.get(0) || peak.energy > vE_Rg.get(1)) { result.error500("The energy isn't in the analysis range."); @@ -1479,6 +1471,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi List energys = new LinkedList<>(); energys.add(peak.energy); peak.peakCentroid = CalValuesHandler.energyToChannel(energys, phd.getUsedEnerPara().getP()).counts.get(0); + peak.area = Double.parseDouble(nPeak.getNetArea()); + peak.fwhm = Double.parseDouble(nPeak.getFwhm()); peak.stepRatio = Double.valueOf(nPeak.getStep()) / peak.area; peak.BWWidthChan = Double.valueOf(nPeak.getBwGamma()) / dE; if (dE > 0) {