GammaFileUtil中计算活度浓度方法提前插入实体类对象导致下标越界问题修改
gamma功能删除峰值重新计算活度浓度位置移动
This commit is contained in:
parent
af7825d761
commit
3db390ec22
|
@ -1568,7 +1568,7 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
double sum_found = 0; // 所有匹配的γ射线能量处效率乘以分支比的和
|
double sum_found = 0; // 所有匹配的γ射线能量处效率乘以分支比的和
|
||||||
int mainPeakIdx = -1; // 记录核素主γ峰的索引下标
|
int mainPeakIdx = -1; // 记录核素主γ峰的索引下标
|
||||||
for (int i=0, j=0; i<vEnergy.size(); i++) {
|
for (int i=0, j=0; i<vEnergy.size(); i++) {
|
||||||
for(; j<peakNum; ++j) {
|
for(; j<peakNum; j++) {
|
||||||
if(phd.getVPeak().get(j).energy >= 510 && phd.getVPeak().get(j).energy <= 512) {
|
if(phd.getVPeak().get(j).energy >= 510 && phd.getVPeak().get(j).energy <= 512) {
|
||||||
continue; // 峰中心道能量为511的峰不进行核素识别
|
continue; // 峰中心道能量为511的峰不进行核素识别
|
||||||
}
|
}
|
||||||
|
@ -1606,11 +1606,8 @@ public class GammaFileUtil extends AbstractLogOrReport {
|
||||||
}
|
}
|
||||||
if(mainPeakIdx < 0) continue;
|
if(mainPeakIdx < 0) continue;
|
||||||
}
|
}
|
||||||
if (Objects.isNull(phd.getMapNucActMda().get(iter.getKey()))) {
|
|
||||||
Map<String, NuclideActMda> mapNucActMda = phd.getMapNucActMda();
|
NuclideActMda ActMda = new NuclideActMda();
|
||||||
mapNucActMda.put(iter.getKey(), new NuclideActMda());
|
|
||||||
}
|
|
||||||
NuclideActMda ActMda = phd.getMapNucActMda().get(iter.getKey());
|
|
||||||
boolean bActBigger = CalculateMDCs(phd, ActMda, mainPeakIdx, lambda, maxFoundYield, 1.0);
|
boolean bActBigger = CalculateMDCs(phd, ActMda, mainPeakIdx, lambda, maxFoundYield, 1.0);
|
||||||
|
|
||||||
if(rate > 0.8 || bActBigger) {
|
if(rate > 0.8 || bActBigger) {
|
||||||
|
|
|
@ -196,14 +196,7 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
||||||
result.error500("Please select the parse file first!");
|
result.error500("Please select the parse file first!");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
// 查询当前用户关联的核素信息
|
Map<String, NuclideLines> nuclideLinesMap = (Map<String, NuclideLines>) redisUtil.get(fileName+"-"+userName);//GetNuclideLines(nuclides);
|
||||||
List<String> nuclides = new LinkedList<>();
|
|
||||||
// 从postgreSql中获取当前用户关注的核素信息 如果当前用户没有 则返回管理员的
|
|
||||||
nuclides = defaultNuclideSpectrumService.findNuclidesByUserName(userName, systemType);
|
|
||||||
if (CollectionUtils.isEmpty(nuclides)) {
|
|
||||||
nuclides = defaultNuclideSpectrumService.findNuclidesByUserName("admin", systemType);
|
|
||||||
}
|
|
||||||
Map<String, NuclideLines> nuclideLinesMap = GetNuclideLines(nuclides);
|
|
||||||
// 解析获取临时文件信息
|
// 解析获取临时文件信息
|
||||||
File tmpFile = gammaFileUtil.analyzeFile(ftpUtil.getFtpRootPath() + spectrumPathProperties.getUploadPath() + StringPool.SLASH + userName, fileName);
|
File tmpFile = gammaFileUtil.analyzeFile(ftpUtil.getFtpRootPath() + spectrumPathProperties.getUploadPath() + StringPool.SLASH + userName, fileName);
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
@ -377,16 +370,16 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
||||||
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
ParameterInfo value = JSON.parseObject(JSON.toJSONString(entry.getValue()), ParameterInfo.class);
|
||||||
phd.setUsedTotEPara(value);
|
phd.setUsedTotEPara(value);
|
||||||
}
|
}
|
||||||
if (entry.getKey().equalsIgnoreCase("mapNucActMda")) {
|
// if (entry.getKey().equalsIgnoreCase("mapNucActMda")) {
|
||||||
HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
// HashMap<String, Object> jsonMap = JSON.parseObject(JSON.toJSONString(entry.getValue()), HashMap.class);
|
||||||
Map<String, NuclideActMda> value = new HashMap<>();
|
// Map<String, NuclideActMda> value = new HashMap<>();
|
||||||
for (Map.Entry<String, Object> objectEntry : jsonMap.entrySet()) {
|
// for (Map.Entry<String, Object> objectEntry : jsonMap.entrySet()) {
|
||||||
String key = objectEntry.getKey();
|
// String key = objectEntry.getKey();
|
||||||
NuclideActMda entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), NuclideActMda.class);
|
// NuclideActMda entryValue = JSON.parseObject(JSON.toJSONString(objectEntry.getValue()), NuclideActMda.class);
|
||||||
value.put(key, entryValue);
|
// value.put(key, entryValue);
|
||||||
}
|
// }
|
||||||
phd.setMapNucActMda(value);
|
// phd.setMapNucActMda(value);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
BeanUtils.copyProperties(phd.getSetting(), phd.getUsedSetting());
|
BeanUtils.copyProperties(phd.getSetting(), phd.getUsedSetting());
|
||||||
|
|
||||||
|
@ -398,6 +391,8 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
||||||
peak.recoilDeltaChan = "1";
|
peak.recoilDeltaChan = "1";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 重新分析各峰值对应的核素信息
|
||||||
|
gammaFileUtil.NuclidesIdent(phd, nuclideLinesMap);
|
||||||
gammaFileUtil.RunQC(phd);
|
gammaFileUtil.RunQC(phd);
|
||||||
result.setResult(phd);
|
result.setResult(phd);
|
||||||
} catch (JsonProcessingException e) {
|
} catch (JsonProcessingException e) {
|
||||||
|
@ -1479,11 +1474,11 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
|
||||||
nuclideMap.remove(nuclideName);
|
nuclideMap.remove(nuclideName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//重新计算核素活度浓度
|
|
||||||
gammaFileUtil.NuclidesIdent(phd, nuclideMap);
|
|
||||||
}
|
}
|
||||||
//将当前行从峰数组中移除
|
//将当前行从峰数组中移除
|
||||||
phd.getVPeak().remove(curRow);
|
phd.getVPeak().remove(curRow);
|
||||||
|
//重新计算核素活度浓度
|
||||||
|
gammaFileUtil.NuclidesIdent(phd, nuclideMap);
|
||||||
//重新分析数据
|
//重新分析数据
|
||||||
gammaFileUtil.PeaksChanged(phd);
|
gammaFileUtil.PeaksChanged(phd);
|
||||||
for (int i = 0; i < phd.getVPeak().size(); i++) {
|
for (int i = 0; i < phd.getVPeak().size(); i++) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user