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 ff1cc027..14eaa6f9 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 @@ -1356,13 +1356,14 @@ public class GammaServiceImpl implements IGammaService { if (line.contains("#g_Energy") || line.contains("#Energy")) { for (int j=i+1; j values = Arrays.asList(content.split("\t\t")); + if (Double.valueOf(values.get(1))>0) { + m_vCurEnergy.add(Double.valueOf(values.get(0))); + m_vCurCentroid.add(Double.valueOf(values.get(1))); + m_vCurUncert.add(Double.valueOf(values.get(2))); + } } - List values = Arrays.asList(content.split("\t\t")); - m_vCurEnergy.add(Double.valueOf(values.get(0))); - m_vCurCentroid.add(Double.valueOf(values.get(1))); - m_vCurUncert.add(Double.valueOf(values.get(2))); } } } @@ -1589,13 +1590,14 @@ public class GammaServiceImpl implements IGammaService { if (line.contains("#g_Resolution") || line.contains("#Resolution")) { for (int j=i+1; j values = Arrays.asList(content.split("\t\t")); + if (Double.valueOf(values.get(0))>0) { + m_vCurEnergy.add(Double.valueOf(values.get(0))); + m_vCurReso.add(Double.valueOf(values.get(1))); + m_vCurUncert.add(Double.valueOf(values.get(2))); + } } - List values = Arrays.asList(content.split("\t\t")); - m_vCurEnergy.add(Double.valueOf(values.get(0))); - m_vCurReso.add(Double.valueOf(values.get(1))); - m_vCurUncert.add(Double.valueOf(values.get(2))); } } } @@ -1835,14 +1837,16 @@ public class GammaServiceImpl implements IGammaService { String content = readLines.get(j); if (!content.contains("#") && !content.contains("FitType")) { List values = Arrays.asList(content.split("\t\t")); - m_vCurEnergy.add(Double.valueOf(values.get(0))); - m_vCurEffi.add(Double.valueOf(values.get(1))); - m_vCurUncert.add(Double.valueOf(values.get(2))); + if (Double.valueOf(values.get(0))>0) { + m_vCurEnergy.add(Double.valueOf(values.get(0))); + m_vCurEffi.add(Double.valueOf(values.get(1))); + m_vCurUncert.add(Double.valueOf(values.get(2))); + } } if (content.contains("FitType")) { List values = Arrays.asList(content.split("=")); if (values.size() == 2) { - m_nFunId = Double.valueOf(values.get(1)); + m_nFunId = Double.valueOf(values.get(1).trim()); } } }