Add final-raw heatmap

This commit is contained in:
D. Berge
2025-08-08 13:47:30 +02:00
parent a188e9a099
commit 4e581d5664
2 changed files with 71 additions and 3 deletions

View File

@@ -79,6 +79,30 @@
</v-list-item>
<v-list-item>
<v-list-item-content>
<v-menu bottom offset-y>
<template v-slot:activator="{ on, attrs }">
<v-list-item-title v-bind="attrs" v-on="on">
Raw vs final <v-icon small right>mdi-chevron-right</v-icon>
</v-list-item-title>
</template>
<v-list nav dense>
<v-list-item @click="setHeatmapValue('co_total_error')">
<v-list-item-content>
<v-list-item-title>Δ<span style="text-decoration:overline;">ij</span> Total error</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item @click="setHeatmapValue('co_delta_j')">
<v-list-item-content>
<v-list-item-title>Δj Inline error</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item @click="setHeatmapValue('co_delta_i')">
<v-list-item-content>
<v-list-item-title>Δi Crossline error</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
</v-menu>
</v-list-item-content>
</v-list-item>
<v-list-item>
@@ -274,7 +298,7 @@
<span>Final data</span>
<label title="Show points"><v-icon small left class="mx-0">mdi-vector-point</v-icon> <input type="checkbox" value="seqfp" v-model="layerSelection"/></label>
<label title="Show lines"><v-icon small left class="mx-0">mdi-vector-line</v-icon> <input type="checkbox" value="seqfl" v-model="layerSelection"/></label>
<label title="Show position error"><v-icon small left class="mx-0">mdi-dots-grid</v-icon> <input type="checkbox" value="seqfh" v-model="layerSelection"/></label>
<label><!-- No heatmap available --></label>
<span>Events</span>
<label title="Show points"><v-icon small left class="mx-0">mdi-vector-point</v-icon> <input type="checkbox" value="log" v-model="layerSelection"/></label>
@@ -636,6 +660,7 @@ export default {
let title = this.heatmapValue;
switch (this.heatmapValue) {
// Raw vs preplot
case "total_error":
title = "Total position error (raw data)";
break;
@@ -645,6 +670,19 @@ export default {
case "delta_j":
title = "Total inline position error (raw data)";
break;
// Final vs raw (c-o)
case "co_total_error":
title = "Total position error (final vs raw)";
break;
case "co_delta_i":
title = "Total crossline position error (final vs raw)";
break;
case "co_delta_j":
title = "Total inline position error (final vs raw)";
break;
// Gun deltas
case "delta_μ":
title = "Guns mean delta error";
break;
@@ -654,6 +692,8 @@ export default {
case "delta_R":
title = "Guns delta range";
break;
// Gun pressure
case "press_μ":
title = "Fired array guns mean pressure";
break;
@@ -663,6 +703,8 @@ export default {
case "press_R":
title = "Fired array pressure range";
break;
// Gun depth
case "depth_μ":
title = "Guns mean depth";
break;
@@ -672,6 +714,8 @@ export default {
case "depth_R":
title = "Gun depth range";
break;
// Gun fill time
case "fill_μ":
title = "Guns mean fill time";
break;
@@ -681,6 +725,8 @@ export default {
case "fill_R":
title = "Guns fill time range";
break;
// Gun delay
case "delay_μ":
title = "Guns mean firing delay";
break;

View File

@@ -485,7 +485,10 @@ export default {
},
heatmapLayer(options = {}) {
const { positions, values } = this.sequenceBinaryData;
const { positions, values } = this.heatmapValue?.startsWith("co_")
? this.sequenceBinaryDataFinal
: this.sequenceBinaryData;
if (!positions?.length || !values?.length) {
console.warn('No valid data for heatmapLayer');
@@ -518,8 +521,27 @@ export default {
case "delta_j":
weights = values[4];
scaler = 0.1;
colorDomain = [0.5, 5];
colorDomain = [10, 80]; // scale: 100 (0.1 0.8 m)
break;
case "co_total_error":
weights = Float32Array.from(values[3], (ei, i) => {
const ej = values[4][i];
return Math.sqrt(ei * ei + ej * ej) / 100; // Euclidean distance in meters
});
colorDomain = [10, 150]; // Scale: 100 (0.1 1 m)
break;
case "co_delta_i":
weights = values[5];
scaler = 0.1;
colorDomain = [10, 150];
break;
case "co_delta_j":
weights = values[6];
scaler = 0.1;
colorDomain = [0.2, 2];
break;
case "delta_μ":
weights = values[5];
scaler = 0.1;