Merge remote-tracking branch 'origin/station' into station

This commit is contained in:
nieziyan 2023-11-08 15:24:25 +08:00
commit f6d3191637
5 changed files with 412 additions and 70 deletions

View File

@ -2665,9 +2665,9 @@ public class GammaFileUtil extends AbstractLogOrReport {
strBuffer.append(rowFormat(nuclideTitle, nuclideData));
strBuffer.append(System.lineSeparator());
for (int i=0; i<middleData.nucl_ided_Nuclidename.size(); i++) {
rowFormat(nuclideTitle, StringPool.SPACE + middleData.nucl_ided_Nuclidename.get(i), middleData.nucl_ided_Halflife.get(i), String.format("%.3f", Double.valueOf(middleData.nucl_ided_activ_key.get(i))),
strBuffer.append(rowFormat(nuclideTitle, StringPool.SPACE + middleData.nucl_ided_Nuclidename.get(i), middleData.nucl_ided_Halflife.get(i), String.format("%.3f", Double.valueOf(middleData.nucl_ided_activ_key.get(i))),
String.format("%.3f", Double.valueOf(middleData.nucl_ided_activ_key_err.get(i))/Double.valueOf(middleData.nucl_ided_activ_key.get(i))*100), middleData.nucl_ided_mda.get(i),
middleData.nucl_ided_Concentration.get(i), middleData.nucl_ided_MDC.get(i));
middleData.nucl_ided_Concentration.get(i), middleData.nucl_ided_MDC.get(i)));
//换行
strBuffer.append(System.lineSeparator());
}
@ -3584,15 +3584,15 @@ public class GammaFileUtil extends AbstractLogOrReport {
middleData.sample_acquisiton_start = fileAnlyse.getAcq().getAcquisition_start_date()+StringPool.SPACE+fileAnlyse.getAcq().getAcquisition_start_time();
String acquisition_start = middleData.sample_acquisiton_start;
Date dataTime = DateUtils.parseDate(acquisition_start);
middleData.sample_acquistion_stop = DateUtils.formatDate(new Date((long) (dataTime.getTime()/1000 + fileAnlyse.getAcq().getAcquisition_live_time())) , "yyyy/MM/dd HH:mm:ss");
middleData.sample_acquistion_stop = DateUtils.formatDate(new Date((long) (dataTime.getTime() + fileAnlyse.getAcq().getAcquisition_live_time())), "yyyy/MM/dd HH:mm:ss");
middleData.sample_acquistion_time = String.format("%.2f", fileAnlyse.getAcq().getAcquisition_real_time()) ;
middleData.sample_stationID = fileAnlyse.getHeader().getSite_code();
middleData.sample_detectID = fileAnlyse.getHeader().getDetector_code();
middleData.sample_Geometry = fileAnlyse.getHeader().getSample_geometry();
middleData.sample_Type = fileAnlyse.getHeader().getSystem_type();
middleData.setting_specSetup = fileAnlyse.getUsedSetting();
middleData.Collection_Station_Comments = fileAnlyse.getOriTotalCmt();
middleData.NDC_Analysis_General_Comments = fileAnlyse.getTotalCmt();
middleData.Collection_Station_Comments = StringUtils.isNotBlank(fileAnlyse.getOriTotalCmt())?fileAnlyse.getOriTotalCmt():"";
middleData.NDC_Analysis_General_Comments = StringUtils.isNotBlank(fileAnlyse.getTotalCmt())?fileAnlyse.getTotalCmt():"";
return bRet;
}

View File

@ -899,6 +899,80 @@ public class PHDFileUtil extends AbstractLogOrReport {
gammaCalibrationSpectrumList.add(gammaCalibrationD);
}
betaDataFile.setGammaCalibrationSpectrumList(gammaCalibrationSpectrumList);
//处理GammaCalibration的数据
List<GardsCalibrationSpectrum> gammaCalibrationSpectrumEList = new LinkedList<>();
List<String> gammaFittingParaToUi = betaDataFile.getGammaFittingParaToUi();
if (betaDataFile.isBGammaEnergyValidSample()) {
GardsCalibrationSpectrum gammaCalibrationS = new GardsCalibrationSpectrum();
gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
gammaCalibrationS.setCoeff1(Double.valueOf(gammaFittingParaToUi.get(0)));
gammaCalibrationS.setCoeff2(Double.valueOf(gammaFittingParaToUi.get(1)));
gammaCalibrationS.setCoeff3(Double.valueOf(gammaFittingParaToUi.get(2)));
gammaCalibrationSpectrumEList.add(gammaCalibrationS);
} else {
GardsCalibrationSpectrum gammaCalibrationS = new GardsCalibrationSpectrum();
if (bgAnalyseResult.s_g_fitting_e_c.size() < 0) {
gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
gammaCalibrationS.setCoeff1(Double.valueOf(gammaFittingParaToUi.get(0)));
gammaCalibrationS.setCoeff2(Double.valueOf(gammaFittingParaToUi.get(1)));
gammaCalibrationS.setCoeff3(Double.valueOf(gammaFittingParaToUi.get(2)));
} else {
gammaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
gammaCalibrationS.setCoeff1(bgAnalyseResult.s_g_fitting_e_c.get(0));
gammaCalibrationS.setCoeff2(bgAnalyseResult.s_g_fitting_e_c.get(1));
gammaCalibrationS.setCoeff3(bgAnalyseResult.s_g_fitting_e_c.get(2));
}
gammaCalibrationSpectrumEList.add(gammaCalibrationS);
}
if (betaDataFile.isBGammaEnergyValidGas()) {
GardsCalibrationSpectrum gammaCalibrationG = new GardsCalibrationSpectrum();
gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType());
gammaCalibrationG.setCoeff1(Double.valueOf(gammaFittingParaToUi.get(0)));
gammaCalibrationG.setCoeff2(Double.valueOf(gammaFittingParaToUi.get(1)));
gammaCalibrationG.setCoeff3(Double.valueOf(gammaFittingParaToUi.get(2)));
gammaCalibrationSpectrumEList.add(gammaCalibrationG);
} else {
GardsCalibrationSpectrum gammaCalibrationG = new GardsCalibrationSpectrum();
if (bgAnalyseResult.g_g_fitting_e_c.size() < 0) {
gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType());
gammaCalibrationG.setCoeff1(Double.valueOf(gammaFittingParaToUi.get(0)));
gammaCalibrationG.setCoeff2(Double.valueOf(gammaFittingParaToUi.get(1)));
gammaCalibrationG.setCoeff3(Double.valueOf(gammaFittingParaToUi.get(2)));
} else {
gammaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType());
gammaCalibrationG.setCoeff1(bgAnalyseResult.g_g_fitting_e_c.get(0));
gammaCalibrationG.setCoeff2(bgAnalyseResult.g_g_fitting_e_c.get(1));
gammaCalibrationG.setCoeff3(bgAnalyseResult.g_g_fitting_e_c.get(2));
}
gammaCalibrationSpectrumEList.add(gammaCalibrationG);
}
if (betaDataFile.isBGammaEnergyValidDet()) {
GardsCalibrationSpectrum gammaCalibrationD = new GardsCalibrationSpectrum();
gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType());
gammaCalibrationD.setCoeff1(Double.valueOf(gammaFittingParaToUi.get(0)));
gammaCalibrationD.setCoeff2(Double.valueOf(gammaFittingParaToUi.get(1)));
gammaCalibrationD.setCoeff3(Double.valueOf(gammaFittingParaToUi.get(2)));
gammaCalibrationSpectrumEList.add(gammaCalibrationD);
} else {
GardsCalibrationSpectrum gammaCalibrationD = new GardsCalibrationSpectrum();
if (bgAnalyseResult.d_g_fitting_e_c.size() < 0) {
gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType());
gammaCalibrationD.setCoeff1(Double.valueOf(gammaFittingParaToUi.get(0)));
gammaCalibrationD.setCoeff2(Double.valueOf(gammaFittingParaToUi.get(1)));
gammaCalibrationD.setCoeff3(Double.valueOf(gammaFittingParaToUi.get(2)));
} else {
gammaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType());
gammaCalibrationD.setCoeff1(bgAnalyseResult.d_g_fitting_e_c.get(0));
gammaCalibrationD.setCoeff2(bgAnalyseResult.d_g_fitting_e_c.get(1));
gammaCalibrationD.setCoeff3(bgAnalyseResult.d_g_fitting_e_c.get(2));
}
gammaCalibrationSpectrumEList.add(gammaCalibrationD);
}
betaDataFile.setGammaCalibrationSpectrumEList(gammaCalibrationSpectrumEList);
//处理BetaCalibration数据
List<GardsCalibrationSpectrum> betaCalibrationSpectrumList = new LinkedList<>();
List<String> betaFittingPara = betaDataFile.getBetaFittingPara();
@ -969,6 +1043,78 @@ public class PHDFileUtil extends AbstractLogOrReport {
betaCalibrationSpectrumList.add(betaCalibrationD);
}
betaDataFile.setBetaCalibrationSpectrumList(betaCalibrationSpectrumList);
//处理BetaCalibration数据
List<GardsCalibrationSpectrum> betaCalibrationSpectrumEList = new LinkedList<>();
List<String> betaFittingParaToUi = betaDataFile.getBetaFittingParaToUi();
if (betaDataFile.isBBetaEnergyValidSample()) {
GardsCalibrationSpectrum betaCalibrationS = new GardsCalibrationSpectrum();
betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
betaCalibrationS.setCoeff1(Double.valueOf(betaFittingParaToUi.get(0)));
betaCalibrationS.setCoeff2(Double.valueOf(betaFittingParaToUi.get(1)));
betaCalibrationS.setCoeff3(Double.valueOf(betaFittingParaToUi.get(2)));
betaCalibrationSpectrumEList.add(betaCalibrationS);
} else {
GardsCalibrationSpectrum betaCalibrationS = new GardsCalibrationSpectrum();
if (bgAnalyseResult.s_b_fitting_c_e.size() < 0) {
betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
betaCalibrationS.setCoeff1(Double.valueOf(betaFittingParaToUi.get(0)));
betaCalibrationS.setCoeff2(Double.valueOf(betaFittingParaToUi.get(1)));
betaCalibrationS.setCoeff3(Double.valueOf(betaFittingParaToUi.get(2)));
} else {
betaCalibrationS.setDataType(DataTypeAbbr.SAMPLEPHD.getType());
betaCalibrationS.setCoeff1(bgAnalyseResult.s_b_fitting_c_e.get(0));
betaCalibrationS.setCoeff2(bgAnalyseResult.s_b_fitting_c_e.get(1));
betaCalibrationS.setCoeff3(bgAnalyseResult.s_b_fitting_c_e.get(2));
}
betaCalibrationSpectrumEList.add(betaCalibrationS);
}
if (betaDataFile.isBBetaEnergyValidGas()) {
GardsCalibrationSpectrum betaCalibrationG = new GardsCalibrationSpectrum();
betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType());
betaCalibrationG.setCoeff1(Double.valueOf(betaFittingParaToUi.get(0)));
betaCalibrationG.setCoeff2(Double.valueOf(betaFittingParaToUi.get(1)));
betaCalibrationG.setCoeff3(Double.valueOf(betaFittingParaToUi.get(2)));
betaCalibrationSpectrumEList.add(betaCalibrationG);
} else {
GardsCalibrationSpectrum betaCalibrationG = new GardsCalibrationSpectrum();
if (bgAnalyseResult.g_b_fitting_c_e.size() < 0) {
betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType());
betaCalibrationG.setCoeff1(Double.valueOf(betaFittingParaToUi.get(0)));
betaCalibrationG.setCoeff2(Double.valueOf(betaFittingParaToUi.get(1)));
betaCalibrationG.setCoeff3(Double.valueOf(betaFittingParaToUi.get(2)));
} else {
betaCalibrationG.setDataType(DataTypeAbbr.GASBKPHD.getType());
betaCalibrationG.setCoeff1(bgAnalyseResult.g_b_fitting_c_e.get(0));
betaCalibrationG.setCoeff2(bgAnalyseResult.g_b_fitting_c_e.get(1));
betaCalibrationG.setCoeff3(bgAnalyseResult.g_b_fitting_c_e.get(2));
}
betaCalibrationSpectrumEList.add(betaCalibrationG);
}
if (betaDataFile.isBBetaEnergyValidDet()) {
GardsCalibrationSpectrum betaCalibrationD = new GardsCalibrationSpectrum();
betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType());
betaCalibrationD.setCoeff1(Double.valueOf(betaFittingParaToUi.get(0)));
betaCalibrationD.setCoeff2(Double.valueOf(betaFittingParaToUi.get(1)));
betaCalibrationD.setCoeff3(Double.valueOf(betaFittingParaToUi.get(2)));
betaCalibrationSpectrumEList.add(betaCalibrationD);
} else {
GardsCalibrationSpectrum betaCalibrationD = new GardsCalibrationSpectrum();
if (bgAnalyseResult.d_b_fitting_c_e.size() < 0) {
betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType());
betaCalibrationD.setCoeff1(Double.valueOf(betaFittingParaToUi.get(0)));
betaCalibrationD.setCoeff2(Double.valueOf(betaFittingParaToUi.get(1)));
betaCalibrationD.setCoeff3(Double.valueOf(betaFittingParaToUi.get(2)));
} else {
betaCalibrationD.setDataType(DataTypeAbbr.DETBKPHD.getType());
betaCalibrationD.setCoeff1(bgAnalyseResult.d_b_fitting_c_e.get(0));
betaCalibrationD.setCoeff2(bgAnalyseResult.d_b_fitting_c_e.get(1));
betaCalibrationD.setCoeff3(bgAnalyseResult.d_b_fitting_c_e.get(2));
}
betaCalibrationSpectrumEList.add(betaCalibrationD);
}
betaDataFile.setBetaCalibrationSpectrumEList(betaCalibrationSpectrumEList);
//存储roiChannel数据
List<GardsROIChannelsSpectrum> roiChannelsSpectrumList = new LinkedList<>();
for (int i=0; i<bgAnalyseResult.S_ROI_B_Boundary_start.size(); i++) {

View File

@ -2,10 +2,7 @@ package org.jeecg.modules.entity.vo;
import lombok.Data;
import org.jeecg.modules.base.entity.rnman.GardsXeResults;
import org.jeecg.modules.entity.GardsCalibrationSpectrum;
import org.jeecg.modules.entity.GardsROIChannelsSpectrum;
import org.jeecg.modules.entity.GardsROIResultsSpectrum;
import org.jeecg.modules.entity.GardsXeResultsSpectrum;
import org.jeecg.modules.entity.*;
import org.jeecg.modules.native_jni.struct.EnergySpectrumStruct;
import java.io.Serializable;
@ -140,12 +137,20 @@ public class BetaDataFile implements Serializable {
private List<GardsXeResults> xeDataList;
private List<GardsCalibrationSpectrum> gammaCalibrationSpectrumList;
private List<GardsCalibrationSpectrum> gammaCalibrationSpectrumEList;
private List<GardsCalibrationSpectrum> betaCalibrationSpectrumList;
private List<GardsCalibrationSpectrum> betaCalibrationSpectrumEList;
private List<GardsROIChannelsSpectrum> roiChannelsSpectrumList;
private List<GardsROIResultsSpectrum> roiResultsSpectrumList;
private List<GardsCalibrationPairsSpectrum> gammaCalibrationPairsList;
private List<GardsCalibrationPairsSpectrum> betaCalibrationPairsList;
public BetaDataFile() {
sampleFilePathName = "";
sampleFileName = "";
@ -185,6 +190,16 @@ public class BetaDataFile implements Serializable {
betaFittingParaToUiOld = new LinkedList<>();
gammaFittingParaOld = new LinkedList<>();
gammaFittingParaToUiOld = new LinkedList<>();
xeDataList = new LinkedList<>();
gammaCalibrationSpectrumList = new LinkedList<>();
gammaCalibrationSpectrumEList = new LinkedList<>();
betaCalibrationSpectrumList = new LinkedList<>();
betaCalibrationSpectrumEList = new LinkedList<>();
roiChannelsSpectrumList = new LinkedList<>();
roiResultsSpectrumList = new LinkedList<>();
gammaCalibrationPairsList = new LinkedList<>();
betaCalibrationPairsList = new LinkedList<>();
}
}

View File

@ -3787,9 +3787,6 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
result.error500("Please select the parse file first");
return result;
}
//分析gamma文件
Map<String, NuclideLines> nuclideLinesMap = (Map<String, NuclideLines>) redisUtil.get(userName+"-"+phd.getHeader().getSystem_type());//GetNuclideLines(nuclides);
gammaFileUtil.AnalyseSpectrum(phd, nuclideLinesMap);
//生成对应报告内容
String reportContent = gammaFileUtil.GetReportContent(phd, userName, false, "log");
result.setSuccess(true);

View File

@ -317,6 +317,12 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
Map<String, Object> resultMap = new HashMap<>();
//页面展示结果数组
List<GardsXeResultsSpectrum> xeResultsSpectrumList = new LinkedList<>();
List<GardsCalibrationSpectrum> gammaCalibrationSpectrumList= new LinkedList<>();
List<GardsCalibrationSpectrum> betaCalibrationSpectrumList = new LinkedList<>();
List<GardsROIChannelsSpectrum> roiChannelsSpectrumList = new LinkedList<>();
List<GardsROIResultsSpectrum> roiResultsSpectrumList = new LinkedList<>();
List<GardsCalibrationPairsSpectrum> gammaCalibrationPairsList = new LinkedList<>();
List<GardsCalibrationPairsSpectrum> betaCalibrationPairsList = new LinkedList<>();
//判断sampleId是否为空
if (Objects.isNull(sampleId)){
result.error500("Please select a piece of data");
@ -328,9 +334,19 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
dbName = "RNAUTO";
analysisID = spectrumAnalysisMapper.getAnalysisID(dbName, sampleId, "RNAUTO");
xeResultsSpectrumList = spectrumAnalysisMapper.ReadXeResults(dbName, analysisID, sampleId);
gammaCalibrationSpectrumList = spectrumAnalysisMapper.ReadGammaCalibrationParam("RNAUTO", analysisID, sampleId);
betaCalibrationSpectrumList = spectrumAnalysisMapper.ReadBetaCalibrationParam("RNAUTO", analysisID, sampleId);
roiChannelsSpectrumList = spectrumAnalysisMapper.ReadROIChannels("RNAUTO", analysisID, sampleId);
roiResultsSpectrumList = spectrumAnalysisMapper.ReadROIResults("RNAUTO", analysisID, sampleId);
} else if (dbName.equalsIgnoreCase("man")){
dbName = "RNMAN";
analysisID = spectrumAnalysisMapper.getAnalysisID(dbName, sampleId, userName);
gammaCalibrationPairsList = spectrumAnalysisMapper.ReadGammaFitChannelEnergy(analysisID, sampleId);
gammaCalibrationSpectrumList = spectrumAnalysisMapper.ReadGammaCalibrationParam("RNMAN", analysisID, sampleId);
betaCalibrationPairsList = spectrumAnalysisMapper.ReadBetaFitChannelEnergy(analysisID, sampleId);
betaCalibrationSpectrumList = spectrumAnalysisMapper.ReadBetaCalibrationParam("RNMAN", analysisID, sampleId);
roiChannelsSpectrumList = spectrumAnalysisMapper.ReadROIChannels("RNMAN", analysisID, sampleId);
roiResultsSpectrumList = spectrumAnalysisMapper.ReadROIResults("RNMAN", analysisID, sampleId);
xeResultsSpectrumList = spectrumAnalysisMapper.ReadXeResults(dbName, analysisID, sampleId);
}else {
result.error500("The database type does not exist");
@ -475,6 +491,12 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
xeData.setConcErr(Double.valueOf(String.format("%."+((6 - String.valueOf(Math.abs(xeData.getConcErr())).substring(0, String.valueOf(Math.abs(xeData.getConcErr())).lastIndexOf(StringPool.DOT)).length()))+"f", xeData.getConcErr())));
}
}
betaDataFile.setGammaCalibrationSpectrumList(gammaCalibrationSpectrumList);
betaDataFile.setBetaCalibrationSpectrumList(betaCalibrationSpectrumList);
betaDataFile.setRoiChannelsSpectrumList(roiChannelsSpectrumList);
betaDataFile.setRoiResultsSpectrumList(roiResultsSpectrumList);
betaDataFile.setGammaCalibrationPairsList(gammaCalibrationPairsList);
betaDataFile.setBetaCalibrationPairsList(betaCalibrationPairsList);
betaDataFile.setXeResultsSpectrumList(xeResultsSpectrumList);
betaDataFile.setSaveAnalysisResult(true);
resultMap.put("XeData", xeResultsSpectrumList);
@ -765,37 +787,34 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
GardsCalibrationSpectrum gammaCalibrationParamS = new GardsCalibrationSpectrum();
GardsCalibrationSpectrum gammaCalibrationParamG = new GardsCalibrationSpectrum();
GardsCalibrationSpectrum gammaCalibrationParamD = new GardsCalibrationSpectrum();
GardsCalibrationSpectrum gammaCalibrationParamES = new GardsCalibrationSpectrum();
GardsCalibrationSpectrum gammaCalibrationParamEG = new GardsCalibrationSpectrum();
GardsCalibrationSpectrum gammaCalibrationParamED = new GardsCalibrationSpectrum();
GardsCalibrationSpectrum betaCalibrationParamS = new GardsCalibrationSpectrum();
GardsCalibrationSpectrum betaCalibrationParamG = new GardsCalibrationSpectrum();
GardsCalibrationSpectrum betaCalibrationParamD = new GardsCalibrationSpectrum();
BgCalibratePara BgCalPara = null;
GardsCalibrationSpectrum betaCalibrationParamES = new GardsCalibrationSpectrum();
GardsCalibrationSpectrum betaCalibrationParamEG = new GardsCalibrationSpectrum();
GardsCalibrationSpectrum betaCalibrationParamED = new GardsCalibrationSpectrum();
rrrLogInfo.setSampleFilePath(betaDataFile.getSampleFilePathName());
rrrLogInfo.setGasFilePath(betaDataFile.getGasFilePathName());
rrrLogInfo.setDetFilePath(betaDataFile.getDetFilePathName());
List<String> betaFittingPara = new LinkedList<>();
List<String> gammaFittingPara = new LinkedList<>();
if (Objects.nonNull(betaDataFile)) {
betaFittingPara = betaDataFile.getBetaFittingPara();
gammaFittingPara = betaDataFile.getGammaFittingPara();
BgCalPara = betaDataFile.getBgPara();
rrrLogInfo.setBGammaEnergyValidSample(betaDataFile.isBGammaEnergyValidSample());
rrrLogInfo.setBBetaEnergyValidSample(betaDataFile.isBBetaEnergyValidSample());
rrrLogInfo.setBGammaEnergyValidGas(betaDataFile.isBGammaEnergyValidGas());
rrrLogInfo.setBBetaEnergyValidGas(betaDataFile.isBBetaEnergyValidGas());
rrrLogInfo.setBGammaEnergyValidDet(betaDataFile.isBGammaEnergyValidDet());
rrrLogInfo.setBBetaEnergyValidDet(betaDataFile.isBBetaEnergyValidDet());
}
//对当前文件内容进行分析
boolean bRet = analyzeRRR(rrrLogInfo, BgCalPara, betaFittingPara, gammaFittingPara);
StringBuffer strBuffer = new StringBuffer();
if (bRet) {
//判断
if (betaDataFile.isSaveAnalysisResult()) {
//对分析后的内容进行数据获取
List<GardsROIChannelsSpectrum> channelsSpectrums = rrrLogInfo.getRoiChannelsSpectrumList();
List<GardsROIResultsSpectrum> resultsSpectrums = rrrLogInfo.getRoiResultsSpectrumList();
List<GardsXeResultsSpectrum> xeResultsSpectrums = rrrLogInfo.getXeResultsSpectrumList();
List<GardsROIChannelsSpectrum> channelsSpectrums = betaDataFile.getRoiChannelsSpectrumList();
List<GardsROIResultsSpectrum> resultsSpectrums = betaDataFile.getRoiResultsSpectrumList();
List<GardsXeResultsSpectrum> xeResultsSpectrums = betaDataFile.getXeResultsSpectrumList();
for (int i=0; i<xeResultsSpectrums.size(); i++) {
for (int j=0; j<rrrLogInfo.getXeResultsSpectrumList().size(); j++) {
if (xeResultsSpectrums.get(i).getNuclideName().equalsIgnoreCase(rrrLogInfo.getXeResultsSpectrumList().get(j).getNuclideName())) {
xeResultsSpectrums.get(i).setNidFlag(rrrLogInfo.getXeResultsSpectrumList().get(j).getNidFlag());
}
}
}
//#SAMPLE: LIMITS PER ROI GAMMA
List<GardsCalibrationSpectrum> gammaCalibrationParamList = rrrLogInfo.getGammaCalibrationParamList();
List<GardsCalibrationSpectrum> gammaCalibrationParamList = betaDataFile.getGammaCalibrationSpectrumList();
List<GardsCalibrationSpectrum> gammaCalibrationSpectrumEList = betaDataFile.getGammaCalibrationSpectrumEList();
for (int i=0; i<gammaCalibrationParamList.size(); i++) {
if (gammaCalibrationParamList.get(i).getDataType().equals("S")) {
gammaCalibrationParamS = gammaCalibrationParamList.get(i);
@ -805,8 +824,18 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
gammaCalibrationParamD = gammaCalibrationParamList.get(i);
}
}
for (int i=0; i<gammaCalibrationSpectrumEList.size(); i++) {
if (gammaCalibrationSpectrumEList.get(i).getDataType().equals("S")) {
gammaCalibrationParamES = gammaCalibrationSpectrumEList.get(i);
} else if (gammaCalibrationSpectrumEList.get(i).getDataType().equals("G")) {
gammaCalibrationParamEG = gammaCalibrationSpectrumEList.get(i);
} else if (gammaCalibrationSpectrumEList.get(i).getDataType().equals("D")) {
gammaCalibrationParamED = gammaCalibrationSpectrumEList.get(i);
}
}
//#SAMPLE: LIMITS PER ROI BETA
List<GardsCalibrationSpectrum> betaCalibrationParamList = rrrLogInfo.getBetaCalibrationParamList();
List<GardsCalibrationSpectrum> betaCalibrationParamList = betaDataFile.getBetaCalibrationSpectrumList();
List<GardsCalibrationSpectrum> betaCalibrationSpectrumEList = betaDataFile.getBetaCalibrationSpectrumEList();
for (int i=0; i<betaCalibrationParamList.size(); i++) {
if (betaCalibrationParamList.get(i).getDataType().equals("S")) {
betaCalibrationParamS = betaCalibrationParamList.get(i);
@ -816,6 +845,15 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
betaCalibrationParamD = betaCalibrationParamList.get(i);
}
}
for (int i=0; i<betaCalibrationSpectrumEList.size(); i++) {
if (betaCalibrationSpectrumEList.get(i).getDataType().equals("S")) {
betaCalibrationParamES = betaCalibrationSpectrumEList.get(i);
} else if (betaCalibrationSpectrumEList.get(i).getDataType().equals("G")) {
betaCalibrationParamEG = betaCalibrationSpectrumEList.get(i);
} else if (betaCalibrationSpectrumEList.get(i).getDataType().equals("D")) {
betaCalibrationParamED = betaCalibrationSpectrumEList.get(i);
}
}
Information information = new Information();
//sampleFile 相关数据
try {
@ -892,9 +930,31 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
strBuffer.append("\n");
strBuffer.append("#SAMPLE Old CALIBRATION").append("\n");
strBuffer.append(" Old Beta Old Gamma ").append("\n");
if (rrrLogInfo.isSampleData()){
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
if (betaDataFile.isBBetaEnergyValidSample() || betaDataFile.isBGammaEnergyValidSample()){
if (betaDataFile.isBBetaEnergyValidSample()) {
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaOld().get(0)), NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaOld().get(1)), NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaOld().get(2))));
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
}
if (betaDataFile.isBGammaEnergyValidSample()) {
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaOld().get(0)), NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaOld().get(1)), NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaOld().get(2))));
strBuffer.append("\n");
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
strBuffer.append("\n");
}
if (betaDataFile.isBBetaEnergyValidSample()) {
strBuffer.append(rowFormat(" E(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaToUiOld().get(0)), NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaToUiOld().get(1)), NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaToUiOld().get(2))));
} else {
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
}
if (betaDataFile.isBGammaEnergyValidSample()) {
strBuffer.append(rowFormat(" E(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaToUiOld().get(0)), NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaToUiOld().get(1)), NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaToUiOld().get(2))));
strBuffer.append("\n");
} else {
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
strBuffer.append("\n");
}
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
@ -902,20 +962,66 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
strBuffer.append("\n");
strBuffer.append("#SAMPLE New CALIBRATION").append("\n");
strBuffer.append(" New Beta New Gamma ").append("\n");
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
strBuffer.append(" E(x) = ("+betaCalibrationParamS.getCoeff1()+")+("+betaCalibrationParamS.getCoeff2()+")*x+("+betaCalibrationParamS.getCoeff3()+")x*x ").append(" E(x) = ("+gammaCalibrationParamS.getCoeff1()+")+("+gammaCalibrationParamS.getCoeff2()+")*x+("+gammaCalibrationParamS.getCoeff3()+")x*x").append("\n");
if (Objects.nonNull(betaCalibrationParamS)) {
strBuffer.append(" CH(x) = ("+String.format("%.6f", betaCalibrationParamS.getCoeff1())+")+("+String.format("%.6f", betaCalibrationParamS.getCoeff2())+")*x+("+String.format("%.6f", betaCalibrationParamS.getCoeff3())+")x*x ");
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
}
if (Objects.nonNull(gammaCalibrationParamS)) {
strBuffer.append(" CH(x) = ("+String.format("%.6f", gammaCalibrationParamS.getCoeff1())+")+("+String.format("%.6f", gammaCalibrationParamS.getCoeff2())+")*x+("+String.format("%.6f", gammaCalibrationParamS.getCoeff3())+")x*x ");
strBuffer.append("\n");
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x");
strBuffer.append("\n");
}
if (Objects.nonNull(betaCalibrationParamES)) {
strBuffer.append(" E(x) = ("+String.format("%.6f", betaCalibrationParamES.getCoeff1())+")+("+String.format("%.6f", betaCalibrationParamES.getCoeff2())+")*x+("+String.format("%.6f", betaCalibrationParamES.getCoeff3())+")x*x ");
} else {
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
}
if (Objects.nonNull(gammaCalibrationParamES)) {
strBuffer.append(" E(x) = ("+String.format("%.6f", gammaCalibrationParamES.getCoeff1())+")+("+String.format("%.6f", gammaCalibrationParamES.getCoeff2())+")*x+("+String.format("%.6f", gammaCalibrationParamES.getCoeff3())+")x*x");
strBuffer.append("\n");
} else {
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x");
strBuffer.append("\n");
}
strBuffer.append("\n");
strBuffer.append("#SAMPLE: LIMITS PER ROI").append("\n");
strBuffer.append(" Roi Beta Gamma ").append("\n");
if (CollectionUtils.isNotEmpty(channelsSpectrums)) {
for (GardsROIChannelsSpectrum channelsSpectrum:channelsSpectrums) {
strBuffer.append(StringPool.SPACE+channelsSpectrum.getRoi()+" "+channelsSpectrum.getBChanStart()+"to"+channelsSpectrum.getBChanStop()+" "+channelsSpectrum.getGChanStart()+"to"+channelsSpectrum.getGChanStop()).append("\n");
}
}
strBuffer.append("\n");
strBuffer.append("#DET Old CALIBRATION").append("\n");
strBuffer.append(" Old Beta Old Gamma ").append("\n");
if (rrrLogInfo.isDetBgData()){
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
if (betaDataFile.isBBetaEnergyValidDet() || betaDataFile.isBGammaEnergyValidDet()){
if (betaDataFile.isBBetaEnergyValidDet()) {
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaOld().get(0)), NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaOld().get(1)), NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaOld().get(2))));
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
}
if (betaDataFile.isBGammaEnergyValidDet()) {
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaOld().get(0)), NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaOld().get(1)), NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaOld().get(2))));
strBuffer.append("\n");
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
strBuffer.append("\n");
}
if (betaDataFile.isBBetaEnergyValidDet()) {
strBuffer.append(rowFormat(" E(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaToUiOld().get(0)), NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaToUiOld().get(1)), NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaToUiOld().get(2))));
} else {
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
}
if (betaDataFile.isBGammaEnergyValidDet()) {
strBuffer.append(rowFormat(" E(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaToUiOld().get(0)), NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaToUiOld().get(1)), NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaToUiOld().get(2))));
strBuffer.append("\n");
} else {
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
strBuffer.append("\n");
}
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
@ -923,20 +1029,66 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
strBuffer.append("\n");
strBuffer.append("#DET New CALIBRATION").append("\n");
strBuffer.append(" New Beta New Gamma ").append("\n");
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
strBuffer.append(" E(x) = ("+gammaCalibrationParamD.getCoeff1()+")+("+gammaCalibrationParamD.getCoeff2()+")*x+("+gammaCalibrationParamD.getCoeff3()+")x*x ").append(" E(x) = ("+gammaCalibrationParamD.getCoeff1()+")+("+gammaCalibrationParamD.getCoeff2()+")*x+("+gammaCalibrationParamD.getCoeff3()+")x*x").append("\n");
if (Objects.nonNull(betaCalibrationParamD)) {
strBuffer.append(" CH(x) = ("+String.format("%.6f", betaCalibrationParamD.getCoeff1())+")+("+String.format("%.6f", betaCalibrationParamD.getCoeff2())+")*x+("+String.format("%.6f", betaCalibrationParamD.getCoeff3())+")x*x ");
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
}
if (Objects.nonNull(gammaCalibrationParamD)) {
strBuffer.append(" CH(x) = ("+String.format("%.6f", gammaCalibrationParamD.getCoeff1())+")+("+String.format("%.6f", gammaCalibrationParamD.getCoeff2())+")*x+("+String.format("%.6f", gammaCalibrationParamD.getCoeff3())+")x*x");
strBuffer.append("\n");
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x");
strBuffer.append("\n");
}
if (Objects.nonNull(betaCalibrationParamED)) {
strBuffer.append(" E(x) = ("+String.format("%.6f", betaCalibrationParamED.getCoeff1())+")+("+String.format("%.6f", betaCalibrationParamED.getCoeff2())+")*x+("+String.format("%.6f", betaCalibrationParamED.getCoeff3())+")x*x ");
} else {
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
}
if (Objects.nonNull(gammaCalibrationParamED)) {
strBuffer.append(" E(x) = ("+String.format("%.6f", gammaCalibrationParamED.getCoeff1())+")+("+String.format("%.6f", gammaCalibrationParamED.getCoeff2())+")*x+("+String.format("%.6f", gammaCalibrationParamED.getCoeff3())+")x*x");
strBuffer.append("\n");
} else {
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x");
strBuffer.append("\n");
}
strBuffer.append("\n");
strBuffer.append("#DET: LIMITS PER ROI").append("\n");
strBuffer.append(" Roi Beta Gamma ").append("\n");
if (CollectionUtils.isNotEmpty(channelsSpectrums)) {
for (GardsROIChannelsSpectrum channelsSpectrum:channelsSpectrums) {
strBuffer.append(StringPool.SPACE+channelsSpectrum.getRoi()+" "+channelsSpectrum.getBChanStart()+"to"+channelsSpectrum.getBChanStop()+" "+channelsSpectrum.getGChanStart()+"to"+channelsSpectrum.getGChanStop()).append("\n");
}
}
strBuffer.append("\n");
strBuffer.append("#GAS Old CALIBRATION").append("\n");
strBuffer.append(" Old Beta Old Gamma ").append("\n");
if (rrrLogInfo.isGasBgData()){
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
if (betaDataFile.isBBetaEnergyValidGas() || betaDataFile.isBGammaEnergyValidGas()){
if (betaDataFile.isBBetaEnergyValidGas()) {
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaOld().get(0)), NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaOld().get(1)), NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaOld().get(2))));
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
}
if (betaDataFile.isBGammaEnergyValidGas()) {
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaOld().get(0)), NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaOld().get(1)), NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaOld().get(2))));
strBuffer.append("\n");
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
strBuffer.append("\n");
}
if (betaDataFile.isBBetaEnergyValidGas()) {
strBuffer.append(rowFormat(" E(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaToUiOld().get(0)), NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaToUiOld().get(1)), NumberFormatUtil.numberFormat(betaDataFile.getBetaFittingParaToUiOld().get(2))));
} else {
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
}
if (betaDataFile.isBGammaEnergyValidGas()) {
strBuffer.append(rowFormat(" E(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaToUiOld().get(0)), NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaToUiOld().get(1)), NumberFormatUtil.numberFormat(betaDataFile.getGammaFittingParaToUiOld().get(2))));
strBuffer.append("\n");
} else {
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
strBuffer.append("\n");
}
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ").append(" E(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
@ -944,38 +1096,70 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
strBuffer.append("\n");
strBuffer.append("#GAS New CALIBRATION").append("\n");
strBuffer.append(" New Beta New Gamma ").append("\n");
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ").append(" CH(x) = (?1)+(?2)*x+(?3)x*x").append("\n");
strBuffer.append(" E(x) = ("+betaCalibrationParamG.getCoeff1()+")+("+betaCalibrationParamG.getCoeff2()+")*x+("+betaCalibrationParamG.getCoeff3()+")x*x ").append(" E(x) = ("+gammaCalibrationParamG.getCoeff1()+")+("+gammaCalibrationParamG.getCoeff2()+")*x+("+gammaCalibrationParamG.getCoeff3()+")x*x").append("\n");
if (Objects.nonNull(betaCalibrationParamG)) {
strBuffer.append(" CH(x) = ("+String.format("%.6f", betaCalibrationParamG.getCoeff1())+")+("+String.format("%.6f", betaCalibrationParamG.getCoeff2())+")*x+("+String.format("%.6f", betaCalibrationParamG.getCoeff3())+")x*x ");
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
}
if (Objects.nonNull(gammaCalibrationParamG)) {
strBuffer.append(" CH(x) = ("+String.format("%.6f", gammaCalibrationParamG.getCoeff1())+")+("+String.format("%.6f", gammaCalibrationParamG.getCoeff2())+")*x+("+String.format("%.6f", gammaCalibrationParamG.getCoeff3())+")x*x");
strBuffer.append("\n");
} else {
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x");
strBuffer.append("\n");
}
if (Objects.nonNull(betaCalibrationParamEG)) {
strBuffer.append(" E(x) = ("+String.format("%.6f", betaCalibrationParamEG.getCoeff1())+")+("+String.format("%.6f", betaCalibrationParamEG.getCoeff2())+")*x+("+String.format("%.6f", betaCalibrationParamEG.getCoeff3())+")x*x ");
} else {
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
}
if (Objects.nonNull(gammaCalibrationParamEG)) {
strBuffer.append(" E(x) = ("+String.format("%.6f", gammaCalibrationParamEG.getCoeff1())+")+("+String.format("%.6f", gammaCalibrationParamEG.getCoeff2())+")*x+("+String.format("%.6f", gammaCalibrationParamEG.getCoeff3())+")x*x");
strBuffer.append("\n");
} else {
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x");
strBuffer.append("\n");
}
strBuffer.append("\n");
strBuffer.append("#GAS: LIMITS PER ROI").append("\n");
strBuffer.append(" Roi Beta Gamma ").append("\n");
if (CollectionUtils.isNotEmpty(channelsSpectrums)) {
for (GardsROIChannelsSpectrum channelsSpectrum:channelsSpectrums) {
strBuffer.append(StringPool.SPACE+channelsSpectrum.getRoi()+" "+channelsSpectrum.getBChanStart()+"to"+channelsSpectrum.getBChanStop()+" "+channelsSpectrum.getGChanStart()+"to"+channelsSpectrum.getGChanStop()).append("\n");
}
}
strBuffer.append("\n");
strBuffer.append("#GROSS COUNTS PER ROI").append("\n");
strBuffer.append(" Roi Sample GasBkgnd DetBkgnd ").append("\n");
if (CollectionUtils.isNotEmpty(resultsSpectrums)) {
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums) {
strBuffer.append(StringPool.SPACE+resultsSpectrum.getRoi()+" "+resultsSpectrum.getSGross()+" "+resultsSpectrum.getGGross()+" "+resultsSpectrum.getBGross()+"").append("\n");
}
}
strBuffer.append("\n");
strBuffer.append("#NET COUNTS AND LC PER ROI").append("\n");
strBuffer.append(" Roi Net count ").append("\n");
if (CollectionUtils.isNotEmpty(resultsSpectrums)) {
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){
strBuffer.append(StringPool.SPACE+resultsSpectrum.getRoi()+" "+resultsSpectrum.getNet()+" +/- "+Math.sqrt(resultsSpectrum.getNetErr())).append("\n");
}
}
strBuffer.append("\n");
strBuffer.append("#CONCENTRATION AND LC PER ROI").append("\n");
strBuffer.append(" Roi Conc(mBq/m3) LC(mBq/m3) MDC(mBq/m3): ");
if (CollectionUtils.isNotEmpty(resultsSpectrums)) {
for (GardsROIResultsSpectrum resultsSpectrum:resultsSpectrums){
strBuffer.append(StringPool.SPACE+resultsSpectrum.getRoi()+" "+resultsSpectrum.getConcErr()+" +/- "+resultsSpectrum.getConcErr()+" "+resultsSpectrum.getLc()+" "+resultsSpectrum.getMdc()).append("\n");
}
}
strBuffer.append("\n");
strBuffer.append("#RESULT SUMMARY").append("\n");
strBuffer.append(" Nuclide Name Conc LC MDC NID Flag ").append("\n");
if (CollectionUtils.isNotEmpty(xeResultsSpectrums)) {
for (GardsXeResultsSpectrum xeResultsSpectrum:xeResultsSpectrums) {
strBuffer.append(StringPool.SPACE+xeResultsSpectrum.getNuclideName()+" "+xeResultsSpectrum.getConc()+" +/- "+xeResultsSpectrum.getConcErr()+" "+xeResultsSpectrum.getLc()+" "+xeResultsSpectrum.getMdc()+" "+xeResultsSpectrum.getNidFlag()).append("\n");
}
}
strBuffer.append("\n");
} catch (ParseException e) {
throw new RuntimeException(e);
@ -986,7 +1170,7 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
return result;
}
public boolean analyzeRRR(RRRLogInfo rrrLogInfo, BgCalibratePara BgCalPara, List<String> betaFittingPara, List<String> gammaFittingPara) {
public boolean analyzeRRR(RRRLogInfo rrrLogInfo, BgCalibratePara BgCalPara, List<String> betaFittingPara, List<String> gammaFittingPara, List<String> betaFittingParaToUi, List<String> gammaFittingParaToUi) {
boolean bRet = true;
File sampleTmp = null;
File gasTmp = null;