Merge branch 'feature-analysis-RLR-renpy' of http://git.hivekion.com:3000/xiaoguangbin/AnalysisSystemForRadionuclide_vue into master-dev
This commit is contained in:
commit
7fb994c8bb
|
@ -198,6 +198,7 @@ export default {
|
|||
all: null,
|
||||
baseLineCP: [],
|
||||
},
|
||||
peakList: [], // Peak 列表(非点位)
|
||||
|
||||
nuclideLibraryList: [], // 当前鼠标点击选中的channel
|
||||
peakInfomationTooltip: {
|
||||
|
@ -356,7 +357,11 @@ export default {
|
|||
}
|
||||
const nextAxis = markLineXAxis == -1 ? 1 : markLineXAxis + 1
|
||||
markLineData.xAxis = nextAxis
|
||||
const { channel: nextChannel, energy: nextEnergy, counts: nextCounts } = this.getEnergyAndCountsByXAxis(nextAxis)
|
||||
const {
|
||||
channel: nextChannel,
|
||||
energy: nextEnergy,
|
||||
counts: nextCounts,
|
||||
} = this.getEnergyAndCountsByXAxis(nextAxis)
|
||||
this.setChartBottomTitle(nextChannel, nextEnergy, nextCounts)
|
||||
|
||||
this.getSelPosNuclide(nextChannel)
|
||||
|
@ -545,6 +550,7 @@ export default {
|
|||
|
||||
shapeChannelData,
|
||||
shapeEnergyData,
|
||||
peak,
|
||||
} = result
|
||||
if (flag && (flag == 'dab' || flag == 'file')) {
|
||||
this.bAnalyed = result.bAnalyed
|
||||
|
@ -556,6 +562,10 @@ export default {
|
|||
this.detailedInfomation = DetailedInformation
|
||||
this.qcFlags = QCFlag
|
||||
|
||||
if(peak) {
|
||||
this.peakList = peak
|
||||
}
|
||||
|
||||
const channelPeakGroup = this.getLineData(allData, 'Peak', 'channel', true)
|
||||
const energyPeakGroup = this.getLineData(allData, 'Peak', 'energy', true)
|
||||
|
||||
|
@ -867,9 +877,48 @@ export default {
|
|||
|
||||
// 设置图表底部的标题
|
||||
setChartBottomTitle(channel, energy, counts) {
|
||||
this.option.title.text = `{a|Channel:${channel}} {a|Energy:${
|
||||
energy || 0
|
||||
}} {a|Counts:${counts || 0}} {a|Detectability:0}`
|
||||
const { index, find } = this.findNearPeak(channel)
|
||||
|
||||
this.option.title.text = `{a|Channel:${channel}} {a|Energy:${energy || '0.00'}} {a|Counts:${
|
||||
counts || '0.0'
|
||||
}} {a|Significance:${find ? this.peakList[index].significance.toFixed(2) : '0.00'}}`
|
||||
},
|
||||
|
||||
// 查找最近的峰(C++相关)
|
||||
findNearPeak(channel) {
|
||||
let t_bFind = false,
|
||||
i = 0,
|
||||
peakNum = this.peakList.length
|
||||
for (; i < peakNum; ++i) {
|
||||
const peak = this.peakList[i]
|
||||
if (channel >= peak.left && channel <= peak.right) {
|
||||
// 如果 channel 在峰的左右边界内
|
||||
if (peak.multiIndex > 0 && channel > peak.peakCentroid) {
|
||||
// 如果是重峰,且 channel 在重峰的第一个峰的中心道右侧
|
||||
let j = i
|
||||
let temp = channel - peak.peakCentroid
|
||||
while (++j < peakNum && this.peakList[j].multiIndex == peak.multiIndex) {
|
||||
if (Math.abs(this.peakList[j].peakCentroid - channel) < temp) {
|
||||
// 找出重峰中峰中心道离 channel 最近的峰
|
||||
temp = Math.abs(this.peakList[j].peakCentroid - channel)
|
||||
i = j
|
||||
}
|
||||
}
|
||||
}
|
||||
// channel 在索引(i)对应的峰内
|
||||
t_bFind = true
|
||||
break
|
||||
} else if (peak.left > channel) {
|
||||
// channel 不在任何峰内,找离它最近的峰
|
||||
if (i > 0 && channel - this.peakList[i - 1].peakCentroid < peak.peakCentroid - channel) i -= 1
|
||||
break
|
||||
}
|
||||
}
|
||||
if (i >= peakNum) i -= 1
|
||||
return {
|
||||
index: i,
|
||||
find: t_bFind,
|
||||
}
|
||||
},
|
||||
|
||||
// 根据xAixs值找channel、energy和counts
|
||||
|
|
Loading…
Reference in New Issue
Block a user