beta功能生成RRR报告时,公式相关的内容进行修改以及调换位置
This commit is contained in:
parent
a732b24c27
commit
a740a32b64
|
@ -174,6 +174,20 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
List<List<Double>> gammaEnergyList = new LinkedList<>();
|
||||
List<Double> gCentroidChannel = struct.g_centroid_channel;
|
||||
List<Double> gEnergy = struct.g_energy;
|
||||
//C to E
|
||||
List<Double> gammaFittingPara = EnergySpectrumHandler.GetFileFittingPara(gCentroidChannel, gEnergy);
|
||||
List<String> gammaFittingParaStr = new LinkedList<>();
|
||||
for (Double para:gammaFittingPara) {
|
||||
gammaFittingParaStr.add(String.valueOf(para));
|
||||
}
|
||||
//E to C
|
||||
List<Double> gammaFittingParaToUi = EnergySpectrumHandler.GetFileFittingPara(gEnergy, gCentroidChannel);
|
||||
List<String> gammaFittingParaToUiStr = new LinkedList<>();
|
||||
for (Double para:gammaFittingParaToUi) {
|
||||
gammaFittingParaToUiStr.add(String.valueOf(para));
|
||||
}
|
||||
betaDataFile.setGammaFittingParaOld(gammaFittingParaStr);
|
||||
betaDataFile.setGammaFittingParaToUiOld(gammaFittingParaToUiStr);
|
||||
List<Double> gammaParam = EnergySpectrumHandler.GetFileFittingPara(gCentroidChannel, gEnergy);
|
||||
List<Double> gchannels = new ArrayList<>();
|
||||
for (int i=0; i<numGChannel; i++){
|
||||
|
@ -217,6 +231,20 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
List<List<Double>> betaEnergyList = new LinkedList<>();
|
||||
List<Double> bChannel = struct.b_channel;
|
||||
List<Double> bElectronEnergy = struct.b_electron_energy;
|
||||
//C to E
|
||||
List<Double> betaFittingPara = EnergySpectrumHandler.GetFileFittingPara(bChannel, bElectronEnergy);
|
||||
List<String> betaFittingParaStr = new LinkedList<>();
|
||||
for (Double para:betaFittingPara) {
|
||||
betaFittingParaStr.add(String.valueOf(para));
|
||||
}
|
||||
//E to C
|
||||
List<Double> betaFittingParaToUi = EnergySpectrumHandler.GetFileFittingPara(bElectronEnergy, bChannel);
|
||||
List<String> betaFittingParaToUiStr = new LinkedList<>();
|
||||
for (Double para:betaFittingParaToUi) {
|
||||
betaFittingParaToUiStr.add(String.valueOf(para));
|
||||
}
|
||||
betaDataFile.setBetaFittingParaOld(betaFittingParaStr);
|
||||
betaDataFile.setBetaFittingParaToUiOld(betaFittingParaToUiStr);
|
||||
List<Double> betaParam = EnergySpectrumHandler.GetFileFittingPara(bChannel, bElectronEnergy);
|
||||
List<Double> bchannels = new ArrayList<>();
|
||||
for (int i=0; i<numBChannel; i++){
|
||||
|
@ -226,6 +254,7 @@ public class PHDFileUtil extends AbstractLogOrReport {
|
|||
betaEnergyList.add(betaEnergy);
|
||||
}
|
||||
map.put("betaEnergyData", betaEnergyList);
|
||||
|
||||
//计算边界值
|
||||
CalcBgBoundaryParam calcBgBoundaryParam = new CalcBgBoundaryParam();
|
||||
calcBgBoundaryParam.g_e_cal = EnergySpectrumHandler.GetFileFittingPara(gEnergy, gCentroidChannel);
|
||||
|
|
|
@ -989,53 +989,48 @@ 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 (betaDataFile.isBBetaEnergyValidSample() || betaDataFile.isBGammaEnergyValidSample()){
|
||||
if (betaDataFile.isBBetaEnergyValidSample()) {
|
||||
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(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.numberSixLen(betaDataFile.getGammaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(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.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(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.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(2))));
|
||||
strBuffer.append("\n");
|
||||
} else {
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
strBuffer.append("\n");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(betaDataFile.getBetaFittingParaOld())) {
|
||||
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(2))));
|
||||
} 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");
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(betaDataFile.getGammaFittingParaOld())) {
|
||||
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(2))));
|
||||
strBuffer.append("\n");
|
||||
} else {
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
strBuffer.append("\n");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(betaDataFile.getBetaFittingParaToUiOld())) {
|
||||
strBuffer.append(rowFormat(" E(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(2))));
|
||||
} else {
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(betaDataFile.getGammaFittingParaToUiOld())) {
|
||||
strBuffer.append(rowFormat(" E(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(2))));
|
||||
strBuffer.append("\n");
|
||||
} else {
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
strBuffer.append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#SAMPLE New CALIBRATION").append("\n");
|
||||
strBuffer.append(" New Beta New Gamma ").append("\n");
|
||||
strBuffer.append(" CH(x) = ("+ (Objects.isNull(betaCalibrationParamES.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamES.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(betaCalibrationParamES.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamES.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(betaCalibrationParamES.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamES.getCoeff3())))
|
||||
+")x*x ")
|
||||
.append(" CH(x) = ("+ (Objects.isNull(gammaCalibrationParamES.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamES.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(gammaCalibrationParamES.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamES.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(gammaCalibrationParamES.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamES.getCoeff3())))
|
||||
+")x*x ").append("\n");
|
||||
strBuffer.append(" E(x) = ("+ (Objects.isNull(betaCalibrationParamS.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamS.getCoeff1())))
|
||||
strBuffer.append(" CH(x) = ("+ (Objects.isNull(betaCalibrationParamS.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamS.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(betaCalibrationParamS.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamS.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(betaCalibrationParamS.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamS.getCoeff3())))
|
||||
+")x*x ")
|
||||
.append(" E(x) = ("+ (Objects.isNull(gammaCalibrationParamS.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamS.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(gammaCalibrationParamS.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamS.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(gammaCalibrationParamS.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamS.getCoeff3())))
|
||||
.append(" CH(x) = ("+ (Objects.isNull(gammaCalibrationParamS.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamS.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(gammaCalibrationParamS.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamS.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(gammaCalibrationParamS.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamS.getCoeff3())))
|
||||
+")x*x ").append("\n");
|
||||
strBuffer.append(" E(x) = ("+ (Objects.isNull(betaCalibrationParamES.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamES.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(betaCalibrationParamES.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamES.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(betaCalibrationParamES.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamES.getCoeff3())))
|
||||
+")x*x ")
|
||||
.append(" E(x) = ("+ (Objects.isNull(gammaCalibrationParamES.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamES.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(gammaCalibrationParamES.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamES.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(gammaCalibrationParamES.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamES.getCoeff3())))
|
||||
+")x*x").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#SAMPLE: LIMITS PER ROI").append("\n");
|
||||
|
@ -1048,54 +1043,49 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
strBuffer.append("\n");
|
||||
strBuffer.append("#DET Old CALIBRATION").append("\n");
|
||||
strBuffer.append(" Old Beta Old Gamma ").append("\n");
|
||||
if (betaDataFile.isBBetaEnergyValidDet() || betaDataFile.isBGammaEnergyValidDet()){
|
||||
if (betaDataFile.isBBetaEnergyValidDet()) {
|
||||
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(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.numberSixLen(betaDataFile.getGammaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(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.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(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.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(2))));
|
||||
strBuffer.append("\n");
|
||||
} else {
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
strBuffer.append("\n");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(betaDataFile.getBetaFittingParaOld())) {
|
||||
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(2))));
|
||||
} 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");
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(betaDataFile.getGammaFittingParaOld())) {
|
||||
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(2))));
|
||||
strBuffer.append("\n");
|
||||
} else {
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
strBuffer.append("\n");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(betaDataFile.getBetaFittingParaToUiOld())) {
|
||||
strBuffer.append(rowFormat(" E(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(2))));
|
||||
} else {
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(betaDataFile.getGammaFittingParaToUiOld())) {
|
||||
strBuffer.append(rowFormat(" E(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(2))));
|
||||
strBuffer.append("\n");
|
||||
} else {
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
strBuffer.append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#DET New CALIBRATION").append("\n");
|
||||
strBuffer.append(" New Beta New Gamma ").append("\n");
|
||||
strBuffer.append(" CH(x) = ("+ (Objects.isNull(betaCalibrationParamED.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamED.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(betaCalibrationParamED.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamED.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(betaCalibrationParamED.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamED.getCoeff3())))
|
||||
+")x*x ")
|
||||
.append(" CH(x) = ("+ (Objects.isNull(gammaCalibrationParamED.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamED.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(gammaCalibrationParamED.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamED.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(gammaCalibrationParamED.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamED.getCoeff3())))
|
||||
+")x*x").append("\n");
|
||||
strBuffer.append(" E(x) = ("+ (Objects.isNull(betaCalibrationParamD.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamD.getCoeff1())))
|
||||
strBuffer.append(" CH(x) = ("+ (Objects.isNull(betaCalibrationParamD.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamD.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(betaCalibrationParamD.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamD.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(betaCalibrationParamD.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamD.getCoeff3())))
|
||||
+")x*x ")
|
||||
.append(" E(x) = ("+ (Objects.isNull(gammaCalibrationParamD.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamD.getCoeff1())))
|
||||
.append(" CH(x) = ("+ (Objects.isNull(gammaCalibrationParamD.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamD.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(gammaCalibrationParamD.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamD.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(gammaCalibrationParamD.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamD.getCoeff3())))
|
||||
+")x*x").append("\n");
|
||||
strBuffer.append(" E(x) = ("+ (Objects.isNull(betaCalibrationParamED.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamED.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(betaCalibrationParamED.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamED.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(betaCalibrationParamED.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamED.getCoeff3())))
|
||||
+")x*x ")
|
||||
.append(" E(x) = ("+ (Objects.isNull(gammaCalibrationParamED.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamED.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(gammaCalibrationParamED.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamED.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(gammaCalibrationParamED.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamED.getCoeff3())))
|
||||
+")x*x").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#DET: LIMITS PER ROI").append("\n");
|
||||
strBuffer.append(" Roi Beta Gamma ").append("\n");
|
||||
|
@ -1107,53 +1097,48 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
strBuffer.append("\n");
|
||||
strBuffer.append("#GAS Old CALIBRATION").append("\n");
|
||||
strBuffer.append(" Old Beta Old Gamma ").append("\n");
|
||||
if (betaDataFile.isBBetaEnergyValidGas() || betaDataFile.isBGammaEnergyValidGas()){
|
||||
if (betaDataFile.isBBetaEnergyValidGas()) {
|
||||
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(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.numberSixLen(betaDataFile.getGammaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(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.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(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.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(2))));
|
||||
strBuffer.append("\n");
|
||||
} else {
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
strBuffer.append("\n");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(betaDataFile.getBetaFittingParaOld())) {
|
||||
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaOld().get(2))));
|
||||
} 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");
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(betaDataFile.getGammaFittingParaOld())) {
|
||||
strBuffer.append(rowFormat(" CH(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaOld().get(2))));
|
||||
strBuffer.append("\n");
|
||||
} else {
|
||||
strBuffer.append(" CH(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
strBuffer.append("\n");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(betaDataFile.getBetaFittingParaToUiOld())) {
|
||||
strBuffer.append(rowFormat(" E(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getBetaFittingParaToUiOld().get(2))));
|
||||
} else {
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(betaDataFile.getGammaFittingParaToUiOld())) {
|
||||
strBuffer.append(rowFormat(" E(x) = (%s)+(%s)*x+(%s)x*x ", NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(0)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(1)), NumberFormatUtil.numberSixLen(betaDataFile.getGammaFittingParaToUiOld().get(2))));
|
||||
strBuffer.append("\n");
|
||||
} else {
|
||||
strBuffer.append(" E(x) = (?1)+(?2)*x+(?3)x*x ");
|
||||
strBuffer.append("\n");
|
||||
}
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#GAS New CALIBRATION").append("\n");
|
||||
strBuffer.append(" New Beta New Gamma ").append("\n");
|
||||
strBuffer.append(" CH(x) = ("+ (Objects.isNull(betaCalibrationParamEG.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamEG.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(betaCalibrationParamEG.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamEG.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(betaCalibrationParamEG.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamEG.getCoeff3())))
|
||||
+")x*x ")
|
||||
.append(" CH(x) = ("+ (Objects.isNull(gammaCalibrationParamEG.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamEG.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(gammaCalibrationParamEG.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamEG.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(gammaCalibrationParamEG.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamEG.getCoeff3())))
|
||||
+")x*x").append("\n");
|
||||
strBuffer.append(" E(x) = ("+ (Objects.isNull(betaCalibrationParamG.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamG.getCoeff1())))
|
||||
strBuffer.append(" CH(x) = ("+ (Objects.isNull(betaCalibrationParamG.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamG.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(betaCalibrationParamG.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamG.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(betaCalibrationParamG.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamG.getCoeff3())))
|
||||
+")x*x ")
|
||||
.append(" E(x) = ("+ (Objects.isNull(gammaCalibrationParamG.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamG.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(gammaCalibrationParamG.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamG.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(gammaCalibrationParamG.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamG.getCoeff3())))
|
||||
.append(" CH(x) = ("+ (Objects.isNull(gammaCalibrationParamG.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamG.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(gammaCalibrationParamG.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamG.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(gammaCalibrationParamG.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamG.getCoeff3())))
|
||||
+")x*x").append("\n");
|
||||
strBuffer.append(" E(x) = ("+ (Objects.isNull(betaCalibrationParamEG.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamEG.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(betaCalibrationParamEG.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamEG.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(betaCalibrationParamEG.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(betaCalibrationParamEG.getCoeff3())))
|
||||
+")x*x ")
|
||||
.append(" E(x) = ("+ (Objects.isNull(gammaCalibrationParamEG.getCoeff1())?"?1":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamEG.getCoeff1())))
|
||||
+")+("+ (Objects.isNull(gammaCalibrationParamEG.getCoeff2())?"?2":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamEG.getCoeff2())))
|
||||
+")*x+("+ (Objects.isNull(gammaCalibrationParamEG.getCoeff3())?"?3":NumberFormatUtil.numberSixLen(String.valueOf(gammaCalibrationParamEG.getCoeff3())))
|
||||
+")x*x").append("\n");
|
||||
strBuffer.append("\n");
|
||||
strBuffer.append("#GAS: LIMITS PER ROI").append("\n");
|
||||
|
@ -1659,17 +1644,15 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
map.put("max", max);
|
||||
map.put("gammaSpectrum", seriseDataList);
|
||||
|
||||
if (betaDataFile.getGammaList().size()<=0) {
|
||||
if (betaDataFile.getGammaList().size() <= 0 ) {
|
||||
betaDataFile.setGammaList(oldScatterSeries);
|
||||
}
|
||||
if (betaDataFile.getGammaFittingPara().size()<=0) {
|
||||
if (betaDataFile.getGammaFittingPara().size() <= 0 ) {
|
||||
betaDataFile.setGammaFittingPara(fittingParaStr);
|
||||
}
|
||||
if (betaDataFile.getGammaFittingParaToUi().size()<=0) {
|
||||
if (betaDataFile.getGammaFittingParaToUi().size() <= 0 ) {
|
||||
betaDataFile.setGammaFittingParaToUi(fittingParaToUiStr);
|
||||
}
|
||||
betaDataFile.setGammaFittingParaOld(fittingParaStr);
|
||||
betaDataFile.setGammaFittingParaToUiOld(fittingParaToUiStr);
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(map);
|
||||
|
@ -1782,8 +1765,6 @@ public class SpectrumAnalysisServiceImpl extends AbstractLogOrReport implements
|
|||
if (betaDataFile.getBetaFittingParaToUi().size()<=0) {
|
||||
betaDataFile.setBetaFittingParaToUi(fittingParaToUiStr);
|
||||
}
|
||||
betaDataFile.setBetaFittingParaOld(fittingParaStr);
|
||||
betaDataFile.setBetaFittingParaToUiOld(fittingParaToUiStr);
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(map);
|
||||
|
|
Loading…
Reference in New Issue
Block a user