fix:新beta分析,如果没有面积 则根据固定参数进行counts加和
This commit is contained in:
parent
efc24076ab
commit
3c82017aed
|
@ -1336,7 +1336,6 @@ public class SelfStationUtil extends SelfBaseUtil {
|
|||
double area = info.area;
|
||||
// 峰如果没有识别到核素则跳过
|
||||
if (info.nuclides.contains(nuclideName)) {
|
||||
NuclideLines nuclideLines = nuclideLinesMap.get(nuclideName);
|
||||
// 峰面积
|
||||
nuclideParam.put("area", area+"");
|
||||
break;
|
||||
|
@ -1345,7 +1344,43 @@ public class SelfStationUtil extends SelfBaseUtil {
|
|||
}
|
||||
// 没有峰信息 核素=未识别 不计算活度浓度
|
||||
if (!nuclideParam.containsKey("area")) {
|
||||
nuclideParam.put("area", "0");
|
||||
double left = 0, right = 0;
|
||||
List<Long> counts = null;
|
||||
// 固定能量范围,半高宽
|
||||
switch (nuclideName) {
|
||||
case "Xe131M":
|
||||
left = 29.7 - (0.737 * 1.25);
|
||||
right = 29.7 + (0.737 * 1.25);
|
||||
counts = sampleData.getROIOnePHDFile().getSpec().getCounts();
|
||||
break;
|
||||
case "Xe133M":
|
||||
left = 29.7 - (0.737 * 1.25);
|
||||
right = 29.7 + (0.737 * 1.25);
|
||||
counts = sampleData.getROITwoPHDFile().getSpec().getCounts();
|
||||
break;
|
||||
case "Xe133":
|
||||
left = 81 - (0.781 * 1.25);
|
||||
right = 81 + (0.781 * 1.25);
|
||||
counts = sampleData.getROIThreePHDFile().getSpec().getCounts();
|
||||
break;
|
||||
case "Xe135":
|
||||
left = 249.8 - (0.916 * 1.25);
|
||||
right = 249.8 + (0.916 * 1.25);
|
||||
counts = sampleData.getROIFourPHDFile().getSpec().getCounts();
|
||||
break;
|
||||
}
|
||||
// 能量转化为道址
|
||||
// 通过道址将这个范围的计数求和
|
||||
List<Double> gFittingPara = EnergySpectrumHandler.GetFileFittingPara(sampleData.getUsedEnerKD().getG_energy(),
|
||||
sampleData.getUsedEnerKD().getCentroid_channel());
|
||||
double lc = gFittingPara.get(0) + gFittingPara.get(1) * left + gFittingPara.get(2) * Math.sqrt(left);
|
||||
double rc = gFittingPara.get(0) + gFittingPara.get(1) * right + gFittingPara.get(2) * Math.sqrt(right);
|
||||
// 面积=计数总和:通过能量卡一个范围,将范围内的计数加和
|
||||
int area = 0;
|
||||
for (int i = (int)lc; i <= (int) rc; i++) {
|
||||
area += counts.get(i);
|
||||
}
|
||||
nuclideParam.put("area", area+"");
|
||||
}
|
||||
param.put(mapKey, nuclideParam);
|
||||
}
|
||||
|
@ -1472,4 +1507,72 @@ public class SelfStationUtil extends SelfBaseUtil {
|
|||
}
|
||||
}
|
||||
|
||||
public void energy2Channel(Double be, List<Double> bChannel, List<Double> bElectronEnergy, long numBChannel,
|
||||
List<Double> gEnergy,List<Double> gCentroidChannel){
|
||||
//计算得到C to E公式数据
|
||||
List<Double> fittingPara = EnergySpectrumHandler.GetFileFittingPara(bChannel, bElectronEnergy);
|
||||
List<String> fittingParaStr = new LinkedList<>();
|
||||
for (Double para:fittingPara) {
|
||||
fittingParaStr.add(String.valueOf(para));
|
||||
}
|
||||
// map.put("CToE", fittingParaStr);
|
||||
List<Double> channel = new LinkedList<>();
|
||||
for (int i = 0; i < numBChannel - 1 ; ++i) {
|
||||
channel.add(Double.valueOf(i));
|
||||
}
|
||||
List<Double> energy = EnergySpectrumHandler.GetFileFittingData(channel, fittingPara);
|
||||
List<SeriseData> oldLineSeries = new LinkedList<>();
|
||||
for (int i=0; i<channel.size(); i++) {
|
||||
SeriseData tmp = new SeriseData();
|
||||
tmp.setX(channel.get(i));
|
||||
tmp.setY(energy.get(i));
|
||||
oldLineSeries.add(tmp);
|
||||
}
|
||||
// map.put("oldLineSeries", oldLineSeries);
|
||||
//E to C
|
||||
List<Double> fittingParaToUi = EnergySpectrumHandler.GetFileFittingPara(energy, channel);
|
||||
List<String> fittingParaToUiStr = new LinkedList<>();
|
||||
for (Double para:fittingParaToUi) {
|
||||
fittingParaToUiStr.add(String.valueOf(para));
|
||||
}
|
||||
// map.put("EToC", fittingParaToUiStr);
|
||||
// 得到gamma谱 e2c公式
|
||||
List<Double> gFittingPara = EnergySpectrumHandler.GetFileFittingPara(gEnergy, gCentroidChannel);
|
||||
|
||||
Double bc = fittingParaToUi.get(0) + fittingParaToUi.get(1) * be + fittingParaToUi.get(2) * Math.sqrt(be);
|
||||
}
|
||||
|
||||
public double channel2Energy(Double ge, List<Double> bChannel, List<Double> bElectronEnergy, long numBChannel,
|
||||
List<Double> gEnergy,List<Double> gCentroidChannel){
|
||||
//计算得到C to E公式数据
|
||||
List<Double> fittingPara = EnergySpectrumHandler.GetFileFittingPara(bChannel, bElectronEnergy);
|
||||
List<String> fittingParaStr = new LinkedList<>();
|
||||
for (Double para:fittingPara) {
|
||||
fittingParaStr.add(String.valueOf(para));
|
||||
}
|
||||
List<Double> channel = new LinkedList<>();
|
||||
for (int i = 0; i < numBChannel - 1 ; ++i) {
|
||||
channel.add(Double.valueOf(i));
|
||||
}
|
||||
List<Double> energy = EnergySpectrumHandler.GetFileFittingData(channel, fittingPara);
|
||||
List<SeriseData> oldLineSeries = new LinkedList<>();
|
||||
for (int i=0; i<channel.size(); i++) {
|
||||
SeriseData tmp = new SeriseData();
|
||||
tmp.setX(channel.get(i));
|
||||
tmp.setY(energy.get(i));
|
||||
oldLineSeries.add(tmp);
|
||||
}
|
||||
//E to C
|
||||
List<Double> fittingParaToUi = EnergySpectrumHandler.GetFileFittingPara(energy, channel);
|
||||
List<String> fittingParaToUiStr = new LinkedList<>();
|
||||
for (Double para:fittingParaToUi) {
|
||||
fittingParaToUiStr.add(String.valueOf(para));
|
||||
}
|
||||
// 得到gamma谱 e2c公式
|
||||
List<Double> gFittingPara = EnergySpectrumHandler.GetFileFittingPara(gEnergy, gCentroidChannel);
|
||||
|
||||
return (gFittingPara.get(0) + gFittingPara.get(1) * ge + gFittingPara.get(2) * Math.sqrt(ge));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user