This commit is contained in:
xin
2025-05-07 11:13:56 +08:00
parent fb037dbf6f
commit 94336c9ba1
23 changed files with 215 additions and 382 deletions

View File

@ -58,13 +58,7 @@ export default {
866.794,
912.297,
922.450
],
],
shutter_time_up: 1,
shutter_time_down: 1,
sensor_gain_up: 0,
@ -279,7 +273,17 @@ export default {
let coeffweave2 = this.Devinfo.bochangxishu.a1;
let coeffweave3 = this.Devinfo.bochangxishu.a2;
let coeffweave4 = this.Devinfo.bochangxishu.a3;
this.Peaks = [];
var lenthofpeaks=this.Peaks.length;
for (var i=lenthofpeaks-1;i>=0;i--){
if (this.Peaks[i][3] == false){
this.Peaks.splice(i,1);
}
}
//this.Peaks = [];
let peakformatch = [];
peaks.forEach(element => {
var weave = coeffweave1 * element[0] * element[0] * element[0] + coeffweave2 * element[0] * element[0] + coeffweave3 * element[0] + coeffweave4;
@ -334,7 +338,14 @@ export default {
let coeffweave2 = this.Devinfo.bochangxishu2.a1;
let coeffweave3 = this.Devinfo.bochangxishu2.a2;
let coeffweave4 = this.Devinfo.bochangxishu2.a3;
this.PeaksDown = [];
var lenthofpeaks=this.PeaksDown.length;
for (var i=lenthofpeaks-1;i>=0;i--){
if (this.PeaksDown[i][3] == false){
this.PeaksDown.splice(i,1);
}
}
// this.PeaksDown = [];
peaks.forEach(element => {
var weave = coeffweave1 * element[0] * element[0] * element[0] + coeffweave2 * element[0] * element[0] + coeffweave3 * element[0] + coeffweave4;
peaksforshow.push([weave, element[1], element[0]]);
@ -375,6 +386,19 @@ export default {
},
async ClearArry(specindex){
if (specindex == 0) {
this.Peaks = [];
this.option.series[1].data = [];
} else if (specindex == 1) {
this.PeaksDown = [];
this.optiondown.series[1].data = [];
}
},
ReplotWeaveInfo(spectralnumber) {
let orgoption = {};
let Peaksnow = [];
@ -746,6 +770,8 @@ export default {
sensor_gain_up.toFixed(2) }} </a-tag>
<b-button @click="CompuWeaveLenth(0)"
style="position:absolute;right: 20%;margin-top:15%; z-index: 10; ;width: 60px ">计算</b-button>
<b-button @click="ClearArry(0)"
style="position:absolute;right: 20%;margin-top:20%; z-index: 10; ;width: 60px ">清空</b-button>
<div class="chart-container" ref="chart_weavelenth"></div>
@ -795,6 +821,8 @@ export default {
shutter_time_down.toFixed(2) }} ms</a-tag>
<b-button @click="CompuWeaveLenth(1)"
style="position:absolute;right: 20%;margin-top:15%; z-index: 10; ;width: 60px ">计算</b-button>
<b-button @click="ClearArry(1)"
style="position:absolute;right: 20%;margin-top:20%; z-index: 10; ;width: 60px ">清空</b-button>
<!-- <b-button @click="findpeak(1)" style="position:absolute;right: 20%;margin-top:20%; z-index: 10; ;width: 60px ">寻峰</b-button> -->
<div class="chart-container" ref="chart_weavelenth_down"></div>
<div style="width: 20%; overflow: auto;height:80%;">